local CartoonImage = { 
["StartEffect"] = "CartoonDisplay", -- 起始动画光效 
["TimeMouseMove"] = 1500, -- 鼠标未移动定时，隐藏按钮（ms） 
["TimeInterval"] = 3000, -- 播放下一张图片，间隔时间（ms） 
["MaskColor"] = 0xFF000000, 
--适配全屏X按钮坐标,(以全屏右上角为原点)
closebtnx=100,
closebtny=40,
[1] = { 
Amount = 5, -- 该部动画帧数 
[0] = "ComicsRedo1", 
[1] = "ComicsRedo2", 
[2] = "ComicsRedo3", 
[3] = "ComicsRedo4", 
[4] = "ComicsRedo5", 
}, 
[2] = { 
Amount = 6, 
[0] = "ComicsRedo6", 
[1] = "ComicsRedo7", 
[2] = "ComicsRedo8", 
[3] = "ComicsRedo9", 
[4] = "ComicsRedo10", 
[5] = "ComicsRedo11", 
}, 
[3] = { 
Amount = 7, 
[0] = "ComicsRedo12", 
[1] = "ComicsRedo13", 
[2] = "ComicsRedo14", 
[3] = "ComicsRedo15", 
[4] = "ComicsRedo16", 
[5] = "ComicsRedo17", 
[6] = "ComicsRedo18", 
}, 

[4] = { 
Amount = 4, 
[0] = "NoviceGuide_WarriorMainline1", 
[1] = "NoviceGuide_WarriorMainline2", 
[2] = "NoviceGuide_WarriorMainline3", 
[3] = "NoviceGuide_WarriorMainline4", 
}, 

-- -- 职业漫画从10开始,10+index(index为选人界面顺序,从0开始)
	-- [10] = { 
	-- -- 跳过漫画开始光效,直接显示漫画
		-- -- skiphead = 1,
		-- -- Amount = 0, -- 该部动画帧数 
	-- }, 
	-- [11] = { 
		-- skiphead=1,
		-- Amount = 6, 
		-- [0] = "ComicsRedo8", 
		-- [1] = "ComicsRedo9", 
		-- [2] = "ComicsRedo10", 
		-- [3] = "ComicsRedo11", 
		-- [4] = "ComicsRedo12", 
		-- [5] = "ComicsRedo13", 
	-- }, 
	-- [12] = { 
		-- skiphead = 1,
		-- Amount = 8, 
		-- [0] = "ComicsRedo15", 
		-- [1] = "ComicsRedo16", 
		-- [2] = "ComicsRedo17", 
		-- [3] = "ComicsRedo18", 
		-- [4] = "ComicsRedo19", 
		-- [5] = "ComicsRedo20", 
		-- [6] = "ComicsRedo21", 
		-- [7] = "ComicsRedo22", 
	-- }, 
	-- [13] = { 
		-- skiphead = 1,
		-- Amount = 7, 
		-- [0] = "NoviceGuide_ThorMainline1", 
		-- [1] = "NoviceGuide_ThorMainline2", 
		-- [2] = "NoviceGuide_ThorMainline3", 
		-- [3] = "NoviceGuide_ThorMainline4", 
		-- [4] = "NoviceGuide_ThorMainline5", 
		-- [5] = "NoviceGuide_ThorMainline6", 
		-- [6] = "NoviceGuide_ThorMainline7", 
	-- }, 
	-- [14] = { 
	-- },
	-- [15] = { 
		-- skiphead = 1,
		-- Amount = 7, 
		-- [0] = "ComicsRedo1", 
		-- [1] = "ComicsRedo2", 
		-- [2] = "ComicsRedo3", 
		-- [3] = "ComicsRedo4", 
		-- [4] = "ComicsRedo5", 
		-- [5] = "ComicsRedo6", 
		-- [6] = "ComicsRedo7", 
	-- }, 
	-- [16] = { 
	-- },
	-- [17] = { 
	-- },
	-- [18] = { 
		-- skiphead = 1,
		-- Amount = 4, 
		-- [0] = "NoviceGuide_WarriorMainline1", 
		-- [1] = "NoviceGuide_WarriorMainline2", 
		-- [2] = "NoviceGuide_WarriorMainline3", 
		-- [3] = "NoviceGuide_WarriorMainline4", 
	-- },
	-- [19] = { 
	-- },
} 
local CartoonImage_OldSoldier = { 
    ["StartEffect"] = "CartoonDisplay", -- 起始动画光效 
    ["TimeMouseMove"] = 1500, -- 鼠标未移动定时，隐藏按钮（ms） 
    ["TimeInterval"] = 3000, -- 播放下一张图片，间隔时间（ms） 
    ["MaskColor"] = 0xFF000000, 
    --适配全屏X按钮坐标,(以全屏右上角为原点)
    closebtnx=100,
    closebtny=40,
    [1] = { 
    Amount = 6, -- 该部动画帧数 
    [0] = "ComicsRedo8", 
    [1] = "ComicsRedo9", 
    [2] = "ComicsRedo10", 
    [3] = "ComicsRedo11", 
    [4] = "ComicsRedo12", 
    [5] = "ComicsRedo13", 
    }, 
    [2] = { 
    Amount = 7, 
    [0] = "ComicsRedo1", 
    [1] = "ComicsRedo2", 
    [2] = "ComicsRedo3", 
    [3] = "ComicsRedo4", 
    [4] = "ComicsRedo5", 
    [5] = "ComicsRedo6", 
    [6] = "ComicsRedo7", 
    }, 
    [3] = { 
    Amount = 4, 
    [0] = "NoviceGuide_WarriorMainline1", 
    [1] = "NoviceGuide_WarriorMainline2", 
    [2] = "NoviceGuide_WarriorMainline3", 
    [3] = "NoviceGuide_WarriorMainline4", 
    }, 
    
    -- -- 职业漫画从10开始,10+index(index为选人界面顺序,从0开始)
    -- [10] = { 
    -- -- 跳过漫画开始光效,直接显示漫画
    -- -- skiphead = 1,
    -- -- Amount = 0, -- 该部动画帧数 
    -- }, 
    -- [11] = { 
    -- skiphead=1,
    -- Amount = 6, 
    -- [0] = "ComicsRedo8", 
    -- [1] = "ComicsRedo9", 
    -- [2] = "ComicsRedo10", 
    -- [3] = "ComicsRedo11", 
    -- [4] = "ComicsRedo12", 
    -- [5] = "ComicsRedo13", 
    -- }, 
    -- [12] = { 
    -- }, 
    -- [13] = { 
    -- skiphead = 1,
    -- Amount = 7, 
    -- [0] = "ComicsRedo1", 
    -- [1] = "ComicsRedo2", 
    -- [2] = "ComicsRedo3", 
    -- [3] = "ComicsRedo4", 
    -- [4] = "ComicsRedo5", 
    -- [5] = "ComicsRedo6", 
    -- [6] = "ComicsRedo7", 
    -- }, 
    -- [14] = { 
    -- skiphead = 1,
    -- Amount = 4, 
    -- [0] = "NoviceGuide_WarriorMainline1", 
    -- [1] = "NoviceGuide_WarriorMainline2", 
    -- [2] = "NoviceGuide_WarriorMainline3", 
    -- [3] = "NoviceGuide_WarriorMainline4", 
    -- }, 
} 

