dofile('data/Scripts/Scenes/Common.lua');
dofile('data/Scripts/Scenes/Animations/02_InsideTempleNearTheSea_Dino.lua');
dofile('data/Scripts/Scenes/Animations/02_InsideTempleNearTheSea_Top.lua');

------------------------------------------------------------------------------
--
function OnSceneLoad(restoringFromSave)
	InitGameState();

	play_field = playField;
    LoadData();
	play_field = nil;

    RootZoomZone = CreateZoomZone('RootZoomZone', nil, 
                                   nil, 0.0, 
                                   nil, 0.0,
							{'RootBackground',

							 'LayerOver01',
							 'LayerOver03',
							 'LayerOver04',
							 'LayerOver05',
							 'LayerOver06',
							 'LayerOverGroundGrid',
							 'button',
							 'groundGrid',
							 'StairsAnimation',

							 'actZoneTop',
							 'actZoneMinigame',
							 'actZoneButton',
							 'actZoneDoorFragment',
							 'actZoneBananas',
							 'actZoneExit',

							 'Bananas_onPlace',
							 'DinoStatuette_onPlace',
							 'GatePart_onPlace',

							 'GatePart',
							 'DinoStatuette',

							 'apricot',
							 'axe',
							 'bracelet',
							 'bucket',
							 'bug',
							 'butterfly',
							 'chest',
							 'deer',
							 'drum',
							 'eagle',
							 'flower',
							 'hammer',
							 'helmet',
							 'knife',
							 'lantern',
							 'lion',
							 'lizard',
							 'manStatue',
							 'mask',
							 'monkeyStatue',
							 'mouse',
							 'orchid',
							 'papaya',
							 'plate',
							 'rosary',
							 'sandals',
							 'seahorse',
							 'seashell',
							 'ship',
							 'skull',
							 'snake',
							 'spear',
							 'statuette',
							 'sword',
							 'urn',
							 'vase',
							 'wickerBasket'},

							{'Bananas_onPlace',
							 'DinoStatuette_onPlace',
							 'GatePart_onPlace'});

    TopZoomZone = CreateZoomZone('TopZoomZone', RootZoomZone,
                                 'actZoneTop', -120.0/180.0 * M_PI,
                                 'navigationZoneTop', 100.0/180.0 * M_PI,
							{'ZoomTopBackground',
							 'navigationZoneTop',
							 'LayerOverTreeBrunch',

							 'LayerOverDinos',
							 'LayerOverBeads',
							 'LayerOverBundleOfKeys',
							 'LayerOverCat',
							 'LayerOverHead',
							 'LayerOverMaraca',
							 'LayerOverMask',
							 'LayerOverPalmTree',
							 'LayerOverPinion',
							 'LayerOverRevolver',
							 'LayerOverSnake',
							 'LayerOverVase',
							 'LayerOverTreeBrunch',
							 'LayerOverRedCrystal',

							 'BlueCrystal_onPlace',
							 'RedCrystal_onPlace',

							 'actZoneRedCrystal',
							 'actZoneBlueCrystal',
							 'actZoneMechanism',

							 'Bananas',
							 'RedCrystal',
							 'BlueCrystal',
							 'MechanismPart',

							 'backpack',
							 'beads',
							 'bug1',
							 'bundleOfKeys',
							 'cat',
							 'chest1',
							 'coins',
							 'cup',
							 'drum1',
							 'earring',
							 'grapes',
							 'head',
							 'hookOnChain',
							 'leaves',
							 'lemur',
							 'lizard1',
							 'magnifyingGlass',
							 'maraca',
							 'mask1',
							 'orchid1',
							 'palmTree',
							 'parrot',
							 'pinion',
							 'pot',
							 'revolver',
							 'ruby',
							 'skull1',
							 'snake1',
							 'spiderWeb',
							 'statuette1',
							 'stone',
							 'sun',
							 'symbol',
							 'vase1'},

							{'BlueCrystal_onPlace',
							 'RedCrystal_onPlace'});

    MechanismZoomZone = CreateZoomZone('MechanismZoomZone', TopZoomZone, 
                                   'actZoneMechanism', 0.0, 
                                   nil, 0.0,
							{'ZoomMechanismBackground',
							 'actZoneMechanismPart',

							 'mechanismCap',
							 'lockHandle1',
							 'lockHandle2',
							 'lockHandle3',
							 'lockHandle4',
							 'crystalsGlow',
							 'eyesGlow',
							 'jaw',
							 'LayerForehead',
							 'LayerHead',
							 'maxilla',
							 'tongue',

							 'MechanismPart_onPlace'},

							{'MechanismPart_onPlace',
							 'crystalsGlow',
							 'eyesGlow'});

