local PATH_COMICS_23_ON_SHOWN              = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
local PATH_COMICS_23_TORCH	               = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
local PATH_COMICS_23_TORCH_FIRED           = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
local PATH_COMICS_23_HOLE		           = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
local PATH_COMICS_23_ON_HOLES_FILLED	   = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua'
local PATH_COMICS_23_GOLOVA                = 'data/Scenes/Comics/HelpersComicsOneReplicHeroes.lua' 

local PATH_MINIGAME_23_TOOTH               = 'data/Scenes/MiniGames/23_statues_tooth.lua'

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

    local pf = play_field
    local level = pf:GetLevelScreen()

	AddRandomTasks(13,
               CreateTask('AXE', '', 'axe'),
               CreateTask('DRUM', 'DRUMS', 'drum2', 'drum'),               
               CreateTask('HORSE', '', 'horse'),
               CreateTask('NATIVE_HEADDRESS', '', 'indian_hat'),
               CreateTask('MUSHROOMS', '', 'mushrooms'),
               CreateTask('NECKLACE', '', 'necklace'),
               CreateTask('SCROLL', '', 'scroll'),
               CreateTask('SHIELD', '', 'shield'),
               CreateTask('SKULL', '', 'skull'),
               CreateTask('STRAWBERRIES', '', 'strawberries'),
               CreateTask('TURTLE', '', 'turtle'),
			   CreateTask('COIN', '', 'coin'),
			   CreateTask('QUIVER', '', 'quiver')
	)
	---------------------------------------------------------------------------------------------	
    zone_cave = CreateZoomZone('close_zone_cave',
                               'pixel_cave',
                               'ZoomCaveBg',
                               'stena',
							   'stena_layer',
                               'richagi_zakr',
							   'richagi_otkr',
							   'golova_01',
							   'golova_02',
							   'fakel',
							   'pixel_pazl1',
							   'pixel_pazl2',
							   'pixel_pazl3',
							   'pazl_01',
							   'pazl_02',
							   'pazl_03',
							   'mask',
							   'fire_cave'
							   )
	pf:IgnoreOnTestPoint('mask')
	pf:GetObject('golova_02'):SetOpacity(0)
	pf:GetObject('golova_02'):SetMaxOpacity(0)
	pf:GetObject('fakel'):Hide()
	pf:GetObject('fire_cave'):Hide()
	pf:GetObject('richagi_otkr'):SetOpacity(0)
	pf:GetObject('richagi_otkr'):SetMaxOpacity(0)
	pf:GetObject('pazl_01'):SetMaxOpacity(0)
	pf:GetObject('pazl_02'):SetMaxOpacity(0)
	pf:GetObject('pazl_03'):SetMaxOpacity(0)	
	pf:IgnoreOnTestPoint('pazl_01')
	pf:IgnoreOnTestPoint('pazl_02')
	pf:IgnoreOnTestPoint('pazl_03')
	pf:IgnoreOnTestPoint('golova_01')
    ---------------------------------------------------------------------------------------------
	pf:GetObject('pixel_pazl1'):SetMaxOpacity(0.01)
	pf:GetObject('pixel_pazl2'):SetMaxOpacity(0.01)
	pf:GetObject('pixel_pazl3'):SetMaxOpacity(0.01)
	---------------------------------------------------------------------------------------------	
	local photo_action_button1 = function()                                	                                
                             end
    local apply_action_button1 = function(save, target)
								local obj = pf:GetObject('pazl_01')
								if target == 'pixel_pazl1' then
									obj:SetXY(522, 370)
								elseif target == 'pixel_pazl2' then
									obj:SetXY(597, 370)
								elseif target == 'pixel_pazl3' then
									obj:SetXY(674, 370)
								end								
								obj:SetMaxOpacity(1)
								obj:GetAnimation():SetColor('0xFFFFFFFF')
								obj:Show()
								if save then
									obj:SetMaxOpacity(1)
								else
									MakeSoundEntity('23_insert_squares'):Play(false)
									obj:ChangeOpacity(0, 1, 0.3)									
								end
                             end
	
	local photo_button1 = CreatePhotoZoneEx('button1',
											'button1_tool',
											'TILE',
											'button1_photo',
											photo_action_button1,
											nil,
											apply_action_button1)
    ---------------------------------------------------------------------------------------------	
	local photo_action_button2 = function()                                
                             end
    local apply_action_button2 = function(save, target)
								local obj = pf:GetObject('pazl_02')
								if target == 'pixel_pazl1' then
									obj:SetXY(522, 370)
								elseif target == 'pixel_pazl2' then
									obj:SetXY(597, 370)
								elseif target == 'pixel_pazl3' then
									obj:SetXY(674, 370)
								end								
								obj:SetMaxOpacity(1)
								obj:GetAnimation():SetColor('0xFFFFFFFF')
								obj:Show()
								if save then
									obj:SetMaxOpacity(1)
								else
									obj:ChangeOpacity(0, 1, 0.3)	
									MakeSoundEntity('23_insert_squares'):Play(false)
								end
                             end
	
	local photo_button2 = CreatePhotoZoneEx('button2',
											'button2_tool',
											'TILE',
											'button2_photo',
											photo_action_button2,
											nil,
											apply_action_button2)
	---------------------------------------------------------------------------------------------	
	local photo_action_button3 = function()                                
                             end
    local apply_action_button3 = function(save, target)
								local obj = pf:GetObject('pazl_03')
								if target == 'pixel_pazl1' then
									obj:SetXY(522, 370)
								elseif target == 'pixel_pazl2' then
									obj:SetXY(597, 370)
								elseif target == 'pixel_pazl3' then
									obj:SetXY(674, 370)
								end								
								play_field:GetObject('pazl_03'):SetMaxOpacity(1)
								obj:GetAnimation():SetColor('0xFFFFFFFF')
								obj:Show()
								if save then
									obj:SetMaxOpacity(1)
								else
									obj:ChangeOpacity(0, 1, 0.3)
									MakeSoundEntity('23_insert_squares'):Play(false)
								end							
                             end
	
	local photo_button3 = CreatePhotoZoneEx('button3',
											'button3_tool',
											'TILE',
											'button3_photo',
											photo_action_button3,
											nil,
											apply_action_button3)
    SetTextPlural('TILE', 'TILES')
	---------------------------------------------------------------------------------------------	
	pf:GetObject('torch_fired'):SetOpacity(0)
	local photo_action_torch_fired = function()                                
                             end
    local apply_action_torch_fired = function(save)
								local torch = pf:GetObject('fakel')
								torch:Show()
								local fire_cave = play_field:GetObject('fire_cave')
								fire_cave:Show()
								play_field:GetObject('mask'):SetMaxOpacity(0)
								play_field:GetObject('richagi_otkr'):SetMaxOpacity(1)
								play_field:GetObject('richagi_zakr'):SetOpacity(0)
								play_field:GetObject('richagi_zakr'):SetMaxOpacity(0)
								ActivatePhotoZone(photo_button1, {'pixel_pazl1', 'pixel_pazl2', 'pixel_pazl3'})
								ActivatePhotoZone(photo_button2, {'pixel_pazl1', 'pixel_pazl2', 'pixel_pazl3'})
								ActivatePhotoZone(photo_button3, {'pixel_pazl1', 'pixel_pazl2', 'pixel_pazl3'})
								torch:SetMaxOpacity(1)
								fire_cave:SetMaxOpacity(1)
								if save then									
									play_field:GetObject('mask'):SetOpacity(0)
								else
									torch:ChangeOpacity(0, 1, 0.3)
									fire_cave:ChangeOpacity(0, 1, 0.3)
									pf:GetObject('mask'):ChangeOpacity(1, 0, 0.3)
									pf:GetObject('richagi_otkr'):SetOpacity(1)
									MakeSoundEntity('23_insert_torch'):Play(false)
								end
								
								pf:DoNotIgnoreOnTestPoint('pazl_01')
                                pf:DoNotIgnoreOnTestPoint('pazl_02')
                                pf:DoNotIgnoreOnTestPoint('pazl_03')
                                pf:DoNotIgnoreOnTestPoint('golova_01')
                             end
	
	local photo_torch_fired = CreatePhotoZoneEx('torch_fired',
												'torch_fired_tool',
												'TORCH_FIRED',
												'torch_fired_photo',
												photo_action_torch_fired,
												'stena',
												apply_action_torch_fired)
    --photo_corkscrew.zone.SetOffsetHighlight(100, -20)
	pf:IgnoreOnTestPoint('fakel')
	pf:IgnoreOnTestPoint('fire_cave')
	--------------------------------------------------------------------------------------------    
    local clickOnButton1 = function(save)
		local obj = pf:GetObject('pazl_01')
        obj:SetAngle(obj:GetAngle() + M_PI / 2)                
        if obj:GetAngle() >= 2 * M_PI then
            obj:SetAngle(0)
        end
		if not save then
			MakeSoundEntity('23_rotate_square'):Play(false)
		end
    end
    RegisterActiveObject('pazl_01', clickOnButton1, true, GetCursorArms())
	--------------------------------------------------------------------------------------------    
    local clickOnButton2 = function(save)
		local obj = pf:GetObject('pazl_02')
        obj:SetAngle(obj:GetAngle() + M_PI / 2)                        
        if obj:GetAngle() >= 2 * M_PI then
            obj:SetAngle(0)
        end
		if not save then
			MakeSoundEntity('23_rotate_square'):Play(false) 
		end
    end
    RegisterActiveObject('pazl_02', clickOnButton2, true, GetCursorArms())
	--------------------------------------------------------------------------------------------    
    local clickOnButton3 = function(save)
		local obj = pf:GetObject('pazl_03')
        obj:SetAngle(obj:GetAngle() + M_PI / 2)                        
        if obj:GetAngle() >= 2 * M_PI then
            obj:SetAngle(0)
        end
		if not save then
			MakeSoundEntity('23_rotate_square'):Play(false)
		end
    end
    RegisterActiveObject('pazl_03', clickOnButton3, true, GetCursorArms())
    --------------------------------------------------------------------------------------------    
    local clickOnHead = function(save)
        if HasGameState('GateOpened', 'true') or not zone_cave.IsVisible() then
            return
        end
		
		MakeSoundEntity('23_press_lions_head'):Play(false)
		
		local obj = pf:GetObject('golova_01')
		obj:SetOpacity(0)
		obj:SetMaxOpacity(0)        
		local obj = pf:GetObject('golova_02')
		obj:GetAnimation():SetColor('0xFFFFFFFF')
		obj:SetOpacity(1)
		obj:SetMaxOpacity(1)
		if pf:GetObject('pazl_01'):GetAngle() == 0 and
		   pf:GetObject('pazl_02'):GetAngle() == 0 and
		   pf:GetObject('pazl_03'):GetAngle() == 0 then
		   
		   pf:GetObject('richagi_zakr'):SetMaxOpacity(1)
		   pf:GetObject('richagi_zakr'):ChangeOpacity(0, 1, 0.3)
		   pf:GetObject('richagi_otkr'):ChangeOpacity(1, 0, 0.3)
		   TimerDo(play_field:GetTimer(), 0.3, function() 
                                                    pf:GetObject('richagi_otkr'):SetMaxOpacity(0)
                                               end)
		   
		   TimerDo(play_field:GetTimer(), 0.5, function() 
                                                    zone_cave.SetVisible(false)
                                                    pf:GetObject('gates_closed'):ChangeOpacity(1, 0, 0.3)
													pf:GetObject('gates_opened'):ChangeOpacity(0, 1, 0.3)
													UnregisterZoomZone(zone_cave)
													UnregisterActiveObject('pazl_01')
													UnregisterActiveObject('pazl_02')
													UnregisterActiveObject('pazl_03')
													UnregisterActiveObject('golova_01')
													MakeSoundEntity('23_open_gate'):Play(false)
													TimerDo(pf:GetTimer(), 1.5, OnWin)
                                               end)
		   if not HasGameState('GateOpened', 'true') then
				AddGameState('GateOpened', 'true')
		   end
		else
			TimerDo(play_field:GetTimer(), 0.3, function()
													local obj = pf:GetObject('golova_02')
													obj:SetOpacity(0)
													obj:SetMaxOpacity(0)        
													local obj = pf:GetObject('golova_01')
													obj:GetAnimation():SetColor('0xFFFFFFFF')
													obj:SetOpacity(1)
													obj:SetMaxOpacity(1)
													
													if pf:GetObject('pazl_01'):GetOpacity() == 1 and
                                                       pf:GetObject('pazl_02'):GetOpacity() == 1 and
                                                       pf:GetObject('pazl_03'):GetOpacity() == 1 then
													    game_state.chain_golova.Play()
													end
												end)
		end
    end
	if HasGameState('GateOpened', 'true') then
		pf:GetObject('gates_closed'):SetOpacity(0)
		pf:GetObject('gates_opened'):SetOpacity(1)
		UnregisterZoomZone(zone_cave)
		UnregisterActiveObject('pazl_01')
		UnregisterActiveObject('pazl_02')
		UnregisterActiveObject('pazl_03')
		UnregisterActiveObject('golova_01')
	end
    RegisterActiveObject('golova_01', clickOnHead, true, GetCursorArms())
	--------------------------------------------------------------------------------------------    
	pf:GetObject('pixel_fire'):SetOpacity(0)
	pf:GetObject('mouth'):SetOpacity(0)
	pf:GetObject('fire4'):SetOpacity(0)
    local clickOnMouth = function(save)
		local mouth = pf:GetObject('mouth')
		local pixel_fire = pf:GetObject('pixel_fire')
		if save then
			mouth:SetOpacity(1)
			play_field:GetObject('fire4'):SetOpacity(1)
            pixel_fire:SetOpacity(1)			
		else
			mouth:ChangeOpacity(0, 1, 0.3)			
			pixel_fire:ChangeOpacity(0, 1, 0.3)						
			pf:GetObject('fire4'):ChangeOpacity(0, 1, 0.3)			
			PlayRegisterMiniGame(PATH_MINIGAME_23_TOOTH)
		end
    end
    RegisterActiveObject('pixel_mouth', clickOnMouth, false, GetCursorArms())
	--------------------------------------------------------------------------------------------
	local photo_action_torch = function()     
								pf:GetObject('fire_small'):AttachTo(pf:GetObject('torch_fired_tool'))
                             end
    local apply_action_torch = function(save)
                                    if not save then
                                        if not level:GetPhone():HasTool(pf:GetObject('torch_fired_tool')) then
                                            pf:GetObject('torch_fired'):SetOpacity(1)
                                        end
                                        local phone = level:GetPhone()
                                        TimerDo(pf:GetTimer(), 0.1, function()
                                                                    phone:MakePhoto( pf:GetObject('torch_fired') )
                                                                  end)
                                    end
									pf:GetObject('torch_fired_tool'):AttachTo(pf)
                               end
	
	local photo_torch = CreatePhotoZoneEx('torch',
												'torch_tool',
												'TORCH',
												'torch_photo',
												photo_action_torch,
												'pixel_fire',
												apply_action_torch)
    --------------------------------------------------------------------------------------------
    if  not photo_torch.apply_action and 
        photo_torch_fired.apply_action
    then
        photo_torch.zone.SetPhotoMade()
    end
	---------------------------------------------------------------------------------------------
    RegisterComics('COMICS_23_ON_SHOWN', function()
                                            LoadComicsWithOneReplicHeroes(PATH_COMICS_23_ON_SHOWN, 'COMICS_23_ON_SHOWN')
                                        end )
	game_state.chain_torch_fired = RegisterComicsEx(function()
										                LoadComicsWithOneReplicHeroes(PATH_COMICS_23_TORCH_FIRED, 'COMICS_23_TORCH_FIRED')
									                end )
	game_state.chain_torch = RegisterComicsEx(function()
										        LoadComicsWithOneReplicHeroes(PATH_COMICS_23_TORCH, 'COMICS_23_TORCH')
  									          end)
	game_state.chain_hole = RegisterComicsEx(function()
										        LoadComicsWithOneReplicHeroes(PATH_COMICS_23_HOLE, 'COMICS_23_HOLE')
									         end)
    game_state.chain_golova = RegisterComicsEx(function()
										        LoadComicsWithOneReplicHeroes(PATH_COMICS_23_GOLOVA, 'COMICS_23_GOLOVA')
									         end)
    game_state.chain_golova.SetRepeat(true)
										
	RegisterComics('COMICS_23_ON_HOLES_FILLED', function()
                                            LoadComicsWithOneReplicHeroes(PATH_COMICS_23_ON_HOLES_FILLED, 'COMICS_23_ON_HOLES_FILLED');
                                        end )
												
    ---------------------------------------------------------------------------------------------
    SetHintComicsPhotoZoneEx(photo_button1, game_state.chain_hole)
    SetHintComicsPhotoZoneEx(photo_button2, game_state.chain_hole)
    SetHintComicsPhotoZoneEx(photo_button3, game_state.chain_hole)
	SetHintComicsPhotoZoneEx(photo_torch, game_state.chain_torch)
	SetHintComicsPhotoZoneEx(photo_torch_fired, game_state.chain_torch_fired)
	
	pf:GetObject('stena'):SetMaxOpacity(0.01)
	pf:IgnoreOnTestPoint('19-lock')
	---------------------------------------------------------------------------------------------
	RegisterMiniGame(PATH_MINIGAME_23_TOOTH, function()
                                                LoadMiniGames(PATH_MINIGAME_23_TOOTH)
                                            end )
    ---------------------------------------------------------------------------------------------
	pf:IgnoreOnTestPoint('korova')
	PlayAnimationPeriodicallyVsRandDelay(pf:GetObject('korova'), 10, 5)
	---------------------------------------------------------------------------------------------
	MakeSoundEntity('23_noise_jungle_water'):Play(false)
	---------------------------------------------------------------------------------------------
