dofile('data/Scenes/27_wall_Anim_birds.lua')

local PATH_MINIGAME_27_PIPES 		= 'data/Scenes/MiniGames/27_pipes.lua'
local PATH_COMICS_27_PIPE           = 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_27_ON_SHOWN 		= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_27_ON_WIN 		= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_27_COIN	 		= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_27_COIN_FOUND		= 'data/Scenes/Comics/HelpersComicsReplic.lua'

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

    local pf = play_field
    local level = pf:GetLevelScreen()
	---------------------------------------------------------------------------------------------
	level:AddTaskSafe(CreateTask('ARTIFACT', '', 'money'))
	AddRandomTasks(13,
               CreateTask('AXE', '', 'axe'),
               CreateTask('BELL', 'BELLS', 'bell_1', 'bell_2'),
               CreateTask('BLUDGEON', '', 'bludgeon'),
               CreateTask('BOTTLE', '', 'bottle'),               
               CreateTask('CLOCK', 'CLOCKS', 'clock_2', 'clock_3'),
               CreateTask('CROWN', '', 'crown'),
               CreateTask('CUSHION', '', 'cushion'),
               CreateTask('FAN', '', 'fan'),               
               CreateTask('HOURGLASS', '', 'hourglass'),
               CreateTask('KEYS', '', 'keys'),
               CreateTask('MUG', '', 'mug'),
               CreateTask('SHOVEL', '', 'shovel'),
               
               CreateTask('CHERRIES', '', 'berry'),
               CreateTask('PALM_PRINT', '', 'palm_print'),
               CreateTask('ROSE', '', 'rose'),
               CreateTask('RAZOR', '', 'razor')
	)
	---------------------------------------------------------------------------------------------
	zone_well = CreateZoomZone('close_zone_well',
                               'pixel_well',
                               'ZoomWellBg',
                               'duck',
                               'money',
							   'b1',
							   'b',
							   'l',
							   'p',
							   'v',
							   '1',
							   'pixel_coin',
							   
							   'berry',
							   'palm_print',
							   'rose',
							   'razor'
							   )
	pf:GetObject('b1'):SetMaxOpacity(0)
	pf:GetObject('b'):SetMaxOpacity(0)
	pf:GetObject('l'):SetMaxOpacity(0)
	pf:GetObject('p'):SetMaxOpacity(0)
	pf:GetObject('v'):SetMaxOpacity(0)
	pf:GetObject('1'):SetMaxOpacity(0)
	pf:GetObject('pixel_coin'):SetMaxOpacity(0.01)
	pf:IgnoreOnTestPoint('money')
	pf:IgnoreOnTestPoint('pillow')
	---------------------------------------------------------------------------------------------		
	zone_room = CreateZoomZone('close_zone_room',
                               'pixel_room',
                               'ZoomRoomBg',
                               'pipe1',
                               'pipe2',
							   'pipe3',
							   'pipe4',
							   'pipe5',
							   'pixel_pipe2',
							   'pixel_pipe3',
							   'pixel_pipe4',
							   'pixel_pipe5',
							   'pixel_pipe'
							   );
	pf:GetObject('pipe1'):SetMaxOpacity(0)
	pf:GetObject('pipe2'):SetMaxOpacity(0)
	pf:GetObject('pipe3'):SetMaxOpacity(0)	
	pf:GetObject('pipe4'):SetMaxOpacity(0)	
	pf:GetObject('pipe5'):SetMaxOpacity(0)	
	pf:GetObject('pixel_pipe'):SetMaxOpacity(0.01)
	---------------------------------------------------------------------------------------------	
	local photo_pipe1
	local photo_pipe2
	local photo_pipe3
	local photo_pipe4
	
	if HasGameState('pipes_inserted') then
	    RemoveGameState('pipes_inserted')
	end
	
	local apply_action_pipe = function(save, target, pipe_index, obj)
								local amount;
								if HasGameState('pipes_inserted') then
									amount = tonumber(GetGameState('pipes_inserted'):Get(0))
									amount = amount + 1
									RemoveGameState('pipes_inserted')									
								else
									amount = 1									
								end
								AddGameState('pipes_inserted', tostring(amount))
								AddGameState('PipeInserted', tostring(pipe_index))
								if amount < 4 then
									if not HasGameState('PipeInserted', '1') and photo_pipe1 then
										ActivatePhotoZone(photo_pipe1, 'pixel_pipe')
									end
									if not HasGameState('PipeInserted', '2') and photo_pipe2 then
										ActivatePhotoZone(photo_pipe2, 'pixel_pipe')
									end
									if not HasGameState('PipeInserted', '3') and photo_pipe3 then
										ActivatePhotoZone(photo_pipe3, 'pixel_pipe')
									end
									if not HasGameState('PipeInserted', '4') and photo_pipe4 then
										ActivatePhotoZone(photo_pipe4, 'pixel_pipe')
									end
								else
									play_field:GetObject('b1'):SetMaxOpacity(1)
									play_field:GetObject('b'):SetMaxOpacity(1)
									play_field:GetObject('l'):SetMaxOpacity(1)
									play_field:GetObject('p'):SetMaxOpacity(1)
									play_field:GetObject('v'):SetMaxOpacity(1)
									play_field:GetObject('1'):SetMaxOpacity(1)
									local duck = pf:GetObject('duck')
									duck:SetScaleX(1)
									duck:SetScaleY(1)
									duck:SetXY(627, 510)
									pf:DoNotIgnoreOnTestPoint('money')
									local coin = pf:GetObject('money')
									coin:SetScaleX(1)
									coin:SetScaleY(1)
									coin:SetXY(653, 486)
									pf:IgnoreOnTestPoint('pixel_coin')
									TimerDo(pf:GetTimer(), 0.2, function() StartMiniGame() end)
								end
								obj:SetMaxOpacity(1);
								if not save then
								    obj:ChangeOpacity(0, 1, 0.1)
								end
							  end
	local photo_action_pipe = function()
							  end 
	---------------------------------------------------------------------------------------------
	local apply_action_pipe1 = function(save, target)
								local obj = pf:GetObject('pipe1')
								apply_action_pipe(save, target, 1, obj)
								if not save then
									MakeSoundEntity('27_pipe1'):Play(false)
								end
                             end
	
	photo_pipe1 = CreatePhotoZone('tr1',										
										'GREY_PIPE',
										'pipe_1_photo',
										photo_action_pipe,
										nil,
										nil)
    SetApplyActionPhotoZone(photo_pipe1, 'pixel_pipe', apply_action_pipe1)
    ---------------------------------------------------------------------------------------------
	local apply_action_pipe2 = function(save, target)
								local obj = play_field:GetObject('pipe2')
								apply_action_pipe(save, target, 2, obj)
								play_field:GetObject('pipe5'):SetMaxOpacity(1)
								if not save then
									play_field:GetObject('pipe5'):ChangeOpacity(0, 1, 0.1)
									MakeSoundEntity('27_pipe2'):Play(false)
								end
                             end
	
	photo_pipe2 = CreatePhotoZone('tr2',										
										'GREY_PIPE',
										'pipe_2_photo',
										photo_action_pipe,
										nil,
										nil)
    SetApplyActionPhotoZone(photo_pipe2, 'pixel_pipe', apply_action_pipe2)
    ---------------------------------------------------------------------------------------------
	local apply_action_pipe3 = function(save, target)
								local obj = play_field:GetObject('pipe3')
								apply_action_pipe(save, target, 3, obj)	
								if not save then
									MakeSoundEntity('27_pipe3'):Play(false)
								end								
                             end
	
	photo_pipe3 = CreatePhotoZone('tr3',										
										'GREY_PIPE',
										'pipe_3_photo',
										photo_action_pipe,
										nil,
										nil)
    SetApplyActionPhotoZone(photo_pipe3, 'pixel_pipe', apply_action_pipe3)
    ---------------------------------------------------------------------------------------------
	local apply_action_pipe4 = function(save, target)
								local obj = play_field:GetObject('pipe4')
								apply_action_pipe(save, target, 4, obj)
								if not save then
									MakeSoundEntity('27_pipe3'):Play(false)
								end
                             end
	
	photo_pipe4 = CreatePhotoZone('tr4',										
										'GREY_PIPE',
										'pipe_4_photo',
										photo_action_pipe,
										nil,
										nil)
    SetApplyActionPhotoZone(photo_pipe4, 'pixel_pipe', apply_action_pipe4)
	SetTextPlural('GREY_PIPE', 'GREY_PIPES')
	---------------------------------------------------------------------------------------------
	pf:IgnoreOnTestPoint('tr3')
	pf:IgnoreOnTestPoint('tr4')
	---------------------------------------------------------------------------------------------	
	play_field:GetObject('tr3-lock-drop'):SetOpacity(0)	
	
	local clickOnCart = function(save)
		if save then
		    pf:GetObject('tr3-lock-drop'):SetOpacity(1)
		    pf:GetObject('tr3-lock'):SetOpacity(0)
		else
		    pf:GetObject('tr3-lock-drop'):ChangeOpacity(0, 1, 0.2)
		    pf:GetObject('tr3-lock'):ChangeOpacity(1, 0, 0.2)
			MakeSoundEntity('27_carriage'):Play(false)
		end
		pf:DoNotIgnoreOnTestPoint('tr3')
    end
    RegisterActiveObject('pixel_tr3', clickOnCart, false, GetCursorArms())
	---------------------------------------------------------------------------------------------		
	pf:GetObject('tr4-lock-drop-whith-hidden'):SetOpacity(0)
	
	local clickOnColumn = function(save)
		if save then
		    pf:GetObject('tr4-lock-drop-whith-hidden'):SetOpacity(1)
		    pf:GetObject('tr4-lock'):SetOpacity(0)
		else
		    pf:GetObject('tr4-lock-drop-whith-hidden'):ChangeOpacity(0, 1, 0.2)
		    pf:GetObject('tr4-lock'):ChangeOpacity(1, 0, 0.2)
			MakeSoundEntity('27_column'):Play(false)
		end
		pf:DoNotIgnoreOnTestPoint('tr4')
    end
    RegisterActiveObject('pixel_tr4', clickOnColumn, false, GetCursorArms())
	---------------------------------------------------------------------------------------------
	local clickOnCoin = function(save)
	    if not save then
	        game_state.chain_coin.Play()
	    end
    end
	RegisterActiveObject('pixel_coin', clickOnCoin, true, GetCursorArms())
	---------------------------------------------------------------------------------------------
	local bird1 = createCompositionBird1()
	bird1:AttachTo(screen)
	bird1:SetZ(75)
	bird1:Stop()
	bird1:SetDestroysOnEnd(false)
	PlayCompositionPeriodicallyVsRandDelay(bird1, 3, 10)
	
	local bird2 = createCompositionBird2()
	bird2:AttachTo(screen)
	bird2:SetZ(75)
	bird2:Stop()
	bird2:SetDestroysOnEnd(false)
	PlayCompositionPeriodicallyVsRandDelay(bird2, 3, 10)
	
	local bird3 = createCompositionBird3()
	bird3:AttachTo(screen)
	bird3:SetZ(75)
	bird3:Stop()
	bird3:SetDestroysOnEnd(false)
	PlayCompositionPeriodicallyVsRandDelay(bird3, 3, 10)
	
	local bird4 = createCompositionBird4()
	bird4:AttachTo(screen)
	bird4:SetZ(75)
	bird4:Stop()
	bird4:SetDestroysOnEnd(false)
	PlayCompositionPeriodicallyVsRandDelay(bird4, 3, 10)
	---------------------------------------------------------------------------------------------
	pf:GetObject('nachalo'):GetAnimation():SetMode(HGEANIM_PINGPONG + HGEANIM_NOLOOP)
	pf:GetObject('nachalo'):GetAnimation():Stop()
	pf:GetObject('blik'):SetOpacity(0)
	pf:IgnoreOnTestPoint('blik')
	---------------------------------------------------------------------------------------------
	game_state.chain_pipe = RegisterComicsEx(function()
												LoadComicsWithOneReplicHeroes(PATH_COMICS_27_PIPE, 'COMICS_27_PIPE')
											  end )
	game_state.chain_on_shown = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_27_ON_SHOWN, 'COMICS_27_ON_SHOWN')
                                                 end )
	game_state.chain_on_win = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_27_ON_WIN, 'COMICS_27_ON_WIN')
                                                 end )
	game_state.chain_on_win.OnHidden = function()
											OnWinLevel()
									   end
	game_state.chain_coin = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_27_COIN, 'COMICS_27_COIN')
                                                 end )
    game_state.chain_coin.SetRepeat(true)
	game_state.chain_coin_found = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_27_COIN_FOUND, 'COMICS_27_COIN_FOUND')
                                                 end )
    game_state.chain_coin_found.OnHidden = function()
                                                TryToDisableZoomZonesIfPossible()
                                                OnWin()
                                           end
	---------------------------------------------------------------------------------------------
	SetHintComicsPhotoZoneEx(photo_pipe1, game_state.chain_pipe)
	SetHintComicsPhotoZoneEx(photo_pipe2, game_state.chain_pipe)
	SetHintComicsPhotoZoneEx(photo_pipe3, game_state.chain_pipe)
	SetHintComicsPhotoZoneEx(photo_pipe4, game_state.chain_pipe)
	---------------------------------------------------------------------------------------------
	-- Correction save pipe
	if not HasGameState('PipeInserted', '1') and photo_pipe1 then
										ActivatePhotoZone(photo_pipe1, 'pixel_pipe')
									end
									if not HasGameState('PipeInserted', '2') and photo_pipe2 then
										ActivatePhotoZone(photo_pipe2, 'pixel_pipe')
									end
									if not HasGameState('PipeInserted', '3') and photo_pipe3 then
										ActivatePhotoZone(photo_pipe3, 'pixel_pipe')
									end
									if not HasGameState('PipeInserted', '4') and photo_pipe4 then
										ActivatePhotoZone(photo_pipe4, 'pixel_pipe')
									end
    ---------------------------------------------------------------------------------------------
    RegisterMiniGame(PATH_MINIGAME_27_PIPES, function()
                                                LoadMiniGames(PATH_MINIGAME_27_PIPES)
											 end)
    if IsMiniGamePlay(PATH_MINIGAME_27_PIPES) then
        play_field:GetObject('blik'):ChangeOpacity(0, 1, 6)
        UnregisterActiveObject('pixel_coin')
    end
    ---------------------------------------------------------------------------------------------
