dofile('data/Scenes/32_mosque_Anim_birds.lua')
dofile('data/Scenes/32_mosque_Anim_sarcophagus.lua')

local PATH_COMICS_32_ON_SHOWN 			= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_32_FOUNTAIN 			= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_32_CUBE	 			= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_32_FOUNTAIN_WORK		= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_32_PART_OF_ARTIFACT	= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_32_COVER          	= 'data/Scenes/Comics/HelpersComicsReplic.lua'
local PATH_COMICS_32_ON_WIN				= 'data/Scenes/Comics/HelpersComicsReplic.lua'

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

    local pf = play_field
    local level = pf:GetLevelScreen()
	---------------------------------------------------------------------------------------------
	level:AddTaskSafe(CreateTask('GREEN_BULB', '', 'green_bulb'))
	level:AddTaskSafe(CreateTask('STONE_DISK', '', 'cover'))
	pf:IgnoreOnTestPoint('green_bulb')
	AddRandomTasks(13,               
               CreateTask('BEETLE', '', 'beetle'),
               CreateTask('BOOT', '', 'boot'),
               CreateTask('BOTTLE', 'BOTTLES', 'bottle1', 'bottle2'),               
               CreateTask('BRACELET', '', 'bracelet'),
               CreateTask('BUCKLE', '', 'buckle'),
               CreateTask('BUTTERFLY', '', 'butterfly'),
               CreateTask('BUTTON', '', 'button'),
               CreateTask('CHESS_PIECE', '', 'chess_piece'),               
               CreateTask('COCONUT', '', 'coconut'),
               CreateTask('CRANE', '', 'crane'),
               CreateTask('DRAGONFLY', '', 'dragonfly'),
               CreateTask('EGGPLANT', '', 'eggplant'),
               CreateTask('FISH', 'FISH', 'fish1', 'fish2', 'fish3'),               
               CreateTask('FLASK', '', 'flask'),
               CreateTask('FLOWER', 'FLOWERS', 'flower1', 'flower2', 'flower3'),               
               CreateTask('GRAPE', '', 'grape'),               
               CreateTask('LEMON', 'LEMONS', 'lemon1', 'lemon2'),               
               CreateTask('LIZARD', '', 'lizard'),
               CreateTask('PEAR', '', 'pear'),
               CreateTask('PEPPER', '', 'pepper'),
               CreateTask('BRUSH', '', 'scraper'),               
               CreateTask('SNAIL', '', 'snail'),
               CreateTask('SNAKE', 'SNAKES', 'snake1', 'snake2', 'snake3'),               
               CreateTask('UMBRELLA', '', 'umbrella'),
               
               CreateTask('CRAB', '', 'crab'),
               CreateTask('CROWN', '', 'crown'),
               CreateTask('DRAGON', '', 'dragon'),
               CreateTask('HELMET', '', 'helmet'),
               CreateTask('NEST', '', 'nest'),
               CreateTask('SWORD', '', 'sword')
	)
	pf:IgnoreOnTestPoint('BG_Flyaga')
	pf:IgnoreOnTestPoint('BG_Kinzhal')
	pf:IgnoreOnTestPoint('BG_Braslet')
	pf:IgnoreOnTestPoint('BG_Botinok')
	---------------------------------------------------------------------------------------------
	zone_well = CreateZoomZone('close_zone_sarcophagus',
						   'pixel_sarcophagus',
						   'ZoomSarcophagusBg',
						   'sarcophagus',
						   'sarcophagus_over1',
						   'tumba',
						   'kub_01',
						   'kub_02',
						   'kub_03',
						   'kub_04',						   
						   'pixel_button',
						   'green_bulb'
                            )
	pf:GetObject('pixel_button'):SetMaxOpacity(0.01)
	pf:GetObject('kub_03'):SetMaxOpacity(0)
	pf:GetObject('kub_04'):SetMaxOpacity(0)
    ---------------------------------------------------------------------------------------------	