end

function HolesFilledRequest()
	if play_field:GetObject('pazl_01'):GetMaxOpacity() == 1 and
	 play_field:GetObject('pazl_02'):GetMaxOpacity() == 1 and
	 play_field:GetObject('pazl_03'):GetMaxOpacity() == 1 and
	 play_field:GetObject('pazl_01'):GetOpacity() == 1 and
  	 play_field:GetObject('pazl_02'):GetOpacity() == 1 and
	 play_field:GetObject('pazl_03'):GetOpacity() == 1	 then
	    AddGameState('LEVER_COMICS_SHOWN', 'true')
		PlayRegisterComics('COMICS_23_ON_HOLES_FILLED')
	end
end

function OnSceneFree()
    FreeData()
end

function OnScreenShown(fade_out)
    if fade_out then
       PlayRegisterComics('COMICS_23_ON_SHOWN')
    end
end

function OnHiddenComics(comics)
end

function OnWin()
	if  play_field:GetLevelScreen():IsCompleteLevel() and
        HasGameState('GateOpened', 'true')
    then
		OnWinLevel()
	end
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
	if not HasGameState('LEVER_COMICS_SHOWN', 'true') then
		HolesFilledRequest()
	end    
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)
end

function OnPhotographing()
	DefaultOnPhotographing()
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function OnMinigameCompleted()
	MakeSoundEntity('23_fire'):Play(true) 