if (restoringFromSave == false) then
    AddRandomTasks(true, 2 * MISC_TASK_COUNT_18,
		CreateTask('apricot'),
		CreateTask('axe'),
		CreateTask('bracelet'),
		CreateTask('bucket'),
		CreateTask('bug'),
		CreateTask('butterfly'),
		CreatePriorityTask('chest'),
		CreatePriorityTask('deer'),
		CreateTask('drum'),
		CreateTask('eagle'),
		CreateTask('flower'),
		CreateTask('hammer'),
		CreateTask('helmet'),
		CreateTask('knife'),
		CreateTask('lantern'),
		CreateTask('lion'),
		CreateTask('lizard'),
--		CreateTask('manStatue'),
		CreateTask('mask'),
--		CreateTask('monkeyStatue'),
--		CreateTask('mouse'),
		CreateTask('orchid'),
		CreateTask('papaya'),
		CreateTask('plate'),
		CreateTask('rosary'),
		CreateTask('sandals'),
		CreateTask('seahorse'),
		CreateTask('seashell'),
		CreateTask('ship'),
		CreateTask('skull'),
		CreateTask('snake'),
		CreateTask('spear'),
		CreateTask('statuette'),
		CreateTask('sword'),
		CreateTask('urn'),
		CreateTask('vase'),
		CreateTask('wickerBasket'),

		CreateTask('backpack'),
		CreateTask('beads'),
		CreateTask('bug1'),
		CreateTask('bundleOfKeys'),
		CreateTask('cat'),
		CreateTask('chest1'),
		CreateTask('coins'),
		CreateTask('cup'),
		CreateTask('drum1'),
		CreateTask('earring'),
		CreateTask('grapes'),
--		CreateTask('head'),
		CreateTask('hookOnChain'),
		CreateTask('leaves'),
		CreateTask('lemur'),
		CreateTask('lizard1'),
		CreateTask('magnifyingGlass'),
		CreateTask('maraca'),
		CreateTask('mask1'),
		CreateTask('orchid1'),
		CreateTask('palmTree'),
		CreateTask('parrot'),
		CreateTask('pinion'),
		CreateTask('pot'),
		CreateTask('revolver'),
		CreateTask('ruby'),
		CreateTask('skull1'),
		CreateTask('snake1'),
		CreateTask('spiderWeb'),
		CreateTask('statuette1'),
		CreateTask('stone'),
		CreateTask('sun'),
		CreateTask('symbol'),
		CreateTask('vase1'));

    playField:GetLevelScreen():AddTaskSafe(CreateTask('DinoStatuette'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('GatePart'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('BlueCrystal'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('MechanismPart'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Bananas'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('RedCrystal'));
end

	CreateToolMap(	{'DinoStatuette', 	'actZoneButton'},
					{'GatePart', 		'actZoneDoorFragment'},
					{'BlueCrystal', 	'actZoneBlueCrystal'},
					{'MechanismPart',	'actZoneMechanismPart'},
					{'Bananas',			'actZoneBananas'},
					{'RedCrystal', 		'actZoneRedCrystal'});

	SetIconForGameObject(playField:GetObject('apricot'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/apricot_icon.png');
	SetIconForGameObject(playField:GetObject('axe'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/axe_icon.png');
	SetIconForGameObject(playField:GetObject('bracelet'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/bracelet_icon.png');
	SetIconForGameObject(playField:GetObject('bucket'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/bucket_icon.png');
	SetIconForGameObject(playField:GetObject('bug'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/bug_icon.png');
	SetIconForGameObject(playField:GetObject('butterfly'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/butterfly_icon.png');
	SetIconForGameObject(playField:GetObject('chest'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/chest_icon.png');
	SetIconForGameObject(playField:GetObject('deer'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/deer_icon.png');
	SetIconForGameObject(playField:GetObject('drum'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/drum_icon.png');
	SetIconForGameObject(playField:GetObject('eagle'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/eagle_icon.png');
	SetIconForGameObject(playField:GetObject('flower'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/flower_icon.png');
	SetIconForGameObject(playField:GetObject('hammer'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/hammer_icon.png');
	SetIconForGameObject(playField:GetObject('helmet'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/helmet_icon.png');
	SetIconForGameObject(playField:GetObject('knife'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/knife_icon.png');
	SetIconForGameObject(playField:GetObject('lantern'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/lantern_icon.png');
	SetIconForGameObject(playField:GetObject('lion'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/lion_icon.png');
	SetIconForGameObject(playField:GetObject('lizard'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/lizard_icon.png');
	SetIconForGameObject(playField:GetObject('manStatue'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/manStatue_icon.png');
	SetIconForGameObject(playField:GetObject('mask'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/mask_icon.png');
	SetIconForGameObject(playField:GetObject('monkeyStatue'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/monkeyStatue_icon.png');
	SetIconForGameObject(playField:GetObject('mouse'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/mouse_icon.png');
	SetIconForGameObject(playField:GetObject('orchid'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/orchid_icon.png');
	SetIconForGameObject(playField:GetObject('papaya'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/papaya_icon.png');
	SetIconForGameObject(playField:GetObject('plate'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/plate_icon.png');
	SetIconForGameObject(playField:GetObject('rosary'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/rosary_icon.png');
	SetIconForGameObject(playField:GetObject('sandals'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/sandals_icon.png');
	SetIconForGameObject(playField:GetObject('seahorse'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/seahorse_icon.png');
	SetIconForGameObject(playField:GetObject('seashell'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/seashell_icon.png');
	SetIconForGameObject(playField:GetObject('ship'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/ship_icon.png');
	SetIconForGameObject(playField:GetObject('skull'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/skull_icon.png');
	SetIconForGameObject(playField:GetObject('snake'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/snake_icon.png');
	SetIconForGameObject(playField:GetObject('spear'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/spear_icon.png');
	SetIconForGameObject(playField:GetObject('statuette'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/statuette_icon.png');
	SetIconForGameObject(playField:GetObject('sword'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/sword_icon.png');
	SetIconForGameObject(playField:GetObject('urn'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/urn_icon.png');
	SetIconForGameObject(playField:GetObject('vase'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/vase_icon.png');
	SetIconForGameObject(playField:GetObject('wickerBasket'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/wickerBasket_icon.png');

	SetIconForGameObject(playField:GetObject('backpack'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/backpack_icon.png');
	SetIconForGameObject(playField:GetObject('beads'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/beads_icon.png');
	SetIconForGameObject(playField:GetObject('bug1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/bug_icon.png');
	SetIconForGameObject(playField:GetObject('bundleOfKeys'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/bundleOfKeys_icon.png');
	SetIconForGameObject(playField:GetObject('cat'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/cat_icon.png');
	SetIconForGameObject(playField:GetObject('chest1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/chest_icon.png');
	SetIconForGameObject(playField:GetObject('coins'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/coins_icon.png');
	SetIconForGameObject(playField:GetObject('cup'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/cup_icon.png');
	SetIconForGameObject(playField:GetObject('drum1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/drum_icon.png');
	SetIconForGameObject(playField:GetObject('earring'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/earring_icon.png');
	SetIconForGameObject(playField:GetObject('grapes'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/grapes_icon.png');
	SetIconForGameObject(playField:GetObject('head'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/head_icon.png');
	SetIconForGameObject(playField:GetObject('hookOnChain'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/hookOnChain_icon.png');
	SetIconForGameObject(playField:GetObject('leaves'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/leaves_icon.png');
	SetIconForGameObject(playField:GetObject('lemur'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/lemur_icon.png');
	SetIconForGameObject(playField:GetObject('lizard1'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/lizard_icon.png');
	SetIconForGameObject(playField:GetObject('magnifyingGlass'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/magnifyingGlass_icon.png');
	SetIconForGameObject(playField:GetObject('maraca'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/maraca_icon.png');
	SetIconForGameObject(playField:GetObject('mask1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/mask_icon.png');
	SetIconForGameObject(playField:GetObject('orchid1'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/orchid_icon.png');
	SetIconForGameObject(playField:GetObject('palmTree'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/palmTree_icon.png');
	SetIconForGameObject(playField:GetObject('parrot'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/parrot_icon.png');
	SetIconForGameObject(playField:GetObject('pinion'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/pinion_icon.png');
	SetIconForGameObject(playField:GetObject('pot'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/pot_icon.png');
	SetIconForGameObject(playField:GetObject('revolver'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/revolver_icon.png');
	SetIconForGameObject(playField:GetObject('ruby'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/ruby_icon.png');
	SetIconForGameObject(playField:GetObject('skull1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/skull_icon.png');
	SetIconForGameObject(playField:GetObject('snake1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/snake_icon.png');
	SetIconForGameObject(playField:GetObject('spiderWeb'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/spiderWeb_icon.png');
	SetIconForGameObject(playField:GetObject('statuette1'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/statuette_icon.png');
	SetIconForGameObject(playField:GetObject('stone'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/stone_icon.png');
	SetIconForGameObject(playField:GetObject('sun'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/sun_icon.png');
	SetIconForGameObject(playField:GetObject('symbol'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/symbol_icon.png');
	SetIconForGameObject(playField:GetObject('vase1'),		'data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/vase_icon.png');

	SetIconForGameObject(playField:GetObject('Bananas'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Bananas_icon.png');
	SetIconForGameObject(playField:GetObject('GatePart'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/GatePart_icon.png');
	SetIconForGameObject(playField:GetObject('MechanismPart'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/MechanismPart_icon.png');
	SetIconForGameObject(playField:GetObject('DinoStatuette'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/DinoStatuette_icon.png');
	SetIconForGameObject(playField:GetObject('RedCrystal'),	'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/RedCrystal_icon.png');
	SetIconForGameObject(playField:GetObject('BlueCrystal'),'data/Texture/Scenes/02_InsideTempleNearTheSea/Items/BlueCrystal_icon.png');

if (restoringFromSave == false) then
	gameState.nextAnimationDelay = 0.0;

	gameState.finalZoomInPos = {playField:GetObject('actZoneExit'):GetScrX(), playField:GetObject('actZoneExit'):GetScrY()};

	gameState.dinoStatuetteInitPosY = playField:GetObject('DinoStatuette_onPlace'):GetY();
	gameState.buttonInitPosY = playField:GetObject('button'):GetY();
	gameState.dinoStatuettePushDistance = 110.0;
	gameState.mechanismCapInitPosY = playField:GetObject('mechanismCap'):GetY();
	gameState.mechanismCapShiftDistance = -100.0;
	gameState.mechanismMaxillaInitPosY = playField:GetObject('maxilla'):GetY();
	gameState.mechanismMaxillaShiftDistance = -10.0;
	gameState.mechanismJawFinalPosY = playField:GetObject('jaw'):GetY();
	gameState.mechanismJawShiftDistance = 67.0;
	gameState.mechanismTongueInitPosY = playField:GetObject('tongue'):GetY();
	gameState.mechanismTongueShiftDistance = -43;

	gameState.groundGridInitPos = {playField:GetObject('groundGrid'):GetX(), playField:GetObject('groundGrid'):GetY()};
	gameState.groundGridShift  = {60.0, 45.0};

	gameState.dinoStatuetteOnPlace = false;
	gameState.dinoSattuetteIsMoving = false;
	gameState.gatePartOnPlace = false;
	gameState.blueCrystalOnPlace = false;
	gameState.redCrystalOnPlace = false;
	gameState.mechanismPartOnPlace = false;
	gameState.bananasOnPlace = false;

	gameState.stairsActivated = false;
	gameState.stairsIsMoving = false;
	gameState.groundGridOpened = false;
	gameState.groundGridIsMoving = false;
	gameState.mechanismLock1Turned = false;
	gameState.mechanismLock2Turned = false;
	gameState.mechanismLock3Turned = false;
	gameState.mechanismLock4Turned = false;
	gameState.mechanismCapIsMoving = false;
	gameState.dinoIsMoving = false;
	gameState.dinoMoved = false;

	gameState.blueCrystalFound = false;
	gameState.redCrystalFound = false;

	gameState.clickedOnExit = false;

	gameState.allToolsApplied = false;
	gameState.levelCompleted = false;
end

	AssignActiveZonesGlow({function() return gameState.dinoStatuetteOnPlace or
											not gameState.gatePartOnPlace; end,		'actZoneButton',		'DinoStatuette_ghost'},
                          {function() return gameState.gatePartOnPlace; end,		'actZoneDoorFragment',	'GatePart_ghost'},
					      {function() return gameState.blueCrystalOnPlace; end,		'actZoneBlueCrystal',	'BlueCrystal_ghost'},
						  {function() return gameState.redCrystalOnPlace; end,		'actZoneRedCrystal',	'RedCrystal_ghost'},
						  {function() return gameState.mechanismPartOnPlace; end,	'actZoneMechanismPart',	'MechanismPart_ghost'},
						  {function() return gameState.bananasOnPlace; end,			'actZoneBananas',		'Bananas_ghost'});

    ApplyLevelDump(restoringFromSave);
	SetZoneVisible(RootZoomZone, true, false);

	auxSceneInit(restoringFromSave);
	auxProcessToolObjectStateAnCursorType();
end

------------------------------------------------------------------------------
--
function OnSceneFree()
    FreeData();

	StopSound('L02S11');
	StopSound('L02S12');
	StopSound('L02S13');
	StopSound('L02S14');
	StopSound('L02S15');
end

--// Local auxiliary functions - - - - - - - - - - - - - - - - - - - - - - - -
function auxSceneInit(restoringFromSave)
    local initialActions = function()
		ShowLevelIntro(02);
    end
	local regularActions = function()
		PlaySound('L02S15', true);

		gameState.customCursors['actZoneMechanism'] = {'CursorZoom'};

	    playField:IgnoreOnTestPoint('crystalsGlow');
	    playField:IgnoreOnTestPoint('LayerOverSnake');

		auxStopAnimation('StairsAnimation', HGEANIM_FWD + HGEANIM_NOLOOP);
    
		auxCreateDinoAnimations(playField:GetObject('RootBackground'));
		auxPlayDinoAnimation('Scene');
		auxPlayDinoAnimation('Env');
		auxPlayDinoAnimation('Fly2');
		auxPlayDinoAnimation('Fly1');

	    auxInitDinoAnimation();
    
		auxCreateDinoTopAnimations(playField:GetObject('ZoomTopBackground'));
		auxPlayDinoTopAnimation('Dino1');
		auxPlayDinoTopAnimation('Dino2');
		auxPlayDinoTopAnimation('TwigAnimation');
--		auxPlayDinoTopAnimation('Dust');
--		auxPlayDinoTopAnimation('Light');
		auxPlayDinoTopAnimation('EnvTop2');
		auxPlayDinoTopAnimation('L2Fly');
		auxPlayDinoTopAnimation('HummingBird1');
		auxPlayDinoTopAnimation('HummingBird2');

		gameState.dinoSattuetteIsMoving = false;
		gameState.stairsIsMoving = false;
		gameState.groundGridIsMoving = false;
		gameState.mechanismCapIsMoving = false;
		gameState.dinoIsMoving = false;

		gameState.nextAnimationDelay = 0.0;
	end

    if (restoringFromSave == false) then
        initialActions();
    end	
    regularActions();

	if (gameState.levelCompleted == true) then
		gameState.levelCompleted = false;

		local delay = 2.0;

		TimerDoString('playField:GetLevelScreen():ShowComicScreen(\'Level2Outro\');', delay, playField:GetTimer());
		TimerDoString('auxTestLevelCompleteCondition();', delay, playField:GetTimer());
	end
end

function auxProcessToolObjectStateAnCursorType()
    assert(gameState.dinoMoved ~= nil and
		   true);

	auxSetDinoStatuetteOnButton();
	if (gameState.dinoStatuetteOnPlace == true) then
		gameState.customCursors['actZoneButton'] = nil;
	else
		gameState.customCursors['actZoneButton'] = {'CursorArms'};
	end

	if (gameState.gatePartOnPlace == true) then
        RootZoomZone.UnhideObject('GatePart_onPlace');
        gameState.customCursors['actZoneDoorFragment'] = nil;
    else
        RootZoomZone.HideObject('GatePart_onPlace');
        gameState.customCursors['actZoneDoorFragment'] = {'CursorArms'};
    end

	if (gameState.blueCrystalOnPlace == true) then
		TopZoomZone.UnhideObject('BlueCrystal_onPlace');
        gameState.customCursors['actZoneBlueCrystal'] = nil;
	else
		TopZoomZone.HideObject('BlueCrystal_onPlace');
        gameState.customCursors['actZoneBlueCrystal'] = {'CursorArms'};
	end

	if (gameState.redCrystalOnPlace == true) then
		TopZoomZone.UnhideObject('RedCrystal_onPlace');
        gameState.customCursors['actZoneRedCrystal'] = nil;
	else
		TopZoomZone.HideObject('RedCrystal_onPlace');
        gameState.customCursors['actZoneRedCrystal'] = {'CursorArms'};
	end

	if (gameState.mechanismPartOnPlace == true) then
		MechanismZoomZone.UnhideObject('MechanismPart_onPlace');
        gameState.customCursors['actZoneMechanismPart'] = nil;
		--// block mechanism zoom-zone
		gameState.customCursors['actZoneMechanism'] = nil;
		gameState.lockedObjects['actZoneMechanism'] = true;
	else
		MechanismZoomZone.HideObject('MechanismPart_onPlace');
        gameState.customCursors['actZoneMechanismPart'] = {'CursorArms'};
		--// unblock mechanism zoom-zone
		gameState.customCursors['actZoneMechanism'] = {'CursorZoom'};
		gameState.lockedObjects['actZoneMechanism'] = nil;
	end

	if (gameState.bananasOnPlace == true) then
		RootZoomZone.UnhideObject('Bananas_onPlace');
        gameState.customCursors['actZoneBananas'] = nil;
	else
		RootZoomZone.HideObject('Bananas_onPlace');
        gameState.customCursors['actZoneBananas'] = {'CursorArms'};
	end


	if (gameState.mechanismLock1Turned == true) then
		playField:GetObject('lockHandle1'):SetOpacity(1.0);
        gameState.customCursors['lockHandle1'] = nil;
	else
		playField:GetObject('lockHandle1'):SetOpacity(0.1);
        gameState.customCursors['lockHandle1'] = {'CursorArms'};
	end

	if (gameState.mechanismLock2Turned == true) then
		playField:GetObject('lockHandle2'):SetOpacity(1.0);
        gameState.customCursors['lockHandle2'] = nil;
	else
		playField:GetObject('lockHandle2'):SetOpacity(0.1);
        gameState.customCursors['lockHandle2'] = {'CursorArms'};
	end

	if (gameState.mechanismLock3Turned == true) then
		playField:GetObject('lockHandle3'):SetOpacity(1.0);
        gameState.customCursors['lockHandle3'] = nil;
	else
		playField:GetObject('lockHandle3'):SetOpacity(0.1);
        gameState.customCursors['lockHandle3'] = {'CursorArms'};
	end

	if (gameState.mechanismLock4Turned == true) then
		playField:GetObject('lockHandle4'):SetOpacity(1.0);
        gameState.customCursors['lockHandle4'] = nil;
	else
		playField:GetObject('lockHandle4'):SetOpacity(0.1);
        gameState.customCursors['lockHandle4'] = {'CursorArms'};
	end

	if (gameState.mechanismCapIsMoving == false) then
		if (gameState.mechanismLock1Turned == true and
			gameState.mechanismLock2Turned == true and
			gameState.mechanismLock3Turned == true and
			gameState.mechanismLock4Turned == true) then
			auxSetMechanismCapOnButton(true);
		else
			auxSetMechanismCapOnButton(false);
		end
	end

	if (gameState.groundGridIsMoving == false) then
		if (gameState.groundGridOpened == true) then
			playField:GetObject('groundGrid'):SetXY(gameState.groundGridInitPos[1] + gameState.groundGridShift[1],
													gameState.groundGridInitPos[2] + gameState.groundGridShift[2]);
			if (gameState.stairsActivated == false) then
				gameState.customCursors['actZoneMinigame'] = {'CursorNavigation', 90.0/180.0 * M_PI};
			else
				gameState.customCursors['actZoneMinigame'] = nil;
			end
		else
			playField:GetObject('groundGrid'):SetXY(gameState.groundGridInitPos[1], gameState.groundGridInitPos[2]);
			gameState.customCursors['actZoneMinigame'] = nil;
		end
	end

	if (gameState.stairsIsMoving == false) then
	    if (playField:GetLevelScreen():HasUncompletedTask() == true) then
		    auxActivateStairs(gameState.stairsActivated);
		end
	end

    if (gameState.dinoIsMoving == false and dinoAnimationInfo == nil) then
	    if (gameState.dinoMoved == true) then
			auxInitDinoAnimation('DinoIdleAfterAction');
			gameState.customCursors['actZoneExit'] = {'CursorNavigation', -90/180.0 * M_PI};
		else
			auxInitDinoAnimation();
			gameState.customCursors['actZoneExit'] = nil;
		end
	end
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxInitDinoAnimation(compositionName)
	dinoAnimationInfo = {};
    dinoAnimationInfo.currentAnimationName = (compositionName ~= nil and compositionName or 'DinoIdle1');
    dinoAnimationInfo.startUpTime = 0.0;
    auxPlayDinoAnimation(dinoAnimationInfo.currentAnimationName);
end

function auxProcessDinoAnimation()
    assert(dinoAnimationInfo ~= nil and dinoAnimationInfo.currentAnimationName ~= nil and dinoAnimationInfo.startUpTime ~= nil);
    
    local composition = auxGetDinoAnimation(dinoAnimationInfo.currentAnimationName);
    if (gameState.elapsedTime - dinoAnimationInfo.startUpTime > 0.98 * composition:GetDuration()) then
        composition:Stop();
        composition:Rewind(false);
        composition:SetVisible(false);
        
        if (gameState.dinoMoved == false) then
            dinoAnimationInfo.currentAnimationName = (math.random(1,4) ~= 2 and 'DinoIdle1' or 'DinoIdle2');
			if (dinoAnimationInfo.currentAnimationName == 'DinoIdle2') then
				PlaySound('L02S13');
			end
        elseif (dinoAnimationInfo.currentAnimationName ~= 'DinoIdle1' and dinoAnimationInfo.currentAnimationName ~= 'DinoIdle2') then
--			gameState.dinoIsMoving = true;
			local compositionDuration = auxGetDinoAnimation(dinoAnimationInfo.currentAnimationName):GetDuration();
			TimerDoString('gameState.dinoIsMoving = false;', compositionDuration, playField:GetTimer());

			if (dinoAnimationInfo.currentAnimationName == 'DinoAction') then
				gameState.customCursors['actZoneExit'] = {'CursorNavigation', -90/180.0 * M_PI};
				HighlightGameObject(playField:GetObject('actZoneExit'), playField:GetTimer(), 2.0);
				HighlightGameObject(playField:GetObject('actZoneExit'), playField:GetTimer(), 2.5);
				HighlightGameObject(playField:GetObject('actZoneExit'), playField:GetTimer(), 3.0);
			end
            dinoAnimationInfo.currentAnimationName = 'DinoIdleAfterAction';
        else
			PlaySound('L02S12');
            dinoAnimationInfo.currentAnimationName = 'DinoAction';
        end
        dinoAnimationInfo.startUpTime = gameState.elapsedTime;
        auxPlayDinoAnimation(dinoAnimationInfo.currentAnimationName);
    end
end

function auxUnlockGate()
	gameState.dinoIsMoving = true;
	gameState.dinoMoved = true;
end
--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxActivateStairs(state)
	assert(state ~= nil);

	if (state == true) then
		playField:GetObject('StairsAnimation'):GetAnimation():SetFrame(playField:GetObject('StairsAnimation'):GetAnimation():GetFrames() - 1);
		gameState.lockedObjects['actZoneTop'] = nil;
		gameState.customCursors['actZoneTop'] = {'CursorNavigation', -120.0/180.0 * M_PI};
	else
		playField:GetObject('StairsAnimation'):GetAnimation():SetFrame(0);
		gameState.lockedObjects['actZoneTop'] = true;
		gameState.customCursors['actZoneTop'] = nil;
	end
end

function auxPlayStairsAnimation()
	if (playField:GetObject('StairsAnimation'):GetAnimation():IsPlaying()) then
		return;
	end

	gameState.lockedObjects['actZoneTop'] = nil;
	gameState.customCursors['actZoneTop'] = {'CursorNavigation', -120.0/180.0 * M_PI};

	gameState.stairsActivated = true;

	gameState.stairsIsMoving = true;
	local delay = 0.5;
	TimerDoString('gameState.stairsIsMoving = false;', delay, playField:GetTimer());

	PlaySound('L02S11');
	playField:GetObject('StairsAnimation'):GetAnimation():Play();
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxSetDinoStatuetteOnButton()
	if (gameState.dinoSattuetteIsMoving == false) then
		local state = (gameState.dinoStatuetteOnPlace == gameState.gatePartOnPlace);

		if (state == true) then
			RootZoomZone.UnhideObject('DinoStatuette_onPlace');
			playField:GetObject('DinoStatuette_onPlace'):SetY(gameState.dinoStatuetteInitPosY + gameState.dinoStatuettePushDistance);
			playField:GetObject('button'):SetY(gameState.buttonInitPosY + gameState.dinoStatuettePushDistance);
		else
			RootZoomZone.HideObject('DinoStatuette_onPlace');
			playField:GetObject('DinoStatuette_onPlace'):SetY(gameState.dinoStatuetteInitPosY);
			playField:GetObject('button'):SetY(gameState.buttonInitPosY);
		end
	end
end

function auxLiftUpButton()
	local buttonObj = playField:GetObject('button');
	local duration = 0.5;

	gameState.dinoSattuetteIsMoving = true;
	TimerDoString('gameState.dinoSattuetteIsMoving = false;', duration, playField:GetTimer());

	assert(gameState.dinoStatuetteOnPlace == false);
	buttonObj:SetY(gameState.buttonInitPosY + gameState.dinoStatuettePushDistance);
	buttonObj:Move(0.0, -gameState.dinoStatuettePushDistance, duration);
end

function auxPlayDinoStatuetteAnimation()
	local statueObj = playField:GetObject('DinoStatuette_onPlace');
	local buttonObj = playField:GetObject('button');
	local duration = 0.5;

	gameState.dinoSattuetteIsMoving = true;
	local delay = 0.5;
	TimerDoString('gameState.dinoSattuetteIsMoving = false;', duration + delay, playField:GetTimer());

	RootZoomZone.UnhideObject('DinoStatuette_onPlace');
	statueObj:SetY(gameState.dinoStatuetteInitPosY);
	statueObj:Move(0.0, gameState.dinoStatuettePushDistance, duration);
	buttonObj:SetY(gameState.buttonInitPosY);
	buttonObj:Move(0.0, gameState.dinoStatuettePushDistance, duration);

	TimerDoString('auxPlayGroundGridOpeningAnimation();', delay, playField:GetTimer());
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxSetMechanismCapOnButton(state)
	assert(state ~= nil);

	if (state == true) then
		playField:GetObject('mechanismCap'):SetY(gameState.mechanismCapInitPosY + gameState.mechanismCapShiftDistance);
		playField:GetObject('maxilla'):SetY(gameState.mechanismMaxillaInitPosY + gameState.mechanismMaxillaShiftDistance);
		playField:GetObject('jaw'):SetY(gameState.mechanismJawFinalPosY);
		playField:GetObject('tongue'):SetY(gameState.mechanismTongueInitPosY + gameState.mechanismTongueShiftDistance);
		MechanismZoomZone.UnhideObject('eyesGlow');
		MechanismZoomZone.UnhideObject('crystalsGlow');
	else
		playField:GetObject('mechanismCap'):SetY(gameState.mechanismCapInitPosY);
		playField:GetObject('maxilla'):SetY(gameState.mechanismMaxillaInitPosY);
		playField:GetObject('jaw'):SetY(gameState.mechanismJawFinalPosY - gameState.mechanismJawShiftDistance);
		playField:GetObject('tongue'):SetY(gameState.mechanismTongueInitPosY);
		MechanismZoomZone.HideObject('eyesGlow');
		MechanismZoomZone.HideObject('crystalsGlow');
	end
end

function auxPlayMechanismCapAnimation()
	local objCap = playField:GetObject('mechanismCap');
	local objMaxilla = playField:GetObject('maxilla');
	local objJaw = playField:GetObject('jaw');
	local objTongue = playField:GetObject('tongue');
	local duration = 0.5;

	gameState.mechanismCapIsMoving = true;
	TimerDoString('gameState.mechanismCapIsMoving = false;', duration, playField:GetTimer());

	objCap:SetY(gameState.mechanismCapInitPosY);
	objCap:Move(0.0, gameState.mechanismCapShiftDistance, duration);
	objMaxilla:SetY(gameState.mechanismMaxillaInitPosY);
	objMaxilla:Move(0.0, gameState.mechanismMaxillaShiftDistance, duration);
	objJaw:SetY(gameState.mechanismJawFinalPosY - gameState.mechanismJawShiftDistance);
	objJaw:Move(0.0, gameState.mechanismJawShiftDistance, duration);
	objTongue:SetY(gameState.mechanismTongueInitPosY);
	objTongue:Move(0.0, gameState.mechanismTongueShiftDistance, duration);
	MechanismZoomZone.UnhideObject('eyesGlow');
	MechanismZoomZone.UnhideObject('crystalsGlow');
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxPlayGroundGridOpeningAnimation()
	local obj = playField:GetObject('groundGrid');
	local duration = 0.5;

	gameState.groundGridOpened = true;
	gameState.groundGridIsMoving = true;
	TimerDoString('gameState.groundGridIsMoving = false;', duration, playField:GetTimer());
	
	PlaySound('L02S14');
	obj:SetXY(gameState.groundGridInitPos[1], gameState.groundGridInitPos[2]);
	obj:Move(gameState.groundGridShift[1], gameState.groundGridShift[2], duration);

	HighlightGameObject(playField:GetObject('actZoneMinigame'), playField:GetTimer(), 2.0);
	HighlightGameObject(playField:GetObject('actZoneMinigame'), playField:GetTimer(), 2.5);
	HighlightGameObject(playField:GetObject('actZoneMinigame'), playField:GetTimer(), 3.0);

	gameState.customCursors['actZoneMinigame'] = {'CursorNavigation', 90.0/180.0 * M_PI};
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxUpdatePeriodicAnimations(dt)
	if (gameState.nextAnimationDelay == 0.0) then
		local animations1 = {};
		local animations2 = {};

		for compositionName, composition in pairs(dinoCompositions) do
			if (composition:IsCyclic() == false) then
				table.insert(animations1, composition:GetName());
			end
		end

		for compositionName, composition in pairs(l3topCompositions) do
			if (composition:IsCyclic() == false) then
				table.insert(animations2, composition:GetName());
			end
		end

		local animName1 = animations1[math.random(1, table.getn(animations1))];
		local animName2 = animations2[math.random(1, table.getn(animations2))];

		if (animName1 ~= nil) then
			local composition = auxGetDinoAnimation(animName1);

            if (composition ~= nil and composition:IsPaused() == true) then
				auxPlayDinoAnimation(animName1);
			end
		end

		if (animName2 ~= nil) then
			local composition = auxGetDinoTopAnimation(animName2);

            if (composition ~= nil and composition:IsPaused() == true) then
				auxPlayDinoTopAnimation(animName2);
			end
		end

		gameState.nextAnimationDelay = math.random(4, 10);
	else
		gameState.nextAnimationDelay = (gameState.nextAnimationDelay - dt >= 0.0 and gameState.nextAnimationDelay - dt or 0.0);
	end
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxTestLevelCompleteCondition()
	if (gameState.clickedOnExit == true and

		gameState.allToolsApplied == true and
		gameState.levelCompleted == false and
		playField:GetLevelScreen():HasUncompletedTask() == false) then

		gameState.levelCompleted = true;
		TimerDoString('OnWin();', 2.0, playField:GetTimer());
	end
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

------------------------------------------------------------------------------
--
function OnDialogButtonPress(name, param)
end

------------------------------------------------------------------------------
--
function OnUpdate(dt)
    auxProcessDinoAnimation();

	auxUpdatePeriodicAnimations(dt);

    DefaultOnUpdate(dt);
end

------------------------------------------------------------------------------
--
function OnWin()
	DefaultOnWin();
end

------------------------------------------------------------------------------
--
function OnObjectMouseEnter(object)
    local objectName = object:GetName();

    DefaultOnObjectMouseEnter(object);
	ActivateActiveZoneGlow(objectName);
end

------------------------------------------------------------------------------
--
function OnObjectMouseLeave(object)
    local objectName = object:GetName();

    DefaultOnObjectMouseLeave(object);
    DeactivateActiveZoneGlow(objectName);
end

------------------------------------------------------------------------------
--
function OnObjectMouseDown(object)
    local objectName = object:GetName();
    local isWrongClick = true;

	assert(gameState.activeZone ~= nil and gameState.locker:GetNReferences() > 0);

    if (gameState.lockedObjects[objectName] ~= true) then
        if (gameState.activeZone.HasObject(objectName)) then
            isWrongClick = DefaultOnZoomZoneActiveObjectClick(objectName);

			--// ...
--if (objectName == 'RootBackground') then
--    if (pScale ~= 1.0) then
--	    auxZoomPlayFieldOut();
--	else
--        local mPos = GetMousePos();
--	    auxZoomPlayFieldIn(2.0, {mPos.x, mPos.y});
--	end
--end
--local x1 = (_G['gameState'].blueCrystalOnPlace);
--local x2 = gameState.blueCrystalOnPlace;

			if (gameState.blueCrystalOnPlace == true and 
				gameState.redCrystalOnPlace == true and
				gameState.gatePartOnPlace == true) then

		        local lockHandleName = 'lockHandle';
	            local lockHandleNameLen = string.len(lockHandleName);

				if (string.sub(objectName,1,lockHandleNameLen) == lockHandleName) then
				    assert(string.len(objectName) == lockHandleNameLen + 1);
				    local handleIndex = tonumber(string.sub(objectName, lockHandleNameLen + 1, lockHandleNameLen + 2));
				    assert(handleIndex >=1 and handleIndex <= 4);
				    local state = gameState['mechanismLock'..tostring(handleIndex)..'Turned'];
				    assert(state ~= nil);
				    if (state == false) then
				        gameState['mechanismLock'..tostring(handleIndex)..'Turned'] = true;
						PlaySound('L02S16');
						if (gameState.mechanismLock1Turned == true and
							gameState.mechanismLock2Turned == true and
							gameState.mechanismLock3Turned == true and
							gameState.mechanismLock4Turned == true) then

							auxPlayMechanismCapAnimation();
							PlaySound('L02S17');
						end
	    			    auxProcessToolObjectStateAnCursorType();
						isWrongClick = false;
	    			end
				end
			end

			if (gameState.groundGridOpened == true and objectName == 'actZoneMinigame' and gameState.stairsActivated == false) then
				local delay = 1.0;
				TimerDoString('auxPlayStairsAnimation();', delay, playField:GetTimer());
				TimerDoString('gameState.customCursors[\'actZoneMinigame\'] = nil;', delay, playField:GetTimer());

				HighlightGameObject(playField:GetObject('actZoneTop'), playField:GetTimer(), 3.0);
				HighlightGameObject(playField:GetObject('actZoneTop'), playField:GetTimer(), 2.0);
				gameState.stairsActivated = true;
				playField:GetLevelScreen():RunMiniGame('data/Scripts/Minigames/Platforms.lua');
				isWrongClick = false;
			end

			if (objectName == 'actZoneExit' and gameState.customCursors['actZoneExit'] ~= nil and
				gameState.dinoMoved == true and
				gameState.levelCompleted == false) then

				if (playField:GetLevelScreen():HasUncompletedTask() == false and
					gameState.clickedOnExit == false) then

					gameState.clickedOnExit = true;
--					gameState.levelCompleted = true;
					isWrongClick = false;
					gameState.lockedObjects['actZoneTop'] = true;
					gameState.customCursors['actZoneTop'] = nil;
					--// play outro comix
					playField:GetLevelScreen():ShowComicScreen('Level2Outro');
--	auxZoomPlayField(2.0, {playField:GetObject('actZoneExit'):GetScrX(), playField:GetObject('actZoneExit'):GetScrY()});

--					TimerDoString('OnWin();', 2.0, playField:GetTimer());
					auxTestLevelCompleteCondition();
	                isWrongClick = false;
				end
			end


	        if (isWrongClick == true and playField:GetLevelScreen():IsTaskObject(objectName)) then
	            auxAttachInPlace(object, playField);
				object:ResetClippingRect();
				--// remove object from zoom-zone which contents it
				assert(gameState.activeZone.objects[objectName] ~= nil);
				gameState.activeZone.objects[objectName] = nil;

                playField:OnObjectFound(object);
                isWrongClick = false;
            end
        else
--			assert(gameState.activeZone ~= RootZoomZone and 
--				   gameState.locker:GetNReferences() > 1 and
--				   'Attempt to close root scene - you have clicked on an object which hasn`t been added to any zoom-zone');
            if (gameState.activeZone ~= RootZoomZone and gameState.locker:GetNReferences() > 1) then
                if (gameState.lockedObjects[gameState.activeZone.activeObject] == nil) then
                    SetZoneVisible(gameState.activeZone, false);
                end
            else
                Log('Lua: OnObjectMouseDown(\''..objectName..'\'): Was made click on object which hasn`t been attached to any zoom-zone');
            end
        end --// if (gameState.activeZone.HasObject(...
    end --// if (gameState.lockedObjects[...

	--// Tips - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
	if (objectName == 'actZoneButton' and (gameState.gatePartOnPlace == false or gameState.dinoStatuetteOnPlace == false)) then
		if (gameState.gatePartOnPlace == false) then
		    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_BUTTON_OFF_TIP1'));
		elseif (gameState.dinoStatuetteOnPlace == false) then
		    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_BUTTON_ON_TIP1'));
		end
	elseif (objectName == 'actZoneBananas' and gameState.bananasOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_BANANAS_PLACE_TIP'));
	elseif ((objectName == 'actZoneRedCrystal' and gameState.redCrystalOnPlace == false) or
			(objectName == 'actZoneBlueCrystal' and gameState.blueCrystalOnPlace == false)) then
		    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_CRYSTAL_PLACE'));
	elseif (objectName == 'actZoneExit' and gameState.dinoMoved == false and gameState.dinoIsMoving == false and 
		gameState.bananasOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_GATE_TIP1'),
										   GetTextString('LEVEL2_GATE_TIP2'),
										   GetTextString('LEVEL2_GATE_TIP3'));
	elseif (objectName == 'actZoneDoorFragment' and gameState.gatePartOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_TALE_MISSING_TIP1'),
										   GetTextString('LEVEL2_TALE_MISSING_TIP2'));
	elseif ((objectName == 'ZoomMechanismBackground' or
			 objectName == 'lockHandle1' or objectName == 'lockHandle2' or objectName == 'lockHandle3' or objectName == 'lockHandle4') and 
			(gameState.blueCrystalOnPlace == false or gameState.redCrystalOnPlace == false or gameState.gatePartOnPlace == false)) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_MECH_BROKEN_TIP1'),
										   GetTextString('LEVEL2_MECH_BROKEN_TIP2'),
										   GetTextString('LEVEL2_MECH_BROKEN_TIP3'));
	elseif (objectName == 'actZoneExit' and gameState.customCursors['actZoneExit'] ~= nil and
			gameState.dinoMoved == true and gameState.levelCompleted == false and 
			playField:GetLevelScreen():HasUncompletedTask() == true) then
	    playField:GetLevelScreen():ShowTip(GetTextString('HAVE_TO_FIND_ITEMS_MSG1'),
										   GetTextString('HAVE_TO_FIND_ITEMS_MSG2'));
	else
	    playField:GetLevelScreen():HideTip();
	end
	--//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

    DefaultOnObjectClick(object, isWrongClick, not playField:GetLevelScreen():IsTipShown());
    DefaultOnObjectMouseEnter(object);
end

------------------------------------------------------------------------------
--
function OnObjectMouseUp(object)
end

------------------------------------------------------------------------------
--
function OnObjectFound(object)
    local objectName = object:GetName();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	if (objectName == 'BlueCrystal') then
		gameState.blueCrystalFound = true;
	elseif (objectName == 'RedCrystal') then
		gameState.redCrystalFound = true;
	end
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	local objectMustBeHighlighted = DefaultOnObjectFound(object);
	return objectMustBeHighlighted;
end

------------------------------------------------------------------------------
--
function OnToolFound(tool)
end

------------------------------------------------------------------------------
--
function CanToolBeApplied(tool, object)
	local toolName = tool:GetName();
	local objName = object:GetName();
    local canToolBeApplied = true;
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	canToolBeApplied = DefaultCanToolBeApplied(tool, object);
	return canToolBeApplied;
end

------------------------------------------------------------------------------
--
function OnToolApply(tool, object)
	local toolName = tool:GetName();
	local objName = object:GetName();
    local toolApplied = false;

	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	if (toolName == 'DinoStatuette' and objName == gameState.toolMap[toolName]) then
		if (gameState.gatePartOnPlace == true) then
	    	gameState.dinoStatuetteOnPlace = true;
			toolApplied = true;
auxPlayDinoStatuetteAnimation();
		else
		    playField:GetLevelScreen():ShowTip(GetTextString('CANNT_USE_ITEM_YET_TIP1'),
											   GetTextString('CANNT_USE_ITEM_YET_TIP2'));
			return;
		end
	end
	if (toolName == 'GatePart' and objName == gameState.toolMap[toolName]) then
    	gameState.gatePartOnPlace = true;
		toolApplied = true;
auxLiftUpButton();
		HighlightGameObject(playField:GetObject('actZoneButton'), playField:GetTimer(), 3.0);
		HighlightGameObject(playField:GetObject('actZoneButton'), playField:GetTimer(), 2.0);
	end
	if (toolName == 'BlueCrystal' and objName == gameState.toolMap[toolName]) then
    	gameState.blueCrystalOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'RedCrystal' and objName == gameState.toolMap[toolName]) then
    	gameState.redCrystalOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'MechanismPart' and objName == gameState.toolMap[toolName]) then
    	gameState.mechanismPartOnPlace = true;
		toolApplied = true;

		CloseAndBlockActiveZone();
		if (gameState.bananasOnPlace == true) then
			CloseActiveZone();

			assert(gameState.activeZone == RootZoomZone);

			auxUnlockGate();
		end
	end
	if (toolName == 'Bananas' and objName == gameState.toolMap[toolName]) then
    	gameState.bananasOnPlace = true;
		toolApplied = true;

		if (gameState.lockedObjects['actZoneMechanism'] == true) then
			auxUnlockGate();
		end
	end
	if (not toolApplied) then
	    playField:GetLevelScreen():ShowTip(GetTextString('WRONG_ITEM_APPLIED_TIP1'),
										   GetTextString('WRONG_ITEM_APPLIED_TIP2'));
	end

	if (gameState.dinoStatuetteOnPlace == true and
    	gameState.gatePartOnPlace == true and
    	gameState.blueCrystalOnPlace == true and
    	gameState.redCrystalOnPlace == true and
    	gameState.mechanismPartOnPlace == true and
    	gameState.bananasOnPlace == true and
		gameState.allToolsApplied == false) then

		gameState.allToolsApplied = true;
		if (playField:GetLevelScreen():HasUncompletedTask() == true) then
		    playField:GetLevelScreen():ShowTip(GetTextString('HAVE_TO_FIND_ITEMS_MSG1'),
											   GetTextString('HAVE_TO_FIND_ITEMS_MSG2'));
		else
			gameState.lockedObjects['actZoneTop'] = true;
			gameState.customCursors['actZoneTop'] = nil;
			auxTestLevelCompleteCondition();
		end
	end

    if (gameState.blueCrystalOnPlace == true and gameState.redCrystalOnPlace == true and gameState.gatePartOnPlace == true and
		(toolName == 'BlueCrystal' or toolName == 'RedCrystal' or toolName == 'GatePart')) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL2_MECH_PARTS_FOUND'));
    end

	auxProcessToolObjectStateAnCursorType();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DefaultOnObjectMouseEnter(object);
	if (toolApplied == true) then
	    DeactivateActiveZoneDeactivatedGlow(object:GetName());
	end
	return toolApplied;
end

------------------------------------------------------------------------------
--
function OnObjectReachPanel(object)
    local objectName = object:GetName();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	if (playField:GetLevelScreen():HasUncompletedTask() == false and gameState.allToolsApplied == true) then
		gameState.lockedObjects['actZoneTop'] = true;
		gameState.customCursors['actZoneTop'] = nil;
	end
	auxTestLevelCompleteCondition();
end

------------------------------------------------------------------------------
--
function OnButtonPress(zoneName)
    DefaultOnButtonPress(zoneName);
end

------------------------------------------------------------------------------
--
function OnMouseMove(prevMousePos, currentMousePos)
end

------------------------------------------------------------------------------
--
function OnSetTool(tool)
end

------------------------------------------------------------------------------
-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData()
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/background.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('RootBackground',anim,512,384,97,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneMinigame',anim,925,659,100,0,1.6,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneButton',anim,790,622,104,0,0.6,1.2)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneDoorFragment',anim,388,309,104,0,1,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneBananas',anim,284,503,100,0,2,1.2)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneExit',anim,563,440,99,0,1.6,2)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOver01.png',0,0,24,66,1,0)
	anim:SetHotSpot(12,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver01',anim,393,621,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOver03.png',0,0,56,42,1,0)
	anim:SetHotSpot(28,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver03',anim,865,142,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOver04.png',0,0,36,50,1,0)
	anim:SetHotSpot(18,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver04',anim,550,255,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOver05.png',0,0,56,55,1,0)
	anim:SetHotSpot(28,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver05',anim,615,586,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOver06.png',0,0,96,84,1,0)
	anim:SetHotSpot(48,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver06',anim,197,606,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOverDino.png',0,0,704,124,1,0)
	anim:SetHotSpot(352,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverDino',anim,543,592,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/LayerOverGroundGrid.png',0,0,289,126,1,0)
	anim:SetHotSpot(144,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverGroundGrid',anim,879,706,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Bananas_onPlace.png',0,0,168,142,1,0)
	anim:SetHotSpot(84,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Bananas_onPlace',anim,211,524,99,70,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/DinoStatuette_onPlace.png',0,0,78,128,1,0)
	anim:SetHotSpot(39,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DinoStatuette_onPlace',anim,786,603,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/GatePart_onPlace.png',0,0,80,80,1,0)
	anim:SetHotSpot(40,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GatePart_onPlace',anim,388,324,99,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/button.png',0,0,73,36,1,0)
	anim:SetHotSpot(36,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('button',anim,793,643,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/groundGrid.png',0,0,223,61,1,0)
	anim:SetHotSpot(111,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('groundGrid',anim,914,649,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Layers/StairsAnimation.png',0,0,161,243,10,12)
	anim:SetHotSpot(80,121)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('StairsAnimation',anim,892,377,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/GatePart.png',0,0,72,70,1,0)
	anim:SetHotSpot(36,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GatePart',anim,360,54,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/DinoStatuette.png',0,0,78,128,1,0)
	anim:SetHotSpot(39,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DinoStatuette',anim,889,535,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/apricot.png',0,0,67,39,1,0)
	anim:SetHotSpot(33,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('apricot',anim,952,481,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/axe.png',0,0,102,124,1,0)
	anim:SetHotSpot(51,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('axe',anim,303,672,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/bracelet.png',0,0,105,48,1,0)
	anim:SetHotSpot(52,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bracelet',anim,392,692,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/bucket.png',0,0,135,159,1,0)
	anim:SetHotSpot(67,79)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bucket',anim,872,692,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/bug.png',0,0,61,77,1,0)
	anim:SetHotSpot(30,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bug',anim,126,206,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/butterfly.png',0,0,72,80,1,0)
	anim:SetHotSpot(36,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('butterfly',anim,858,60,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/chest.png',0,0,124,49,1,0)
	anim:SetHotSpot(62,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('chest',anim,353,375,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/deer.png',0,0,80,75,1,0)
	anim:SetHotSpot(40,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('deer',anim,548,381,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/drum.png',0,0,86,111,1,0)
	anim:SetHotSpot(43,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('drum',anim,426,602,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/eagle.png',0,0,90,43,1,0)
	anim:SetHotSpot(45,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('eagle',anim,693,52,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/flower.png',0,0,89,82,1,0)
	anim:SetHotSpot(44,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('flower',anim,175,615,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/hammer.png',0,0,135,75,1,0)
	anim:SetHotSpot(67,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('hammer',anim,786,704,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/helmet.png',0,0,102,107,1,0)
	anim:SetHotSpot(51,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('helmet',anim,435,712,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/knife.png',0,0,109,77,1,0)
	anim:SetHotSpot(54,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('knife',anim,526,596,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/lantern.png',0,0,77,115,1,0)
	anim:SetHotSpot(38,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lantern',anim,149,366,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/lion.png',0,0,102,70,1,0)
	anim:SetHotSpot(51,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lion',anim,785,337,104,0,0.6,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/lizard.png',0,0,155,43,1,0)
	anim:SetHotSpot(77,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lizard',anim,491,81,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/manStatue.png',0,0,96,220,1,0)
	anim:SetHotSpot(48,110)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('manStatue',anim,205,457,98,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/mask.png',0,0,68,85,1,0)
	anim:SetHotSpot(34,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('mask',anim,992,356,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/monkeyStatue.png',0,0,86,145,1,0)
	anim:SetHotSpot(43,72)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('monkeyStatue',anim,189,549,103,0,0.6,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/mouse.png',0,0,74,50,1,0)
	anim:SetHotSpot(37,25)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('mouse',anim,166,126,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/orchid.png',0,0,75,78,1,0)
	anim:SetHotSpot(37,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('orchid',anim,720,195,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/papaya.png',0,0,102,66,1,0)
	anim:SetHotSpot(51,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('papaya',anim,769,677,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/plate.png',0,0,92,53,1,0)
	anim:SetHotSpot(46,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('plate',anim,843,551,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/rosary.png',0,0,63,76,1,0)
	anim:SetHotSpot(31,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('rosary',anim,359,625,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/sandals.png',0,0,61,65,1,0)
	anim:SetHotSpot(30,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sandals',anim,756,260,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/seahorse.png',0,0,40,80,1,0)
	anim:SetHotSpot(20,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('seahorse',anim,562,282,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/seashell.png',0,0,69,60,1,0)
	anim:SetHotSpot(34,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('seashell',anim,531,549,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/ship.png',0,0,87,68,1,0)
	anim:SetHotSpot(43,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('ship',anim,228,188,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/skull.png',0,0,90,81,1,0)
	anim:SetHotSpot(45,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('skull',anim,937,691,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/snake.png',0,0,123,109,1,0)
	anim:SetHotSpot(61,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('snake',anim,301,283,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/spear.png',0,0,362,37,1,0)
	anim:SetHotSpot(181,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spear',anim,442,735,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/statuette.png',0,0,112,109,1,0)
	anim:SetHotSpot(56,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('statuette',anim,615,624,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/sword.png',0,0,135,105,1,0)
	anim:SetHotSpot(67,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sword',anim,642,598,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/urn.png',0,0,67,87,1,0)
	anim:SetHotSpot(33,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('urn',anim,635,548,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/vase.png',0,0,47,57,1,0)
	anim:SetHotSpot(23,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('vase',anim,669,322,99,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Misc/wickerBasket.png',0,0,100,121,1,0)
	anim:SetHotSpot(50,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('wickerBasket',anim,928,526,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneTop',anim,909,187,100,-15,1.6,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('navigationZoneTop',anim,639,732,211,0,4.5,1.3)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/background.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('ZoomTopBackground',anim,512,384,199,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverDinos.png',0,0,543,336,1,0)
	anim:SetHotSpot(271,168)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverDinos',anim,630,378,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverBeads.png',0,0,106,123,1,0)
	anim:SetHotSpot(53,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverBeads',anim,478,582,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverBundleOfKeys.png',0,0,44,43,1,0)
	anim:SetHotSpot(22,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverBundleOfKeys',anim,848,39,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverCat.png',0,0,147,88,1,0)
	anim:SetHotSpot(73,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverCat',anim,138,409,207,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverHead.png',0,0,104,42,1,0)
	anim:SetHotSpot(52,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverHead',anim,303,311,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverMaraca.png',0,0,49,41,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverMaraca',anim,479,166,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverMask.png',0,0,85,100,1,0)
	anim:SetHotSpot(42,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverMask',anim,402,399,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverPalmTree.png',0,0,99,137,1,0)
	anim:SetHotSpot(49,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPalmTree',anim,214,308,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverPinion.png',0,0,83,39,1,0)
	anim:SetHotSpot(41,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPinion',anim,637,488,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverRevolver.png',0,0,84,62,1,0)
	anim:SetHotSpot(42,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverRevolver',anim,768,414,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverSnake.png',0,0,117,96,1,0)
	anim:SetHotSpot(58,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverSnake',anim,966,68,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverVase.png',0,0,91,88,1,0)
	anim:SetHotSpot(45,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverVase',anim,460,472,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverTreeBrunch.png',0,0,267,153,1,0)
	anim:SetHotSpot(133,76)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverTreeBrunch',anim,550,186,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Layers/LayerOverRedCrystal.png',0,0,136,136,1,0)
	anim:SetHotSpot(68,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverRedCrystal',anim,391,594,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/BlueCrystal_onPlace.png',0,0,164,142,30,12)
	anim:SetHotSpot(82,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('BlueCrystal_onPlace',anim,337,290,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/RedCrystal_onPlace.png',0,0,164,142,30,12)
	anim:SetHotSpot(82,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('RedCrystal_onPlace',anim,745,283,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneBlueCrystal',anim,339,326,205,0,0.7,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneRedCrystal',anim,748,323,205,0,0.9,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Bananas.png',0,0,78,148,1,0)
	anim:SetHotSpot(39,74)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Bananas',anim,870,227,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/RedCrystal.png',0,0,136,136,1,0)
	anim:SetHotSpot(68,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('RedCrystal',anim,406,587,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/BlueCrystal.png',0,0,129,127,1,0)
	anim:SetHotSpot(65,63)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('BlueCrystal',anim,684,562,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/MechanismPart.png',0,0,76,106,1,0)
	anim:SetHotSpot(38,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('MechanismPart',anim,792,225,203,0,0.7,0.7)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/backpack.png',0,0,165,159,1,0)
	anim:SetHotSpot(82,79)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('backpack',anim,256,691,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/beads.png',0,0,96,54,1,0)
	anim:SetHotSpot(48,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('beads',anim,502,568,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/bug.png',0,0,65,80,1,0)
	anim:SetHotSpot(32,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bug1',anim,336,611,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/bundleOfKeys.png',0,0,64,117,1,0)
	anim:SetHotSpot(32,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bundleOfKeys',anim,842,77,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/cat.png',0,0,114,168,1,0)
	anim:SetHotSpot(57,84)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cat',anim,130,359,206,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/chest.png',0,0,150,116,1,0)
	anim:SetHotSpot(75,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('chest1',anim,952,599,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/coins.png',0,0,141,88,1,0)
	anim:SetHotSpot(70,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('coins',anim,829,576,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/cup.png',0,0,135,107,1,0)
	anim:SetHotSpot(67,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cup',anim,773,576,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/drum.png',0,0,123,88,1,0)
	anim:SetHotSpot(61,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('drum1',anim,893,457,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/earring.png',0,0,84,52,1,0)
	anim:SetHotSpot(42,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('earring',anim,981,745,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/grapes.png',0,0,77,93,1,0)
	anim:SetHotSpot(38,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('grapes',anim,235,499,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/head.png',0,0,92,60,1,0)
	anim:SetHotSpot(46,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('head',anim,308,297,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/hookOnChain.png',0,0,36,195,1,0)
	anim:SetHotSpot(18,97)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('hookOnChain',anim,187,156,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/leaves.png',0,0,52,63,1,0)
	anim:SetHotSpot(26,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('leaves',anim,540,221,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/lemur.png',0,0,66,139,1,0)
	anim:SetHotSpot(33,69)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lemur',anim,604,163,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/lizard.png',0,0,140,123,1,0)
	anim:SetHotSpot(70,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lizard1',anim,610,528,206,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/magnifyingGlass.png',0,0,86,36,1,0)
	anim:SetHotSpot(43,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('magnifyingGlass',anim,720,502,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/maraca.png',0,0,57,72,1,0)
	anim:SetHotSpot(28,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('maraca',anim,501,141,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/mask.png',0,0,45,130,1,0)
	anim:SetHotSpot(22,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('mask1',anim,410,351,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/orchid.png',0,0,84,68,1,0)
	anim:SetHotSpot(42,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('orchid1',anim,861,599,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/palmTree.png',0,0,108,130,1,0)
	anim:SetHotSpot(54,65)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('palmTree',anim,233,298,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/parrot.png',0,0,84,135,1,0)
	anim:SetHotSpot(42,67)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('parrot',anim,988,523,206,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/pinion.png',0,0,67,66,1,0)
	anim:SetHotSpot(33,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pinion',anim,633,468,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/pot.png',0,0,94,65,1,0)
	anim:SetHotSpot(47,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pot',anim,770,472,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/revolver.png',0,0,94,61,1,0)
	anim:SetHotSpot(47,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('revolver',anim,809,400,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/ruby.png',0,0,50,53,1,0)
	anim:SetHotSpot(25,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('ruby',anim,795,244,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/skull.png',0,0,102,91,1,0)
	anim:SetHotSpot(51,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('skull1',anim,982,662,206,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/snake.png',0,0,90,115,1,0)
	anim:SetHotSpot(45,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('snake1',anim,975,80,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/spiderWeb.png',0,0,49,96,1,0)
	anim:SetHotSpot(24,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spiderWeb',anim,365,227,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/statuette.png',0,0,65,140,1,0)
	anim:SetHotSpot(32,70)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('statuette1',anim,991,364,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/stone.png',0,0,74,48,1,0)
	anim:SetHotSpot(37,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('stone',anim,608,629,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/sun.png',0,0,87,84,1,0)
	anim:SetHotSpot(43,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sun',anim,384,89,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/symbol.png',0,0,49,59,1,0)
	anim:SetHotSpot(24,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('symbol',anim,484,558,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Items/Misc/vase.png',0,0,58,112,1,0)
	anim:SetHotSpot(29,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('vase1',anim,457,429,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneMechanism',anim,590,413,203,0,1.2,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomMechanismBackground',anim,590,334,300,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneMechanismPart',anim,591,423,304,0,0.7,0.7)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/lockHandleRtUp.png',0,0,159,166,1,0)
	anim:SetHotSpot(80,83)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('lockHandle1',anim,698,220,304,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/lockHandleRtDn.png',0,0,157,160,1,0)
	anim:SetHotSpot(80,80)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('lockHandle2',anim,710,442,304,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/lockHandleLfDn.png',0,0,152,173,1,0)
	anim:SetHotSpot(76,86)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('lockHandle3',anim,478,447,304,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/lockHandleLfUp.png',0,0,165,161,1,0)
	anim:SetHotSpot(82,81)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('lockHandle4',anim,477,227,304,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/crystalsGlow.png',0,0,420,424,1,0)
	anim:SetHotSpot(210,212)
	anim:SetBlendMode(0)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('crystalsGlow',anim,589,334,310,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/eyesGlow.png',0,0,98,30,1,0)
	anim:SetHotSpot(49,15)
	anim:SetBlendMode(0)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('eyesGlow',anim,592,340,310,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/jaw.png',0,0,90,134,1,0)
	anim:SetHotSpot(45,67)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('jaw',anim,592,428,301,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/LayerForehead.png',0,0,96,34,1,0)
	anim:SetHotSpot(48,17)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerForehead',anim,591,323,305,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/LayerHead.png',0,0,146,116,1,0)
	anim:SetHotSpot(73,58)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerHead',anim,590,317,303,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/maxilla.png',0,0,84,70,1,0)
	anim:SetHotSpot(42,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('maxilla',anim,590,362,304,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/tongue.png',0,0,42,62,1,0)
	anim:SetHotSpot(21,31)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('tongue',anim,590,403,302,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Zones/Top/Zones/Mechanism/mechanismCap.png',0,0,160,160,1,0)
	anim:SetHotSpot(80,80)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('mechanismCap',anim,591,427,306,0,0.7,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/MechanismPart_onPlace.png',0,0,76,106,1,0)
	anim:SetHotSpot(38,53)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('MechanismPart_onPlace',anim,593,417,302,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/MechanismPart_ghost.png',0,0,96,128,1,0)
	anim:SetHotSpot(48,64)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('MechanismPart_ghost',anim,594,418,305,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/Bananas_ghost.png',0,0,212,196,1,0)
	anim:SetHotSpot(105,98)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Bananas_ghost',anim,210,522,100,70,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/DinoStatuette_ghost.png',0,0,78,128,1,0)
	anim:SetHotSpot(39,64)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DinoStatuette_ghost',anim,786,603,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/GatePart_ghost.png',0,0,80,80,1,0)
	anim:SetHotSpot(40,40)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GatePart_ghost',anim,387,324,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/BlueCrystal_ghost.png',0,0,160,180,1,0)
	anim:SetHotSpot(80,90)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('BlueCrystal_ghost',anim,334,299,206,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/02_InsideTempleNearTheSea/Items/RedCrystal_ghost.png',0,0,160,160,1,0)
	anim:SetHotSpot(80,80)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('RedCrystal_ghost',anim,741,286,206,0,1,1)
end

function FreeData()
end
-- CLEAR_ON_SAVE_END
