local PATH_COMICS_28_ON_SHOWN          = 'data/Scenes/Comics/HelpersComicsOneSMS.lua'
local PATH_COMICS_28_KEY               = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_28_USE_BULB          = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
local PATH_COMICS_28_NO_BULB           = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_28_SWORD             = 'data/Scenes/Comics/HelpersComicsReplic.lua'

local PATH_MINIGAME_28_DRAGON          = 'data/Scenes/Minigames/28_Dragon.lua'

function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad(screen:GetName())

    local pf = play_field
    local level = pf:GetLevelScreen()
    ---------------------------------------------------------------------------------------------
    AddRandomTasks(14,
         CreateTask('BANANA', 'BANANAS', 'banana', 'banana_2', 'banana_3'),
         CreateTask('BIRD', 'BIRDS', 'bird', 'bird_2'),
         CreateTask('BRACELET', 'BRACELETS', 'bracelet', 'bracelet_2'),
         CreateTask('DEER', '', 'deer'),
         CreateTask('DRAGON', 'DRAGONS', 'dragon', 'dragon_2'),
         CreateTask('DRAGONFLY', '', 'dragonfly'),
         CreateTask('ELEPHANT', 'ELEPHANTS', 'elephant', 'elephant_2'),
         CreateTask('FAN', 'FANS', 'fan', 'fan_2', 'fan_3', 'fan_4', 'fan_5'),
         CreateTask('FISH', 'FISHES', 'fish', 'fish_2'),
         CreateTask('GRAPES', 'GRAPES', 'grapes', 'grapes_2'),
         CreateTask('SIMBOL', '', 'Ieroglif'),
         CreateTask('KNIFE', 'KNIFES', 'knife', 'knife_2'),
         CreateTask('LIZARD', '', 'lizard'),
         CreateTask('BEADS', 'BEADS', 'rosary', 'rosary_2', 'rosary_3'),
         CreateTask('SCROLL', 'SCROLLS', 'scroll', 'scroll_2'),
         CreateTask('SNAKE', 'SNAKES', 'snake', 'snake_2'),
         CreateTask('URN', '', 'vase_4'),
         CreateTask('VASE', 'VASES', 'vase', 'vase_2', 'vase_3')
        )
    pf:IgnoreOnTestPoint('layer_fan_5')
    ---------------------------------------------------------------------------------------------
    pf:GetObject('curtain'):SetOpacity(1)
    pf:GetObject('curtain_unfasten'):SetOpacity(1)
    local clickOnCurtain = function(save)
        if save then
            pf:GetObject('curtain'):SetOpacity(0)
        else
            pf:GetObject('curtain'):ChangeOpacity(1, 0, 0.3)
            MakeSoundEntity('28_move_curtain'):Play(false)
        end
    end
    RegisterActiveObject('curtain', clickOnCurtain, false, GetCursorArms())
    ---------------------------------------------------------------------------------------------
    pf:GetObject('lantern_japanese'):GetAnimation():SetColor('0xFFFFFFFF')
    pf:GetObject('lantern_japanese'):SetOpacity(1)
    pf:GetObject('lantern_japanese_half'):SetOpacity(0)
    pf:GetObject('layer_cube'):SetOpacity(0)
    pf:GetObject('layer_empty_cube'):SetOpacity(0)
    pf:GetObject('key_in_cube'):SetOpacity(0)
    local apply_action_sword = function(save)
                                    if save then
                                        pf:GetObject('lantern_japanese'):SetOpacity(0)
                                        pf:GetObject('lantern_japanese_half'):SetOpacity(1)
                                        pf:GetObject('layer_cube'):SetOpacity(1)
                                    else
                                        pf:GetObject('lantern_japanese'):ChangeOpacity(1, 0, 0.3)
                                        pf:GetObject('lantern_japanese_half'):ChangeOpacity(0, 1, 0.1)
                                        pf:GetObject('layer_cube'):ChangeOpacity(0, 1, 0.1)
                                        
                                        MakeSoundEntity('28_cut_sword'):Play(false)
                                    end
                               end
    local photo_sword = CreatePhotoZone('sword', 'SWORD', 'sword_photo', nil, 'lantern_japanese', apply_action_sword)
    pf:IgnoreOnTestPoint('lantern_japanese_half')
    pf:IgnoreOnTestPoint('layer_cube')
    ---------------------------------------------------------------------------------------------
    RegisterMiniGame(PATH_MINIGAME_28_DRAGON, function()
                                                LoadMiniGames(PATH_MINIGAME_28_DRAGON)
                                            end )
    if IsMiniGamePlay(PATH_MINIGAME_28_DRAGON) then
        OnMinigameCompleted(PATH_MINIGAME_28_DRAGON)
    end
    ---------------------------------------------------------------------------------------------
    local clickOnCube = function(save)
        if save then
        else
            PlayRegisterMiniGame(PATH_MINIGAME_28_DRAGON)
        end
    end
    RegisterActiveObject('pixel_cube', clickOnCube, false, GetCursorArms())
    ---------------------------------------------------------------------------------------------
    pf:GetObject('bulb_air_in_chest'):SetOpacity(0)
    apply_action_bulb_air = function(save)
                            if save then
                                pf:GetObject('bulb_air_in_chest'):SetOpacity(1)
                            else
                                game_state.chain_use_bulb.Play()
                                pf:GetObject('bulb_air_in_chest'):ChangeOpacity(0, 1, 0.3)
                                NotesFound('Notes_17')
                                MakeSoundEntity('28_insert_artefact'):Play(false)
                            end
                       end
    local photo_air     = CreatePhotoZoneEx(nil, 'bulb_air', 'BULB_AIR', 'photo_bulb_air', nil, nil, apply_action_bulb_air)
    photo_air.zone.SetPhotoMade()
    ---------------------------------------------------------------------------------------------
    local photo_water   = CreatePhotoZoneEx(nil, 'bulb_water', 'BULB_WATER', 'photo_bulb_water', nil, nil, nil)
    photo_water.zone.SetPhotoMade()
    ---------------------------------------------------------------------------------------------
    pf:IgnoreOnTestPoint('pixel_use_bulb')
    pf:IgnoreOnTestPoint('chest_close')
    pf:IgnoreOnTestPoint('chest_open')
    pf:IgnoreOnTestPoint('layer_bulb_air')
    pf:GetObject('chest_open'):GetAnimation():SetColor('0xFFFFFFFF')
    pf:GetObject('chest_close'):GetAnimation():SetColor('0xFFFFFFFF')
    pf:GetObject('chest_close'):SetOpacity(1)
    pf:GetObject('chest_open'):SetOpacity(0)
    pf:GetObject('layer_bulb_air'):SetOpacity(0)
    local photo_action_key = function(save)
                                local state = game_state.scene_path
                                local value = 'TakeKey'
                                if HasGameState(state, value) == false then
                                    AddGameState(state, value)
                                end
                            end
    local apply_action_key = function(save)
                            local state = game_state.scene_path
                            local value = 'UseKey'
                            if HasGameState(state, value) == false then
                                AddGameState(state, value)
                            end
    
                            if save then
                                pf:GetObject('chest_open'):SetOpacity(1)
                                pf:GetObject('layer_bulb_air'):SetOpacity(1)
                                pf:GetObject('chest_close'):SetOpacity(0)
                            else
                                pf:GetObject('chest_open'):ChangeOpacity(0, 1, 0.2)
                                pf:GetObject('layer_bulb_air'):ChangeOpacity(0, 1, 0.2)
                                pf:GetObject('chest_close'):ChangeOpacity(1, 0, 0.2)
                                
                                MakeSoundEntity('28_open_chest'):Play(false)
                            end
                            pf:IgnoreOnTestPoint('pixel_use_key')
                            pf:DoNotIgnoreOnTestPoint('pixel_use_bulb')
                            
                            ActivatePhotoZone(photo_air, 'pixel_use_bulb')
                       end
    local photo_key = CreatePhotoZoneEx('key_in_cube', 'key_tool', 'KEY', 'key_photo', photo_action_key, 'pixel_use_key', apply_action_key)
    ---------------------------------------------------------------------------------------------
    game_state.chain_on_shown = RegisterComicsEx(function()
                                                    LoadComicsWithOneSMS(PATH_COMICS_28_ON_SHOWN, 'COMICS_28_ON_SHOWN')
                                                 end )
    game_state.chain_key = RegisterComicsEx(function()
	                                                LoadComicsWithOneReplicHeroes(PATH_COMICS_28_KEY, 'COMICS_28_KEY')
	                                          end )
    SetHintComicsPhotoZoneEx(photo_key, game_state.chain_key)
    game_state.chain_use_bulb = RegisterComicsEx(function()
	                                                LoadComicsWithOneReplicHeroes(PATH_COMICS_28_USE_BULB, 'COMICS_28_USE_BULB')
	                                             end )
    game_state.chain_use_bulb.OnHidden = function()
        OnWin()
    end
    game_state.chain_no_bulb = RegisterComicsEx(function()
	                                                LoadComicsWithOneReplicHeroes(PATH_COMICS_28_NO_BULB, 'COMICS_28_NO_BULB')
	                                          end )	                                             
    SetHintComicsPhotoZoneEx(photo_air, game_state.chain_no_bulb)
    game_state.chain_sword = RegisterComicsEx(function()
	                                                LoadComicsWithOneReplicHeroes(PATH_COMICS_28_SWORD, 'COMICS_28_SWORD')
	                                          end )	                                             
    SetHintComicsPhotoZoneEx(photo_sword, game_state.chain_sword)
    ---------------------------------------------------------------------------------------------
    pf:IgnoreOnTestPoint('candle_1')        pf:GetObject('candle_1'):GetAnimation():SetSpeed(9)
    pf:IgnoreOnTestPoint('candle_2')        pf:GetObject('candle_2'):GetAnimation():SetSpeed(9.5)
    pf:IgnoreOnTestPoint('candle_3')        pf:GetObject('candle_3'):GetAnimation():SetSpeed(10)
    pf:IgnoreOnTestPoint('candle_4')        pf:GetObject('candle_4'):GetAnimation():SetSpeed(10.2)
    pf:IgnoreOnTestPoint('candle_5')        pf:GetObject('candle_5'):GetAnimation():SetSpeed(10.5)
    pf:IgnoreOnTestPoint('candle_6')        pf:GetObject('candle_6'):GetAnimation():SetSpeed(11)
    pf:IgnoreOnTestPoint('aroma_1')         pf:GetObject('aroma_1'):GetAnimation():SetSpeed(11.5)
    pf:IgnoreOnTestPoint('aroma_2')         pf:GetObject('aroma_2'):GetAnimation():SetSpeed(12.5)
    ---------------------------------------------------------------------------------------------
