dofile('data/Scenes/33_entrance_temple_Anim_Crystal.lua')
dofile('data/Scenes/33_entrance_temple_Anim_Background.lua')

local PATH_COMICS_33_ON_SHOWN       = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_33_ON_WIN         = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_33_CRISTAL        = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_33_CLOSE_DOOR     = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_33_NO_CRISTAL     = 'data/Scenes/Comics/HelpersComicsReplic.lua'

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

    local pf = play_field
    local level = pf:GetLevelScreen()
    ---------------------------------------------------------------------------------------------
	AddRandomTasks(15,
         CreateTask('ARROW', '', 'arrow'),
         CreateTask('AXE', '', 'ax'),
         CreateTask('SACK', '', 'bag'),
         CreateTask('BASKET', '', 'basket'),
         CreateTask('BOW', '', 'bow'),
         CreateTask('BUCKET', '', 'bucket'),
         CreateTask('BUG', '', 'bug'),
         CreateTask('BUTTERFLY', '', 'butterfly'),
         CreateTask('CACTUS', '', 'cactus'),
         CreateTask('CHEST', '', 'chest'),
         CreateTask('CHIMERA', 'CHIMERAS', 'chimera_1', 'chimera_2'),
         CreateTask('COCONUT', '', 'coconut'),
         CreateTask('COMPASS', '', 'compass'),
         CreateTask('CROWN', '', 'crown'),
         CreateTask('DRUM', '', 'drum'),
         CreateTask('FUNGI', '', 'fungi'),
         CreateTask('HELMET', '', 'helmet'),
         CreateTask('JUG', '', 'jug'),
         CreateTask('LANTERN', '', 'lantern'),
         CreateTask('MASK', '', 'mask'),
         CreateTask('NEST', '', 'nest'),
         CreateTask('OWL', '', 'owl'),
         CreateTask('SHOVEL', '', 'shovel'),
         CreateTask('SKELETON', '', 'skeleton'),
         CreateTask('SNAKE', '', 'snake'),
         CreateTask('STAFF', '', 'staff'),
         CreateTask('TULIP', '', 'tulip'),
         CreateTask('WHEEL', '', 'wheel')
         )
	---------------------------------------------------------------------------------------------
	pf:GetObject('crystal_in_loc_1'):SetOpacity(0)
	pf:GetObject('crystal_in_loc_2'):SetOpacity(0)
	pf:GetObject('crystal_in_loc_3'):SetOpacity(0)
	---------------------------------------------------------------------------------------------
	local anim_door = createCompositionOpenDoor()
    anim_door:AttachTo(screen)
    anim_door:SetZ(85)
    game_state.anim_door = anim_door
    ---------------------------------------------------------------------------------------------
	local zone_crystal = CreateZoomZone('close_zone_crystal',
                                        'pixel_open_crystal',
                                        'bg_zoom_crystal',
                                        'pixel_target_crystal_1',
                                        'pixel_target_crystal_2',
                                        'pixel_target_crystal_3'
                                       )
    pf:GetObject('pixel_target_crystal_1'):SetMaxOpacity(0.001)
    pf:GetObject('pixel_target_crystal_2'):SetMaxOpacity(0.001)
    pf:GetObject('pixel_target_crystal_3'):SetMaxOpacity(0.001)
    zone_crystal.OnHidden = function()
        if IsPutAllCristal() then
            local duration = anim_door:GetDuration()
            anim_door:Play()
            MakeSoundEntity('33_open_door'):Play(false)
            TimerDo(pf:GetTimer(), duration, function() OnWin() end)
        end
    end
    game_state.zone_crystal = zone_crystal
	---------------------------------------------------------------------------------------------
	local crystal_1 = createCompositionCrystal_1()
    crystal_1:AttachTo( pf:GetObject('bg_zoom_crystal') )
    crystal_1:SetZ(800)
    crystal_1:SetXY(-320, -240 )
    
    local crystal_2 = createCompositionCrystal_2()
    crystal_2:AttachTo( pf:GetObject('bg_zoom_crystal') )
    crystal_2:SetZ(800)
    crystal_2:SetXY(-320, -240 )
    
    local crystal_3 = createCompositionCrystal_3()
    crystal_3:AttachTo( pf:GetObject('bg_zoom_crystal') )
    crystal_3:SetZ(800)
    crystal_3:SetXY(-320, -240 )
    
    local crystal_all = createCompositionzoom_lok_33()
    crystal_all:AttachTo( pf:GetObject('bg_zoom_crystal') )
    crystal_all:SetZ(800)
    crystal_all:SetXY(-320, -240 )
    game_state.crystal_all = crystal_all

    local anim_bg = createCompositionlok33()
    anim_bg:AttachTo( screen )
    anim_bg:SetZ(800)
    anim_bg:Play()
    
    local rat_eating = createCompositionrat_eatingComp1()
    rat_eating:AttachTo( screen )
    rat_eating:SetZ(550)
    rat_eating:Play()
    
    local spider_move = createCompositionSpiderMove()
    spider_move:AttachTo( screen )
    spider_move:SetZ(550)
    spider_move:Play()
    PlayCompositionPeriodicallyVsRandDelay(spider_move, 2, 10)
    
    local dust = createCompositionair_dust()
    dust:AttachTo( screen )
    dust:SetZ(850)
    dust:Play()
    dust:SetCyclic(true)

	---------------------------------------------------------------------------------------------
    local apply_action_crystal_1 = function(save)
                                        if save then
                                            crystal_1:Rewind(true)
                                            PutCristal(1)
                                        else
                                            local duration_comp = 3 -- crystal_1:GetDuration()
                                            crystal_1:Play()
                                            zone_crystal.Blocked(duration_comp)
                                            TimerDo(pf:GetTimer(), duration_comp * 0.9, function()
                                                                                    PutCristal(1)
                                                                                    CheckOpenDoor()
                                                                                  end )
                                            local s = MakeSoundEntity('33_input_cristall')
                                            s:Play(false)
                                        end
                                        
                                        pf:GetObject('crystal_in_loc_1'):SetOpacity(1)
                                   end
    local photo_crystal_1 = CreatePhotoZoneEx('crystal_find_1', 'crystal_find_1_tool',
                                            'CRYSTAL',
                                            'crystal_find_1_photo',
                                            nil, 'pixel_target_crystal_1', apply_action_crystal_1)
    ---------------------------------------------------------------------------------------------
    local apply_action_crystal_2 = function(save)
                                        if save then
                                            crystal_2:Rewind(true)
                                            PutCristal(2)
                                        else
                                            local duration_comp = 3 -- crystal_2:GetDuration()
                                            crystal_2:Play()
                                            zone_crystal.Blocked(duration_comp)
                                            TimerDo(pf:GetTimer(), duration_comp * 0.9, function()
                                                                                    PutCristal(2)
                                                                                    CheckOpenDoor()
                                                                                  end )
                                            local s = MakeSoundEntity('33_input_cristall')
                                            s:Play(false)
                                        end
                                        
                                        pf:GetObject('crystal_in_loc_2'):SetOpacity(1)
                                   end
    local photo_crystal_2 = CreatePhotoZoneEx('crystal_find_2', 'crystal_find_2_tool',
                                            'CRYSTAL', 
                                            'crystal_find_2_photo',
                                            nil, 'pixel_target_crystal_2', apply_action_crystal_2)
    ---------------------------------------------------------------------------------------------
    local apply_action_crystal_3 = function(save)
                                        if save then
                                            crystal_3:Rewind(true)
                                            PutCristal(3)
                                        else
                                            local duration_comp = 3 -- crystal_3:GetDuration()
                                            crystal_3:Play()
                                            zone_crystal.Blocked(duration_comp)
                                            TimerDo(pf:GetTimer(), duration_comp * 0.9, function()
                                                                                    PutCristal(3)
                                                                                    CheckOpenDoor()
                                                                                  end )
                                            local s = MakeSoundEntity('33_input_cristall')
                                            s:Play(false)
                                        end
                                        
                                        pf:GetObject('crystal_in_loc_3'):SetOpacity(1)
                                   end
    local photo_crystal_3 = CreatePhotoZone('crystal_find_3',
                                            'CRYSTAL', 
                                            'crystal_find_3_photo',
                                            nil, 'pixel_target_crystal_3', apply_action_crystal_3)
    SetTextPlural('CRYSTAL', 'CRYSTALS')
	---------------------------------------------------------------------------------------------
	game_state.chain_on_shown = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_33_ON_SHOWN, 'COMICS_33_ON_SHOWN')
                                                 end )
    game_state.chain_on_win = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_33_ON_WIN, 'COMICS_33_ON_WIN')
                                                 end )
    game_state.chain_on_win.OnHidden = function()
        OnWinLevel()
    end
    game_state.chain_cristal = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_33_CRISTAL, 'COMICS_33_CRISTAL')
                                                 end )
    game_state.chain_close_door = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_33_CLOSE_DOOR, 'COMICS_33_CLOSE_DOOR')
                                                 end )
    game_state.chain_no_cristal = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_33_NO_CRISTAL, 'COMICS_33_NO_CRISTAL')
                                                 end )
    SetHintComicsPhotoZoneEx(photo_crystal_1, game_state.chain_no_cristal)
    SetHintComicsPhotoZoneEx(photo_crystal_2, game_state.chain_no_cristal)
    SetHintComicsPhotoZoneEx(photo_crystal_3, game_state.chain_no_cristal)
    ---------------------------------------------------------------------------------------------
    local clickOnCloseDoor = function(save)
        if not save then
            game_state.chain_close_door.Play()
        end
    end
    RegisterActiveObject('pixel_close_door', clickOnCloseDoor, true, GetCursorArms())
    ---------------------------------------------------------------------------------------------
    if IsPutAllCristal() then
        UnregisterZoomZone(zone_crystal)
        anim_door:Rewind(true)
        UnregisterActiveObject('pixel_close_door')
    end
    ---------------------------------------------------------------------------------------------
