local PokerEmotion = {
	-- 表情显示大小
	["EmotionSize"] = 80,
	-- 表情显示实际大小
	["EmotionRealSize"] = 100,
	-- 表情数
	["EmotionNum"] = 8,
	-- 表情显示Base
	["Base"] = 5,
	-- 表情显示位置
	["Rect"] = {
		[0] = {
			["x"] = 60,
			["y"] = 320,
			["IconId"] = 73,
		},
		[1] = {
			["x"] = 103,
			["y"] = 200,
			["IconId"] = 74,
		},
		[2] = {
			["x"] = 190,
			["y"] = 100,
			["IconId"] = 75,
		},
		[3] = {
			["x"] = 325,
			["y"] = 30,
			["IconId"] = 76,
		},
		[4] = {
			["x"] = 460,
			["y"] = 30,
			["IconId"] = 77,
		},
		[5] = {
			["x"] = 605,
			["y"] = 100,
			["IconId"] = 78,
		},
		[6] = {
			["x"] = 685,
			["y"] = 200,
			["IconId"] = 79,
		},
		[7] = {
			["x"] = 740,
			["y"] = 320,
			["IconId"] = 80,
		},
	},
}

local TableEmojiShowPos = {
	-- 0为hero的位置
	[0] = {
		["x"] = 616,
		["y"] = 514,
	},
	[1] = {
		["x"] = 338,
		["y"] = 490,
	},
	[2] = {
		["x"] = 74,
		["y"] = 415,
	},
	[3] = {
		["x"] = 112,
		["y"] = 160,
	},
	[4] = {
		["x"] = 375,
		["y"] = 40,
	},
	[5] = {
		["x"] = 867,
		["y"] = 40,
	},
	[6] = {
		["x"] = 1130,
		["y"] = 160,
	},
	[7] = {
		["x"] = 1168,
		["y"] = 415,
	},
	[8] = {
		["x"] = 904,
		["y"] = 490,
	},
}

-- 获取表情信息
local function GetPokerEmotion(key)
	local value = PokerEmotion[key]

	if (value ~= nil) then
		return value
	end
	
	return 0
end

-- 获取桌面表情显示位置
local function GetTableEmojiShowPos(index, key)
	local value = TableEmojiShowPos[index][key]

	if (value ~= nil) then
		return value
	end
	
	return 0
end

-- 获取表情rect信息
local function GetPokerEmotionRect(index, key)
	if (PokerEmotion["Rect"][index] == nil) then
		return 0
	end
	
	local value = PokerEmotion["Rect"][index][key]

	if (value ~= nil) then
		return value
	end
	
	return 0
end

-- 清理变量释放内存
local function Unload()
	PokerEmotion = nil
end

-- 游戏中页面显示个数
local function GetShowNum()
	return 8
end

-- 游戏中页面显示开始索引
local function GetShowIndex()
	return 73
end

-- 通过require传给其他Lua脚本使用
local PokerEmoji = {
	GetPokerEmotion = GetPokerEmotion,
	GetPokerEmotionRect = GetPokerEmotionRect,
	GetTableEmojiShowPos = GetTableEmojiShowPos,
	GetShowNum = GetShowNum,
	GetShowIndex = GetShowIndex,
    Unload = Unload,
}

-- C++程序使用的global函数名
PokerEmoji_GetPokerEmotion = PokerEmoji.GetPokerEmotion
PokerEmoji_GetPokerEmotionRect = PokerEmoji.GetPokerEmotionRect
PokerEmoji_GetTableEmojiShowPos = PokerEmoji.GetTableEmojiShowPos
PokerEmoji_GetShowNum = PokerEmoji.GetShowNum
PokerEmoji_GetShowIndex = PokerEmoji.GetShowIndex
PokerEmoji_Unload = PokerEmoji.Unload

-- require返回值
return PokerEmoji