end

function OnSceneFree()
    FreeData()
end

function OnScreenShown(fade_out)
    if fade_out then
        game_state.chain_on_shown.Play()
    end
end

function OnHiddenComics()
end

function OnMinigameCompleted(mini_game)
    if mini_game == PATH_MINIGAME_28_DRAGON then
        play_field:GetObject('layer_empty_cube'):SetOpacity(1)
        play_field:GetObject('key_in_cube'):SetOpacity(1)
        
        local state = game_state.scene_path
        if HasGameState(state, 'UseKey') or HasGameState(state, 'TakeKey') then
            return
        end
        
        local phone = play_field:GetLevelScreen():GetPhone()
        phone:MakePhoto( play_field:GetObject('key_in_cube') )
    end
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
end

function OnLose()
end

function OnExit()
end

function OnButtonMouseEnter(title)
end

function OnButtonMouseLeave(title)
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    obj_name = object:GetName()
    local pf = play_field
    local is_wrong_click = true

    is_wrong_click = DefaultOnObjectMouseDown(object)
    
    return is_wrong_click
end

function OnObjectMouseUp(object)
end

function OnObjectRightMouseDown(object)
end

function OnObjectRightMouseUp(object)
end

function OnObjectFound(object)
    DefaultOnObjectFound(object)
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel(object)
end