--[[
    local comp_sarcophagus = createCompositionPthf_Lok_32()
    comp_sarcophagus:AttachTo( pf:GetObject('ZoomSarcophagusBg') )
    comp_sarcophagus:SetZ(100)
    comp_sarcophagus:SetDestroysOnEnd(false)
]]
    ---------------------------------------------------------------------------------------------	
	--local photo_cube1
	--local photo_cube2
	local photo_cube3
	local photo_cube4
	
	if HasGameState('cubes_inserted') then
	    RemoveGameState('cubes_inserted')
	end
	
	local anim = play_field:GetObject('sarcophagus'):GetAnimation()
	anim:SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)
	anim:Stop()
	anim:SetFrame(0)
	
	game_state.sound_square = MakeSoundEntity('32_square')
	
	play_field:GetObject('tumba'):SetClippingRect(0, 0, 1024, 400)
	
	local apply_action_cube = function(save, target, cube_index, obj)
								local amount;
								if HasGameState('cubes_inserted') then
									amount = tonumber(GetGameState('cubes_inserted'):Get(0))
									amount = amount + 1
									RemoveGameState('cubes_inserted')									
								else
									amount = 1									
								end
								AddGameState('cubes_inserted', tostring(amount))
								AddGameState('CubeInserted', tostring(cube_index))
								if amount < 2 then
									if not HasGameState('CubeInserted', '3') and photo_cube3 then
										ActivatePhotoZone(photo_cube3, 'pixel_button')
									end
									if not HasGameState('CubeInserted', '4') and photo_cube4 then
										ActivatePhotoZone(photo_cube4, 'pixel_button')
									end
								else
								    local offset_Y = 50
								    local move = function(obj, time)
								        if time then
                                            local af = CreateAnimationEffector()
                                            af:AttachTo(obj)
                                            af:SetKey(_TRACK_Y, 0, obj:GetY())										
                                            af:SetKey(_TRACK_Y, time, obj:GetY())
                                            af:SetKey(_TRACK_Y, time + 1, obj:GetY() - offset_Y)
                                            af:Play()
                                         else
                                            obj:SetY(obj:GetY() - offset_Y)
                                         end
									end
								
								    local anim = pf:GetObject('sarcophagus'):GetAnimation()
								    local time = GetAnimationLength(anim)
									if save then
									    move(pf:GetObject('tumba'))
										move(pf:GetObject('green_bulb'))
										anim:Rewind(true)
										NotesFound('Notes_12')
									else
										anim:Play()
										move(pf:GetObject('tumba'), time)
										move(pf:GetObject('green_bulb'), time)
										MakeSoundEntity('32_sarcophagus'):Play(false)
										TimerDo(pf:GetTimer(), time + 1., function()
										                                 NotesFound('Notes_12')       
										                             end )
									end
									pf:DoNotIgnoreOnTestPoint('green_bulb')
								    
								end
								obj:SetMaxOpacity(1)
								if not save then
								    obj:ChangeOpacity(0, 1, 0.1)
									game_state.sound_square:Play(false)
								end
							  end
	local photo_action_cube = function()
							  end 
    ---------------------------------------------------------------------------------------------	
	local apply_action_cube3 = function(save, target)
								local obj = play_field:GetObject('kub_03')
								apply_action_cube(save, target, 3, obj)
                             end
	
	photo_cube3 = CreatePhotoZone('cube3',										
								'ANTIQUE_PLATE_3',
								'cube_3_photo',
								photo_action_cube,
								nil,
								nil)
    SetApplyActionPhotoZone(photo_cube3, 'pixel_button', apply_action_cube3)
    ---------------------------------------------------------------------------------------------	
	local apply_action_cube4 = function(save, target)
								local obj = play_field:GetObject('kub_04')
								apply_action_cube(save, target, 4, obj)
                             end
	
	photo_cube4 = CreatePhotoZoneEx('cube4',
									'cube4_tool',
								'ANTIQUE_PLATE_4',
								'cube_4_photo',
								photo_action_cube,
								nil,
								nil)
    SetApplyActionPhotoZone(photo_cube4, 'pixel_button', apply_action_cube4)
    ---------------------------------------------------------------------------------------------	
	zone_tunnel = CreateZoomZone('close_zone_tunnel',
                               'pixel_tunnel',
                               'ZoomTunnelBg',
                               'cover',
                               'lever',

                               'crab',
                               'crown',
                               'dragon',
                               'helmet',
                               'nest',
                               'sword'
                                )
	---------------------------------------------------------------------------------------------
	local clickOnFountain = function(save)		
	    if not save then
		    game_state.chain_fountain.Play()	
        end
	end
	RegisterActiveObject('pixel_fointain', clickOnFountain, true, GetCursorArms())
	---------------------------------------------------------------------------------------------
	local anim_begin = play_field:GetObject('nachalo'):GetAnimation()
	anim_begin:SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)
	anim_begin:Stop()
	local anim_cycle = pf:GetObject('cikl'):GetAnimation()
	anim_cycle:Stop()
	pf:GetObject('cikl'):SetOpacity(0)
	pf:IgnoreOnTestPoint('cube4')
	pf:IgnoreOnTestPoint('cikl')
	pf:IgnoreOnTestPoint('nachalo')
	local clickOnLever = function(save)
	    UnregisterActiveObject('pixel_fointain')
		pf:GetObject('lever'):SetScaleY(1)
		pf:GetObject('lever'):SetY(327)
		zone_tunnel.SetVisible(false)
		DisableZoomZoneRequest(zone_tunnel)
	
	    if save then
	        pf:GetObject('cikl'):SetOpacity(1)
            anim_cycle:Play()
            pf:GetObject('nachalo'):SetOpacity(0)
            pf:GetObject('Pesok'):SetOpacity(0)
            pf:DoNotIgnoreOnTestPoint('cube4')
	    else
	        anim_begin:Play()
		    TimerDo(pf:GetTimer(), GetAnimationLength(anim_begin), function()
                                                                        pf:GetObject('cikl'):SetOpacity(1)
                                                                        anim_cycle:Play()
                                                                        pf:GetObject('nachalo'):SetOpacity(0)
                                                                        pf:GetObject('Pesok'):ChangeOpacity(1, 0, 1)
                                                                        pf:DoNotIgnoreOnTestPoint('cube4')
				                                                    end)
            game_state.chain_fountain_work.Play()
			MakeSoundEntity('32_lever'):Play(false)
			TimerDo(pf:GetTimer(), 2, function() MakeSoundEntity('32_fountain'):Play(true) end)
	    end
    end
    RegisterActiveObject('lever', clickOnLever, false, GetCursorArms())
	---------------------------------------------------------------------------------------------	
	local birds = createCompositiongorod_items_BACK()
	birds:AttachTo(screen)
	birds:SetZ(75)
	birds:SetDestroysOnEnd(false)
	birds:SetCyclic(true)
	---------------------------------------------------------------------------------------------	
	game_state.chain_on_shown = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_ON_SHOWN, 'COMICS_32_ON_SHOWN')
                                                 end )
	game_state.chain_fountain = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_FOUNTAIN, 'COMICS_32_FOUNTAIN')
                                                 end )
	game_state.chain_fountain.SetRepeat(true)
	
	game_state.chain_cube = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_CUBE, 'COMICS_32_CUBE')
                                                 end )
												 
	game_state.chain_fountain_work = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_FOUNTAIN_WORK, 'COMICS_32_FOUNTAIN_WORK')
                                                 end )
												 
	game_state.chain_part_of_artifact = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_PART_OF_ARTIFACT, 'COMICS_32_PART_OF_ARTIFACT')
                                                 end )
    game_state.chain_part_of_artifact.OnHidden = function()
                                                OnWin()
                                           end
    game_state.chain_cover_found = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_COVER, 'COMICS_32_COVER_FOUND')
                                                 end)
	game_state.chain_cover_found.OnHidden = function()
                                                OnWin()
                                           end
	game_state.chain_on_win = RegisterComicsEx(function()
                                                    LoadComicsWithOneReplicHeroes(PATH_COMICS_32_ON_WIN, 'COMICS_32_ON_WIN')
                                                 end)
	game_state.chain_on_win.OnHidden = function()
												OnWinLevel()
											end
	---------------------------------------------------------------------------------------------
	SetHintComicsPhotoZoneEx(photo_cube3, game_state.chain_cube)
	SetHintComicsPhotoZoneEx(photo_cube4, game_state.chain_cube)
	---------------------------------------------------------------------------------------------
	if not HasGameState('CubeInserted', '3') and photo_cube3 then
        ActivatePhotoZone(photo_cube3, 'pixel_button')
	end
	if not HasGameState('CubeInserted', '4') and photo_cube4 then
	    ActivatePhotoZone(photo_cube4, 'pixel_button')
	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)
    OnWin() -- hard code
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)
    
    if object:GetName() == 'green_bulb' then
		game_state.chain_part_of_artifact.Play()
	end