local function GetCartInfo(param1, param2, default)
    if UserData_IsOldSoldierServer() or UserData_IsCoinsServer() then
        local value = CartoonImage_OldSoldier[param1]
        if (value == nil) then
            return default
        end
        
        local res = value[param2]
        if (res == nil) then
            return default
        end
    
        return res    
    end

    local value = CartoonImage[param1]
    if (value == nil) then
        return default
    end
    
    local res = value[param2]
    if (res == nil) then
        return default
    end

    return res
end

local function GetCartoonAmount(index) 
    if UserData_IsOldSoldierServer() or UserData_IsCoinsServer() then
        local value = nil 
        value = CartoonImage_OldSoldier[index] 
        if (value) then 
            return value.Amount 
        end 
        return nil 
    end

local value = nil 
value = CartoonImage[index] 
if (value) then 
return value.Amount 
end 
return nil 
end 

local function GetCartoonTitle(index, frame) 
    if UserData_IsOldSoldierServer() or UserData_IsCoinsServer() then
        local value = nil 
        value = CartoonImage_OldSoldier[index] 
        if (value) then 
            return value[frame] 
        end 
        return nil 
    end

local value = nil 
value = CartoonImage[index] 
if (value) then 
return value[frame] 
end 
return nil 
end 

local function GetCartoonInfo(Axis) 
    if UserData_IsOldSoldierServer() or UserData_IsCoinsServer() then
        return CartoonImage_OldSoldier[Axis]
    end

return CartoonImage[Axis] 
end 

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

local Cartoon = { 
GetCartInfo = GetCartInfo, 
GetCartoonInfo = GetCartoonInfo, 
GetCartoonAmount = GetCartoonAmount, 
GetCartoonTitle = GetCartoonTitle, 
Unload = Unload, 
} 

-- C++程序使用的global函数名 
Cartoon_GetCartInfo = Cartoon.GetCartInfo 
Cartoon_GetCartoonInfo = Cartoon.GetCartoonInfo 
Cartoon_GetCartoonAmount = Cartoon.GetCartoonAmount 
Cartoon_GetCartoonTitle = Cartoon.GetCartoonTitle 
Cartoon_Unload = Cartoon.Unload 

-- require返回值 
return Cartoon 