end

function PutCristal(cristal)
    local state = game_state.scene_path
    local value = 'PutCristal_'..cristal
    AddGameState(state, value)
end

function IsPutCristal(cristal)
    local state = game_state.scene_path
    local value = 'PutCristal_'..cristal
    
    return HasGameState(state, value)
end

function IsPutAllCristal()
    return IsPutCristal(1) and IsPutCristal(2) and IsPutCristal(3)
end

function CheckOpenDoor()
    if IsPutAllCristal() then
        local duration_comp = 5 -- game_state.crystal_all:GetDuration()
        game_state.crystal_all:Play()
        game_state.zone_crystal.Blocked(duration_comp)
        TimerDo(play_field:GetTimer(), duration_comp, function()
                                                            DisableZoomZoneRequest(game_state.zone_crystal)
                                                      end)
        UnregisterActiveObject('pixel_close_door')
        MakeSoundEntity('33_put_all_cristall'):Play(false)
    end
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)
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
       IsPutAllCristal() and
       game_state.anim_door:IsPaused()
    then
        game_state.chain_on_win.Play()
    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/33_entrance_temple_/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/33_entrance_temple_/Items/arrow.png',0,0,119,40,1,0)
	anim:SetHotSpot(59,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('arrow',anim,953,62,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/ax.png',0,0,45,126,1,0)
	anim:SetHotSpot(22,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ax',anim,359,536,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/bag.png',0,0,102,103,1,0)
	anim:SetHotSpot(51,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bag',anim,364,585,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/basket.png',0,0,146,98,1,0)
	anim:SetHotSpot(73,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('basket',anim,497,717,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/bow.png',0,0,153,141,1,0)
	anim:SetHotSpot(76,70)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bow',anim,800,75,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/bucket.png',0,0,81,95,1,0)
	anim:SetHotSpot(40,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bucket',anim,735,296,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/bug.png',0,0,65,69,1,0)
	anim:SetHotSpot(32,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug',anim,859,693,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/butterfly.png',0,0,57,52,1,0)
	anim:SetHotSpot(28,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('butterfly',anim,905,450,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/cactus.png',0,0,47,124,1,0)
	anim:SetHotSpot(23,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cactus',anim,221,565,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/chest.png',0,0,105,67,1,0)
	anim:SetHotSpot(52,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest',anim,613,552,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/chimera_1.png',0,0,52,58,1,0)
	anim:SetHotSpot(26,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chimera_1',anim,580,218,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/coconut.png',0,0,65,53,1,0)
	anim:SetHotSpot(32,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coconut',anim,229,743,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/compass.png',0,0,64,52,1,0)
	anim:SetHotSpot(32,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('compass',anim,715,595,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/crown.png',0,0,81,54,1,0)
	anim:SetHotSpot(40,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crown',anim,817,625,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/fungi.png',0,0,64,56,1,0)
	anim:SetHotSpot(32,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fungi',anim,815,487,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/helmet.png',0,0,89,70,1,0)
	anim:SetHotSpot(44,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('helmet',anim,552,530,250,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/jug.png',0,0,91,63,1,0)
	anim:SetHotSpot(45,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('jug',anim,971,738,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/lantern.png',0,0,47,123,1,0)
	anim:SetHotSpot(23,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lantern',anim,953,366,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/mask.png',0,0,77,93,1,0)
	anim:SetHotSpot(38,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mask',anim,890,315,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/nest.png',0,0,89,74,1,0)
	anim:SetHotSpot(44,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('nest',anim,905,160,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/owl.png',0,0,100,90,1,0)
	anim:SetHotSpot(50,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('owl',anim,793,219,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/shovel.png',0,0,97,123,1,0)
	anim:SetHotSpot(48,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shovel',anim,591,706,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/skeleton.png',0,0,127,119,1,0)
	anim:SetHotSpot(63,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skeleton',anim,642,426,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/snake.png',0,0,142,67,1,0)
	anim:SetHotSpot(71,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snake',anim,333,729,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/staff.png',0,0,82,296,1,0)
	anim:SetHotSpot(41,148)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('staff',anim,893,622,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/tulip.png',0,0,74,93,1,0)
	anim:SetHotSpot(37,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tulip',anim,958,690,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/wheel.png',0,0,143,73,1,0)
	anim:SetHotSpot(71,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wheel',anim,435,691,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/crystal_find_1.png',0,0,30,45,1,0)
	anim:SetHotSpot(15,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_1',anim,276,577,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/crystal_find_2.png',0,0,30,56,1,0)
	anim:SetHotSpot(15,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_2',anim,866,70,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/crystal_find_3.png',0,0,39,38,1,0)
	anim:SetHotSpot(19,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_3',anim,966,603,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Photo/crystal_find_1_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_1_photo',anim,103,607,10,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Photo/crystal_find_2_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_2_photo',anim,101,608,10,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Photo/crystal_find_3_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_3_photo',anim,101,607,10,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_open_crystal',anim,493,335,200,0,12,9)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/ZoomCrystal/bg_zoom_crystal.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('bg_zoom_crystal',anim,512,384,700,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('0x00FFFFFF')
	screen:CreateObject('pixel_target_crystal_1',anim,659,405,7200,0,11,18)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel_target_crystal_2',anim,371,403,720,0,11,18)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel_target_crystal_3',anim,507,423,720,0,14,14)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Layers/crystal_in_loc_1.png',0,0,18,22,1,0)
	anim:SetHotSpot(9,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_in_loc_1',anim,511,334,350,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Layers/crystal_in_loc_2.png',0,0,18,25,1,0)
	anim:SetHotSpot(9,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_in_loc_2',anim,470,335,350,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Layers/crystal_in_loc_3.png',0,0,19,21,1,0)
	anim:SetHotSpot(9,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_in_loc_3',anim,491,337,350,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_close_door',anim,488,432,220,0,15,19)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Layers/layer_bucket.png',0,0,36,30,1,0)
	anim:SetHotSpot(18,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_bucket',anim,753,260,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Layers/layer_lantern.png',0,0,47,48,1,0)
	anim:SetHotSpot(23,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_lantern',anim,963,319,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/crystal_find_1.png',0,0,30,45,1,0)
	anim:SetHotSpot(15,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_1_tool',anim,47,715,1000,13,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/crystal_find_2.png',0,0,30,56,1,0)
	anim:SetHotSpot(15,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crystal_find_2_tool',anim,93,719,1000,175,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/chimera_2.png',0,0,61,82,1,0)
	anim:SetHotSpot(30,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chimera_2',anim,326,230,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/33_entrance_temple_/Items/drum.png',0,0,107,90,1,0)
	anim:SetHotSpot(53,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('drum',anim,296,606,110,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