end

function OnToolFound(tool)
end

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

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel(object)
	if object:GetName() == 'cover' then
	    game_state.chain_cover_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()
    local level = play_field:GetLevelScreen()
    if level:IsCompleteLevel() and 
       game_state.chain_part_of_artifact.played  and
       game_state.chain_cover_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/32_mosque_/Items/beetle.png',0,0,34,49,1,0)
	anim:SetHotSpot(17,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('beetle',anim,410,95,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/boot.png',0,0,41,74,1,0)
	anim:SetHotSpot(20,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('boot',anim,217,661,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/bottle1.png',0,0,65,81,1,0)
	anim:SetHotSpot(32,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bottle1',anim,851,718,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/bottle2.png',0,0,35,61,1,0)
	anim:SetHotSpot(17,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bottle2',anim,214,523,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/bracelet.png',0,0,43,38,1,0)
	anim:SetHotSpot(21,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bracelet',anim,705,719,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/buckle.png',0,0,42,35,1,0)
	anim:SetHotSpot(21,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('buckle',anim,469,656,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/butterfly.png',0,0,52,70,1,0)
	anim:SetHotSpot(26,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('butterfly',anim,620,42,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/button.png',0,0,52,44,1,0)
	anim:SetHotSpot(26,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube4',anim,788,514,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/chess_piece.png',0,0,18,33,1,0)
	anim:SetHotSpot(9,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chess_piece',anim,470,350,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/coconut.png',0,0,43,31,1,0)
	anim:SetHotSpot(21,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coconut',anim,546,412,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/crane.png',0,0,86,62,1,0)
	anim:SetHotSpot(43,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crane',anim,574,349,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/dragonfly.png',0,0,64,64,1,0)
	anim:SetHotSpot(32,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dragonfly',anim,806,595,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/eggplant.png',0,0,69,35,1,0)
	anim:SetHotSpot(34,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('eggplant',anim,443,686,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/fish1.png',0,0,52,55,1,0)
	anim:SetHotSpot(26,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fish1',anim,346,197,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/fish2.png',0,0,44,23,1,0)
	anim:SetHotSpot(22,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fish2',anim,996,198,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/fish3.png',0,0,72,40,1,0)
	anim:SetHotSpot(36,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fish3',anim,974,747,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/flask.png',0,0,52,55,1,0)
	anim:SetHotSpot(26,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flask',anim,830,640,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/flower1.png',0,0,46,42,1,0)
	anim:SetHotSpot(23,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flower1',anim,614,576,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/flower2.png',0,0,43,40,1,0)
	anim:SetHotSpot(21,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flower2',anim,235,436,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/flower3.png',0,0,58,60,1,0)
	anim:SetHotSpot(29,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flower3',anim,472,31,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/grape.png',0,0,43,70,1,0)
	anim:SetHotSpot(21,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('grape',anim,873,108,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/lemon1.png',0,0,41,38,1,0)
	anim:SetHotSpot(20,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lemon1',anim,906,730,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/lemon2.png',0,0,42,32,1,0)
	anim:SetHotSpot(21,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lemon2',anim,219,604,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/lizard.png',0,0,30,68,1,0)
	anim:SetHotSpot(15,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lizard',anim,938,344,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/pear.png',0,0,52,53,1,0)
	anim:SetHotSpot(26,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pear',anim,245,734,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/pepper.png',0,0,21,61,1,0)
	anim:SetHotSpot(10,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pepper',anim,774,650,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/scraper.png',0,0,74,51,1,0)
	anim:SetHotSpot(37,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scraper',anim,991,705,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/snail.png',0,0,56,37,1,0)
	anim:SetHotSpot(28,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snail',anim,680,749,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/snake1.png',0,0,134,122,1,0)
	anim:SetHotSpot(67,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snake1',anim,354,707,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/snake2.png',0,0,40,51,1,0)
	anim:SetHotSpot(20,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snake2',anim,286,522,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/snake3.png',0,0,49,42,1,0)
	anim:SetHotSpot(24,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('snake3',anim,945,252,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Items/umbrella.png',0,0,71,71,1,0)
	anim:SetHotSpot(35,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('umbrella',anim,451,500,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/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/32_mosque_/Layers/BG_Botinok.png',0,0,31,28,1,0)
	anim:SetHotSpot(15,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Botinok',anim,230,680,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Layers/BG_Braslet.png',0,0,29,46,1,0)
	anim:SetHotSpot(14,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Braslet',anim,698,712,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Layers/BG_Flyaga.png',0,0,51,62,1,0)
	anim:SetHotSpot(25,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Flyaga',anim,820,649,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Layers/Pesok.png',0,0,145,97,1,0)
	anim:SetHotSpot(72,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pesok',anim,788,523,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Animations/sarcophagus.png',0,0,368,209,3,1)
	anim:SetHotSpot(184,104)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('sarcophagus',anim,533,314,523,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/tumba.png',0,0,146,98,1,0)
	anim:SetHotSpot(73,49)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('tumba',anim,546,425,524,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_01.png',0,0,53,56,1,0)
	anim:SetHotSpot(26,28)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('kub_01',anim,445,425,531,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_02.png',0,0,52,58,1,0)
	anim:SetHotSpot(26,29)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('kub_02',anim,444,336,533,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_03.png',0,0,48,53,1,0)
	anim:SetHotSpot(24,26)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('kub_03',anim,446,381,525,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_04.png',0,0,45,52,1,0)
	anim:SetHotSpot(22,26)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('kub_04',anim,446,471,530,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/ZoomSarcophagusBg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('ZoomSarcophagusBg',anim,512,384,500,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_sarcophagus',anim,994,106,100,0,8,20)
	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_button',anim,444,404,550,0,6.19,21.92)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_01.png',0,0,53,56,1,0)
	anim:SetHotSpot(26,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube1',anim,174,94,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_02.png',0,0,52,58,1,0)
	anim:SetHotSpot(26,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube2',anim,136,44,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_03.png',0,0,48,53,1,0)
	anim:SetHotSpot(24,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube3',anim,347,392,100,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/kub_04.png',0,0,45,52,1,0)
	anim:SetHotSpot(22,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube4_tool',anim,171,46,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Photos/cube_1_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube_1_photo',anim,52,383,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Photos/cube_2_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube_2_photo',anim,88,374,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Photos/cube_3_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube_3_photo',anim,89,663,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Photos/cube_4_photo.jpg',0,0,177,298,1,0)
	anim:SetHotSpot(88,149)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cube_4_photo',anim,86,157,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Layers/sarcophagus_over1.png',0,0,170,104,1,0)
	anim:SetHotSpot(85,52)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('sarcophagus_over1',anim,555,408,532,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_tunnel',anim,361,557,100,0,8,15)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Layers/lever.png',0,0,43,56,1,0)
	anim:SetHotSpot(21,28)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('lever',anim,394,306,810,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Layers/ZoomTunnelBg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ZoomTunnelBg',anim,513,384,800,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Animations/fontan/nachalo.png',0,0,171,148,50,10)
	anim:SetHotSpot(85,74)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('nachalo',anim,709,488,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Animations/fontan/cikl.png',0,0,171,148,3,10)
	anim:SetHotSpot(85,74)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cikl',anim,708,487,115,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/Animations/ptic/nkla.png',0,0,175,165,1,0)
	anim:SetHotSpot(87,82)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('nkla',anim,578,291,80,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_fointain',anim,715,483,130,0,16,20)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Items/crab.png',0,0,92,64,1,0)
	anim:SetHotSpot(46,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crab',anim,274,510,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Items/crown.png',0,0,41,27,1,0)
	anim:SetHotSpot(20,13)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crown',anim,546,584,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Items/dragon.png',0,0,145,92,1,0)
	anim:SetHotSpot(72,46)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('dragon',anim,591,188,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Items/helmet.png',0,0,82,77,1,0)
	anim:SetHotSpot(41,38)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('helmet',anim,620,514,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Items/nest.png',0,0,67,52,1,0)
	anim:SetHotSpot(33,26)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('nest',anim,781,188,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Items/sword.png',0,0,54,182,1,0)
	anim:SetHotSpot(27,91)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('sword',anim,351,520,820,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomSarcophagus/Animations/green_bulb.png',0,0,72,35,37,15)
	anim:SetHotSpot(36,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('green_bulb',anim,553,375,524,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/32_mosque_/ZoomTunnel/Layers/cover.png',0,0,100,90,30,10)
	anim:SetHotSpot(50,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cover',anim,648,571,820,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