end

function StartMiniGame()
    if not IsMiniGamePlay(PATH_MINIGAME_27_PIPES) then
        UnregisterActiveObject('pixel_coin')
	    PlayRegisterMiniGame(PATH_MINIGAME_27_PIPES)
	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)
	DisableZoomZoneRequest(zone_room)
	play_field:GetObject('nachalo'):GetAnimation():Play()
	play_field:GetObject('blik'):ChangeOpacity(0, 1, 6)
	MakeSoundEntity('27_water'):Play(false)
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
    TryToDisableZoomZonesIfPossible()
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()
--[[
	if obj_name == 'pixel_coin' then
		game_state.chain_coin.Play()
	end
]]	
    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)
	if object:GetName() == 'money' then
		game_state.chain_coin_found.Play()
	end
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
       IsMiniGamePlay(PATH_MINIGAME_27_PIPES) and
       game_state.chain_coin_found.played
    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/27_wall_/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/27_wall_/items/axe.png',0,0,157,45,1,0)
	anim:SetHotSpot(78,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('axe',anim,285,733,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/bell_1.png',0,0,105,85,1,0)
	anim:SetHotSpot(52,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell_1',anim,378,658,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/bell_2.png',0,0,37,64,1,0)
	anim:SetHotSpot(18,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell_2',anim,811,587,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/bludgeon.png',0,0,66,114,1,0)
	anim:SetHotSpot(33,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bludgeon',anim,364,398,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/bottle.png',0,0,27,77,1,0)
	anim:SetHotSpot(13,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bottle',anim,634,737,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/chest.png',0,0,127,97,1,0)
	anim:SetHotSpot(63,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest',anim,968,669,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/clock_2.png',0,0,65,61,1,0)
	anim:SetHotSpot(32,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('clock_2',anim,960,329,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/clock_3.png',0,0,79,88,1,0)
	anim:SetHotSpot(39,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('clock_3',anim,409,241,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/crown.png',0,0,55,49,1,0)
	anim:SetHotSpot(27,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crown',anim,642,50,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/cushion.png',0,0,77,55,1,0)
	anim:SetHotSpot(38,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cushion',anim,881,635,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/fan.png',0,0,57,36,1,0)
	anim:SetHotSpot(28,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan',anim,480,595,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/hourglass.png',0,0,26,40,1,0)
	anim:SetHotSpot(13,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hourglass',anim,903,139,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/keys.png',0,0,39,41,1,0)
	anim:SetHotSpot(19,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('keys',anim,276,389,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/mug.png',0,0,36,30,1,0)
	anim:SetHotSpot(18,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mug',anim,767,614,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Photos/pipe_1_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe_1_photo',anim,113,199,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Photos/pipe_2_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe_2_photo',anim,98,503,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Photos/pipe_3_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe_4_photo',anim,105,224,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Photos/pipe_4_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe_3_photo',anim,103,562,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr1.png',0,0,43,75,1,0)
	anim:SetHotSpot(21,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr2',anim,803,86,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr2.png',0,0,80,106,1,0)
	anim:SetHotSpot(40,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr1',anim,445,446,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr2-lock.png',0,0,33,70,1,0)
	anim:SetHotSpot(16,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr2-lock',anim,420,460,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr3.png',0,0,65,56,1,0)
	anim:SetHotSpot(32,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr3',anim,836,418,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr3-lock.png',0,0,92,109,1,0)
	anim:SetHotSpot(46,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr3-lock',anim,845,416,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr4.png',0,0,58,60,1,0)
	anim:SetHotSpot(29,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr4',anim,969,599,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr4-lock.png',0,0,64,98,1,0)
	anim:SetHotSpot(32,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr4-lock',anim,986,583,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr4-lock-drop-whith-hidden.png',0,0,100,84,1,0)
	anim:SetHotSpot(50,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr4-lock-drop-whith-hidden',anim,977,638,105,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_room',anim,655,362,100,0,8,40)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomRoom/Layers/1.png',0,0,49,54,1,0)
	anim:SetHotSpot(24,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe4',anim,640,454,505,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomRoom/Layers/2.png',0,0,72,104,1,0)
	anim:SetHotSpot(36,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe1',anim,631,431,505,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomRoom/Layers/3.png',0,0,31,48,1,0)
	anim:SetHotSpot(15,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe2',anim,655,366,505,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomRoom/Layers/4.png',0,0,33,23,1,0)
	anim:SetHotSpot(16,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe5',anim,661,334,505,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomRoom/Layers/5.png',0,0,70,56,1,0)
	anim:SetHotSpot(35,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pipe3',anim,632,297,505,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomRoom/Layers/ZoomRoomBg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZoomRoomBg',anim,512,384,500,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/pillow.png',0,0,64,28,1,0)
	anim:SetHotSpot(32,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pillow',anim,885,654,105,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_pipe',anim,604,374,520,0,20,28)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/layers/tr3-lock-drop.png',0,0,108,89,1,0)
	anim:SetHotSpot(54,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('tr3-lock-drop',anim,843,529,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Animations/myrax.png',0,0,230,88,26,10)
	anim:SetHotSpot(115,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('myrax',anim,751,728,71,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Animations/nkl.png',0,0,325,91,1,0)
	anim:SetHotSpot(162,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('nkl',anim,857,45,95,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Animations/nachalo.png',0,0,31,81,60,10)
	anim:SetHotSpot(15,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('nachalo',anim,486,496,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/Animations/blik.png',0,0,218,26,24,24)
	anim:SetHotSpot(109,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('blik',anim,525,514,90,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Layers/ZoomWellBg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZoomWellBg',anim,512,385,800,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/duck.png',0,0,148,101,24,24)
	anim:SetHotSpot(74,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('duck',anim,551,547,810,0,0.3,0.3)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/money.png',0,0,64,53,24,24)
	anim:SetHotSpot(32,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('money',anim,558,541,815,0,0.2,0.2)
	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_well',anim,532,518,100,0,25,4)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/b1.png',0,0,243,176,24,24)
	anim:SetHotSpot(121,88)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('b1',anim,433,427,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/b.png',0,0,170,136,24,24)
	anim:SetHotSpot(85,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('b',anim,414,403,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/l.png',0,0,41,288,24,24)
	anim:SetHotSpot(20,144)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('l',anim,317,440,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/p.png',0,0,77,287,24,24)
	anim:SetHotSpot(38,143)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('p',anim,729,411,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/v.png',0,0,421,84,24,24)
	anim:SetHotSpot(210,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('v',anim,510,310,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Animations/1.png',0,0,401,258,1,0)
	anim:SetHotSpot(200,129)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('1',anim,527,457,809,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_coin',anim,552,536,820,0,8,8)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Items/berry.png',0,0,42,59,1,0)
	anim:SetHotSpot(21,29)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('berry',anim,760,194,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Items/palm_print.png',0,0,53,53,1,0)
	anim:SetHotSpot(26,26)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('palm_print',anim,275,233,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Items/rose.png',0,0,106,58,1,0)
	anim:SetHotSpot(53,29)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('rose',anim,411,590,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/ZoomWell/Items/razor.png',0,0,65,43,1,0)
	anim:SetHotSpot(32,21)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('razor',anim,707,260,820,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_tr4',anim,976,595,110,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_tr3',anim,842,412,120,0,12,12)
	local anim = CreateAnimation('data/Texture/Scenes/27_wall_/items/shovel.png',0,0,58,92,1,0)
	anim:SetHotSpot(29,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shovel',anim,973,496,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