function OnPhotographing()
	DefaultOnPhotographing()
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function OnLostFocus()
end

function OnGainFocus()
end

function OnWin()
    if  play_field:GetLevelScreen():IsCompleteLevel() and
        play_field:GetObject('bulb_air_in_chest'):GetOpacity() == 1
    then
        OnWinLevel()
    end
end

-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData(screen)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/bg.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg',anim,512,384,70,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/curtain.png',0,0,203,366,1,0)
	anim:SetHotSpot(101,183)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('curtain',anim,925,183,190,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/curtain_unfasten.png',0,0,143,252,1,0)
	anim:SetHotSpot(71,126)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('curtain_unfasten',anim,954,126,160,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/lantern_japanese.png',0,0,179,368,1,0)
	anim:SetHotSpot(89,184)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lantern_japanese',anim,751,185,160,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/lantern_japanese_half.png',0,0,269,197,1,0)
	anim:SetHotSpot(134,98)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lantern_japanese_half',anim,748,100,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/sword.png',0,0,111,269,1,0)
	anim:SetHotSpot(55,134)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sword',anim,961,163,155,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/photo/sword_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('sword_photo',anim,-14,834,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/cube.png',0,0,76,121,1,0)
	anim:SetHotSpot(38,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube',anim,756,140,150,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/layer_cube.png',0,0,119,99,1,0)
	anim:SetHotSpot(59,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_cube',anim,747,106,1850,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_cube',anim,755,166,155,0,9,9)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/layer_empty_cube.png',0,0,52,65,1,0)
	anim:SetHotSpot(26,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_empty_cube',anim,744,168,158,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/key_in_cube.png',0,0,36,53,1,0)
	anim:SetHotSpot(18,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('key_in_cube',anim,744,167,160,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/photo/key_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('key_photo',anim,-32,855,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/banana.png',0,0,82,29,1,0)
	anim:SetHotSpot(41,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('banana',anim,639,462,99,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/banana_2.png',0,0,82,33,1,0)
	anim:SetHotSpot(41,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('banana_2',anim,974,555,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/banana_3.png',0,0,81,37,1,0)
	anim:SetHotSpot(40,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('banana_3',anim,409,690,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bird.png',0,0,60,116,1,0)
	anim:SetHotSpot(30,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bird',anim,983,407,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bird_2.png',0,0,64,37,1,0)
	anim:SetHotSpot(32,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bird_2',anim,392,433,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bracelet.png',0,0,58,44,1,0)
	anim:SetHotSpot(29,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bracelet',anim,250,707,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bracelet_2.png',0,0,63,46,1,0)
	anim:SetHotSpot(31,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bracelet_2',anim,702,405,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/deer.png',0,0,36,33,1,0)
	anim:SetHotSpot(18,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('deer',anim,385,396,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/dragon.png',0,0,63,70,1,0)
	anim:SetHotSpot(31,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dragon',anim,830,321,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/dragon_2.png',0,0,91,71,1,0)
	anim:SetHotSpot(45,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dragon_2',anim,739,726,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/dragonfly.png',0,0,60,46,1,0)
	anim:SetHotSpot(30,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dragonfly',anim,560,162,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/elephant.png',0,0,92,72,1,0)
	anim:SetHotSpot(46,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('elephant',anim,694,452,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/elephant_2.png',0,0,72,49,1,0)
	anim:SetHotSpot(36,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('elephant_2',anim,325,219,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fan.png',0,0,91,60,1,0)
	anim:SetHotSpot(45,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan',anim,869,412,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fan_2.png',0,0,89,65,1,0)
	anim:SetHotSpot(44,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan_2',anim,633,31,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fan_3.png',0,0,101,70,1,0)
	anim:SetHotSpot(50,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan_3',anim,328,558,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fan_4.png',0,0,83,53,1,0)
	anim:SetHotSpot(41,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan_4',anim,300,269,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fan_5.png',0,0,95,77,1,0)
	anim:SetHotSpot(47,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan_5',anim,872,602,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fish.png',0,0,71,50,1,0)
	anim:SetHotSpot(35,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fish',anim,373,30,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/fish_2.png',0,0,60,27,1,0)
	anim:SetHotSpot(30,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fish_2',anim,367,755,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/grapes.png',0,0,65,36,1,0)
	anim:SetHotSpot(32,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('grapes',anim,868,480,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/grapes_2.png',0,0,65,46,1,0)
	anim:SetHotSpot(32,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('grapes_2',anim,231,398,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/Ieroglif.png',0,0,48,43,1,0)
	anim:SetHotSpot(24,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Ieroglif',anim,281,163,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/knife.png',0,0,76,42,1,0)
	anim:SetHotSpot(38,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('knife',anim,450,386,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/knife_2.png',0,0,133,51,1,0)
	anim:SetHotSpot(66,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('knife_2',anim,492,741,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/lizard.png',0,0,30,53,1,0)
	anim:SetHotSpot(15,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lizard',anim,738,319,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/rosary.png',0,0,59,35,1,0)
	anim:SetHotSpot(29,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rosary',anim,762,519,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/rosary_2.png',0,0,69,48,1,0)
	anim:SetHotSpot(34,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rosary_2',anim,296,664,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/rosary_3.png',0,0,64,38,1,0)
	anim:SetHotSpot(32,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rosary_3',anim,913,756,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/scroll.png',0,0,128,62,1,0)
	anim:SetHotSpot(64,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scroll',anim,684,663,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/scroll_2.png',0,0,58,75,1,0)
	anim:SetHotSpot(29,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scroll_2',anim,262,569,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/snake.png',0,0,69,116,1,0)
	anim:SetHotSpot(34,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snake',anim,764,427,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/snake_2.png',0,0,71,50,1,0)
	anim:SetHotSpot(35,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snake_2',anim,252,522,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/vase.png',0,0,73,70,1,0)
	anim:SetHotSpot(36,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase',anim,654,711,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/vase_2.png',0,0,44,91,1,0)
	anim:SetHotSpot(22,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase_2',anim,1004,615,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/vase_3.png',0,0,69,71,1,0)
	anim:SetHotSpot(34,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase_3',anim,839,725,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/vase_4.png',0,0,71,110,1,0)
	anim:SetHotSpot(35,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase_4',anim,231,630,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/key_tool.png',0,0,111,100,1,0)
	anim:SetHotSpot(55,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('key_tool',anim,55,627,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/chest_close.png',0,0,441,277,1,0)
	anim:SetHotSpot(220,138)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('chest_close',anim,587,627,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/chest_open.png',0,0,441,375,1,0)
	anim:SetHotSpot(220,187)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest_open',anim,587,580,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/photo/photo_bulb_air.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('photo_bulb_air',anim,-42,866,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bulb_air.png',0,0,98,137,1,0)
	anim:SetHotSpot(49,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bulb_air',anim,66,520,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_use_key',anim,470,607,115,0,12,12)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_use_bulb',anim,494,587,120,0,18,10)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bulb_air.png',0,0,98,137,1,0)
	anim:SetHotSpot(49,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bulb_air_in_chest',anim,493,580,190,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/layer_bulb_air.png',0,0,117,89,1,0)
	anim:SetHotSpot(58,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_bulb_air',anim,491,618,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/layers/layer_fan_5.png',0,0,51,65,1,0)
	anim:SetHotSpot(25,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_fan_5',anim,901,592,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/photo/photo_bulb_water.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('photo_bulb_water',anim,13,834,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/items/bulb_water.png',0,0,89,108,1,0)
	anim:SetHotSpot(44,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bulb_water',anim,21,403,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/candle_1.png',0,0,36,39,12,10)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_1',anim,290,436,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/candle_1.png',0,0,36,39,12,10)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_2',anim,390,444,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/candle_1.png',0,0,36,39,12,10)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_3',anim,514,458,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/candle_1.png',0,0,36,39,12,10)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_4',anim,610,468,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/candle_1.png',0,0,36,39,12,10)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_5',anim,823,487,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/candle_1.png',0,0,36,39,12,10)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle_6',anim,908,495,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/aroma_1.png',0,0,145,221,22,12)
	anim:SetHotSpot(72,110)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('aroma_1',anim,848,421,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/28_buddha_/anim/aroma_2.png',0,0,103,158,22,12)
	anim:SetHotSpot(51,79)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('aroma_2',anim,926,467,120,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