end

function OnLostFocus()
end

function OnGainFocus()
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/23_statues/Items/axe.png',0,0,178,107,1,0)
	anim:SetHotSpot(89,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('axe',anim,525,750,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/drum2.png',0,0,64,60,1,0)
	anim:SetHotSpot(32,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('drum2',anim,463,648,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/horse.png',0,0,168,179,1,0)
	anim:SetHotSpot(84,89)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('horse',anim,805,470,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/indian_hat.png',0,0,72,112,1,0)
	anim:SetHotSpot(36,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('indian_hat',anim,479,477,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/mushrooms.png',0,0,56,40,1,0)
	anim:SetHotSpot(28,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mushrooms',anim,506,398,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/necklace.png',0,0,68,121,1,0)
	anim:SetHotSpot(34,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('necklace',anim,948,282,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/scroll.png',0,0,81,29,1,0)
	anim:SetHotSpot(40,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scroll',anim,505,552,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/shield.png',0,0,241,316,1,0)
	anim:SetHotSpot(120,158)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shield',anim,713,752,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/strawberries.png',0,0,72,59,1,0)
	anim:SetHotSpot(36,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('strawberries',anim,377,343,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/turtle.png',0,0,128,69,1,0)
	anim:SetHotSpot(64,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('turtle',anim,934,733,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/2-lock.png',0,0,78,158,1,0)
	anim:SetHotSpot(39,79)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('2-lock',anim,789,223,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/3-lock.png',0,0,44,29,1,0)
	anim:SetHotSpot(22,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('3-lock',anim,942,226,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/11-lock.png',0,0,48,34,1,0)
	anim:SetHotSpot(24,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('11-lock',anim,458,744,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/19-lock.png',0,0,163,174,1,0)
	anim:SetHotSpot(81,87)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('19-lock',anim,818,487,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/20-lock.png',0,0,73,261,1,0)
	anim:SetHotSpot(36,130)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('20-lock',anim,737,641,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/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/23_statues/Items/drum.png',0,0,71,56,1,0)
	anim:SetHotSpot(35,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('drum',anim,250,380,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/quiver.png',0,0,104,75,1,0)
	anim:SetHotSpot(52,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('quiver',anim,722,525,115,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/button1.png',0,0,28,28,1,0)
	anim:SetHotSpot(14,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button3',anim,282,348,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/button2.png',0,0,34,22,1,0)
	anim:SetHotSpot(17,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button1',anim,489,616,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/button3.png',0,0,29,24,1,0)
	anim:SetHotSpot(14,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button2',anim,709,486,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/torch.png',0,0,93,29,1,0)
	anim:SetHotSpot(46,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch',anim,407,588,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_cave',anim,287,472,100,0,16,16)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/torch_tool.png',0,0,68,131,1,0)
	anim:SetHotSpot(34,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fakel',anim,270,354,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/stena.png',0,0,95,170,1,0)
	anim:SetHotSpot(47,85)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('stena_layer',anim,239,413,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/richagi_otkr.png',0,0,311,231,1,0)
	anim:SetHotSpot(155,115)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('richagi_otkr',anim,499,357,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/richagi_zakr.png',0,0,274,153,1,0)
	anim:SetHotSpot(137,76)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('richagi_zakr',anim,503,372,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/golova_01.png',0,0,114,123,1,0)
	anim:SetHotSpot(57,61)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('golova_01',anim,675,356,805,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/golova_02.png',0,0,93,121,1,0)
	anim:SetHotSpot(46,60)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('golova_02',anim,685,350,805,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/gates_opened.png',0,0,134,199,1,0)
	anim:SetHotSpot(67,99)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gates_opened',anim,725,196,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/gates_closed.png',0,0,120,202,1,0)
	anim:SetHotSpot(60,101)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gates_closed',anim,727,193,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/torch_tool.png',0,0,68,131,1,0)
	anim:SetHotSpot(34,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch_tool',anim,100,100,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Photo/torch_fired_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch_fired_photo',anim,91,599,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Photo/torch_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch_photo',anim,103,632,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/torch_tool.png',0,0,68,131,1,0)
	anim:SetHotSpot(34,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch_fired_tool',anim,95,306,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('0x00FFFFFF')
	screen:CreateObject('pixel_pazl1',anim,423,373,810,0,4,4)
	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_pazl2',anim,499,371,810,0,4,4)
	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_pazl3',anim,575,367,810,0,4,4)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/pazl_01.png',0,0,77,79,1,0)
	anim:SetHotSpot(38,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button1_tool',anim,41,285,100,90,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/pazl_02.png',0,0,77,79,1,0)
	anim:SetHotSpot(39,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button2_tool',anim,120,283,100,180,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/pazl_03.png',0,0,77,79,1,0)
	anim:SetHotSpot(39,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button3_tool',anim,81,332,100,270,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Photo/button1_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button1_photo',anim,512,384,10,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Photo/button2_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button2_photo',anim,51,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Photo/button3_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('button3_photo',anim,51,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/pazl_01.png',0,0,77,79,1,0)
	anim:SetHotSpot(38,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_01',anim,422,370,815,90,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/pazl_02.png',0,0,77,79,1,0)
	anim:SetHotSpot(38,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_02',anim,497,370,815,180,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/pazl_03.png',0,0,77,79,1,0)
	anim:SetHotSpot(38,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pazl_03',anim,574,366,815,270,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/mouth.png',0,0,114,115,1,0)
	anim:SetHotSpot(57,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mouth',anim,902,597,115,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/mouth.png',0,0,114,115,1,0)
	anim:SetHotSpot(57,57)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_mouth',anim,899,593,200,0,1.5,1.5)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/ZoomCave/Layers/ZoomCaveBg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ZoomCaveBg',anim,512,384,800,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/coin.png',0,0,51,51,1,0)
	anim:SetHotSpot(25,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coin',anim,979,504,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/torch_fired_tool.png',0,0,127,182,1,0)
	anim:SetHotSpot(63,91)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('torch_fired',anim,856,611,220,0,0.6,0.6)
	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_fire',anim,907,531,220,0,10,20)
	local anim = CreateAnimation('data/Texture/Effect/particles.png',96,32,32,32,1,0)
	anim:SetHotSpot(16,16)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fireparticle',anim,182,33,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Animations/fire/fire.png',0,0,157,284,36,20)
	anim:SetHotSpot(78,142)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire4',anim,903,492,124,0,0.6,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Items/skull.png',0,0,49,35,1,0)
	anim:SetHotSpot(24,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skull',anim,539,280,106,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('0xFFFFFFFF')
	screen:CreateObject('stena',anim,248,386,830,0,10,14)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Layers/mask.png',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('mask',anim,512,384,840,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Animations/korova.png',0,0,374,81,44,10)
	anim:SetHotSpot(187,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('korova',anim,382,712,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Animations/padovod.png',0,0,249,108,3,10)
	anim:SetHotSpot(124,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('padovod',anim,633,249,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Animations/ptic.png',0,0,154,88,24,8)
	anim:SetHotSpot(77,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ptic',anim,297,108,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Animations/palm1.png',0,0,90,73,20,20)
	anim:SetHotSpot(45,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('palm1',anim,397,95,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/23_statues/Animations/palm2.png',0,0,79,87,20,20)
	anim:SetHotSpot(39,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('palm2',anim,917,122,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Animations/fire/fire.png',0,0,157,284,36,20)
	anim:SetHotSpot(78,142)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire_small',anim,18,-97,1,0,0.28,0.52)
	local anim = CreateAnimation('data/Texture/Animations/fire/fire.png',0,0,157,284,36,20)
	anim:SetHotSpot(78,142)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fire_cave',anim,289,236,820,0,0.47,0.73)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
