dofile('data/Scripts/Scenes/Common.lua');
dofile('data/Scripts/Scenes/Animations/01_TempleNearTheSea_SarcophagusOpening.lua');
dofile('data/Scripts/Scenes/Animations/01_TempleNearTheSea_Animations.lua');

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

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

    RootZoomZone = CreateZoomZone('RootZoomZone', nil, 
                                   nil, 0.0, 
                                   nil, 0.0,
							{'RootBackground',
							 'columnLayer',
							 'sarcophagusOpenedBack',
							 'gateOpeningAnimation',
							 'SarcophagusKey1OnPlaceSmall',
							 'SarcophagusKey2OnPlaceSmall',
							 'Sarcophagus_Item',
							 'GateKeyLeftGeneralView',
							 'GateKeyRightGeneralView',
							 'dino1',
							 'dino2',
							 'dino3',
							 'dinoLayer',
							 'SarcophagusKey1',
							 'SarcophagusKey2',

							 'actZoneSarcophagus',
							 'actZoneShelf',
                             'actZoneRoomWithWell',
							 'actZoneGateLock',

							 'GlowCactusItem',
							 'GlowSarcophagusKey',
							 'GlowSarcophagusKey1',
							 'GlowSarcophagus',
							 'actZoneInventoryButton',
							 'actZoneFirstInventoryItem',

							 'blackBall',
							 'broom',
							 'cactus',
							 'catStatuette',
							 'diamond',
							 'feather',
							 'garlic',
							 'onion',
							 'padLock',
							 'tambourine',
							 'teapot',
							 'wateringCan'},

							{'sarcophagusOpenedBack',
							 'SarcophagusKey1OnPlaceSmall',
							 'SarcophagusKey2OnPlaceSmall',
							 'Sarcophagus_Item',
							 'GateKeyLeftGeneralView',
							 'GateKeyRightGeneralView',
							 'SarcophagusKey2'},			--// (!) tutorial corrections
							{'leftStatueEyesGlow',
							 'rightStatueEyesGlow'});

    SarcophagusZoomZone = CreateZoomZone('SarcophagusZoomZone', RootZoomZone, 
                                         'actZoneSarcophagus', 0.0, 
                                          nil, 0.0,
							{'ZoomSarcophagusBackground',
							 'DoorRightKey',
							 'KeyLayerOver',
							 'SarcophagusKey1OnPlace',
							 'SarcophagusKey2OnPlace',
							 'actZoneSarcophagusKey1',
							 'actZoneSarcophagusKey2'},
							{'SarcophagusKey1OnPlace',
							 'SarcophagusKey2OnPlace'});

    ShelfZoomZone = CreateZoomZone('ShelfZoomZone', RootZoomZone, 
                                   'actZoneShelf', 0.0,
                                   nil, 0.0,
							{'ZoomShelfBackground',
							 'DoorLeftKey'},
							{});

    RoomWithWellZoomZone = CreateZoomZone('RoomWithWellZoomZone', RootZoomZone, 
                                          'actZoneRoomWithWell', -170.0/180.0 * M_PI, 
                                          'navigationZoneRoomWithWell', 10.0/180.0 * M_PI,
							{'ZoomRoomWithWellBackground',
							 'navigationZoneRoomWithWell',

							 'wellAnimation',
							 'BucketOnRopeLayer',
							 'BucketOnRope',
							 'rope',
							 'amuletLayer',
							 'actZoneWellBucket',
							 'actZoneWellWheel',

							 'amulet',
							 'barrel',
							 'basket',
							 'blackBall1',
							 'blueBird',
							 'catStatuette1',
							 'diadem',
							 'flower',
							 'greenMask',
							 'indianWarBonnet',
							 'oldCoin',
							 'owlAmulet',
							 'plate',
							 'pyramid',
							 'roundPendant',
							 'setOfFeathers',
							 'skull',
							 'trinket',
							 'urn',
							 'woodenBrooch',
							 'woodenIdol',
							 'Bucket',
							 'WellWheel'},

							{'wellAnimation',
                             'BucketOnRope'},

							{'wellRadialGlow'});

    GateLockZoomZone = CreateZoomZone('GateLockZoomZone', RootZoomZone, 
                                      'actZoneGateLock', 0.0,
                                      nil, 0.0,
							{'ZoomGateLockBackground',
							 'doorLeftKeyOnPlace',
							 'doorRightKeyOnPlace',
							 'actZoneDoorLeftKey',
							 'actZoneDoorRightKey'},

							{'doorLeftKeyOnPlace',
							 'doorRightKeyOnPlace'},
							{'statueEyesGlowZoomed'});

if (restoringFromSave == false) then
    AddRandomTasks(true, MISC_TASK_COUNT_12,
		CreateTask('blackBall'),
		CreateTask('broom'),
		CreatePriorityTask('cactus'),
		CreateTask('catStatuette'),
		CreateTask('diamond'),
		CreateTask('feather'),
		CreateTask('garlic'),
		CreateTask('onion'),
		CreateTask('padLock'),
		CreateTask('tambourine'),
		CreateTask('teapot'),
		CreateTask('wateringCan'),

		CreateTask('amulet'),
		CreateTask('barrel'),
		CreateTask('basket'),
		CreateTask('blackBall1'),
		CreateTask('blueBird'),
		CreateTask('catStatuette1'),
		CreateTask('diadem'),
		CreateTask('flower'),
		CreateTask('greenMask'),
		CreateTask('indianWarBonnet'),
		CreateTask('oldCoin'),
		CreateTask('owlAmulet'),
		CreateTask('plate'),
		CreateTask('pyramid'),
		CreateTask('roundPendant'),
		CreateTask('setOfFeathers'),
		CreateTask('skull'),
		CreateTask('trinket'),
		CreateTask('urn'),
		CreateTask('woodenBrooch'),
		CreateTask('woodenIdol')
--		CreatePriorityTask('BATER-1','', 'bater-1'),
--		CreateTask('BATER-2', 		'', 'bater-2')
	);

    playField:GetLevelScreen():AddTaskSafe(CreateTask('SarcophagusKey1'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('DoorRightKey'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('DoorLeftKey'));
--    playField:GetLevelScreen():AddTaskSafe(CreateTask('SarcophagusKey2'));	--// (!) tutorial corrections
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Bucket'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('WellWheel'));
end

	CreateToolMap(	{'DoorRightKey', 	'actZoneDoorRightKey'},
					{'DoorLeftKey', 	'actZoneDoorLeftKey'},
					{'SarcophagusKey1', 'actZoneSarcophagusKey1'},
					{'SarcophagusKey2', 'actZoneSarcophagusKey2'},
					{'Bucket', 	        'actZoneWellBucket'},
					{'WellWheel', 		'actZoneWellWheel'});

	SetIconForGameObject(playField:GetObject('DoorRightKey'), 	'data/Texture/Scenes/01_TempleNearTheSea/Items/DoorRightKey_icon.png');
	SetIconForGameObject(playField:GetObject('DoorLeftKey'), 	'data/Texture/Scenes/01_TempleNearTheSea/Items/DoorLeftKey_icon.png');
	SetIconForGameObject(playField:GetObject('SarcophagusKey1'),'data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey1_icon.png');
	SetIconForGameObject(playField:GetObject('SarcophagusKey2'),'data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey2_icon.png');
	SetIconForGameObject(playField:GetObject('Bucket'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Bucket_icon.png');
	SetIconForGameObject(playField:GetObject('WellWheel'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/WellWheel_icon.png');

	SetIconForGameObject(playField:GetObject('blackBall'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/blackBall_icon.png');
	SetIconForGameObject(playField:GetObject('broom'), 			'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/broom_icon.png');
	SetIconForGameObject(playField:GetObject('cactus'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/cactus_icon.png');
	SetIconForGameObject(playField:GetObject('catStatuette'),	'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/catStatuette_icon.png');
	SetIconForGameObject(playField:GetObject('diamond'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/diamond_icon.png');
	SetIconForGameObject(playField:GetObject('feather'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/feather_icon.png');
	SetIconForGameObject(playField:GetObject('garlic'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/garlic_icon.png');
	SetIconForGameObject(playField:GetObject('onion'), 			'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/onion_icon.png');
	SetIconForGameObject(playField:GetObject('padLock'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/padLock_icon.png');
	SetIconForGameObject(playField:GetObject('tambourine'), 	'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/tambourine_icon.png');
	SetIconForGameObject(playField:GetObject('teapot'), 		'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/teapot_icon.png');
	SetIconForGameObject(playField:GetObject('wateringCan'),	'data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/wateringCan_icon.png');

	SetIconForGameObject(playField:GetObject('amulet'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/amulet_icon.png');
	SetIconForGameObject(playField:GetObject('barrel'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/barrel_icon.png');
	SetIconForGameObject(playField:GetObject('basket'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/basket_icon.png');
	SetIconForGameObject(playField:GetObject('blackBall1'), 	'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/blackBall1_icon.png');
	SetIconForGameObject(playField:GetObject('blueBird'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/blueBird_icon.png');
	SetIconForGameObject(playField:GetObject('catStatuette1'), 	'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/catStatuette1_icon.png');
	SetIconForGameObject(playField:GetObject('diadem'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/diadem_icon.png');
	SetIconForGameObject(playField:GetObject('flower'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/flower_icon.png');
	SetIconForGameObject(playField:GetObject('greenMask'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/greenMask_icon.png');
	SetIconForGameObject(playField:GetObject('indianWarBonnet'),'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/indianWarBonnet_icon.png');
	SetIconForGameObject(playField:GetObject('oldCoin'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/oldCoin_icon.png');
	SetIconForGameObject(playField:GetObject('owlAmulet'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/owlAmulet_icon.png');
	SetIconForGameObject(playField:GetObject('plate'), 			'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/plate_icon.png');
	SetIconForGameObject(playField:GetObject('pyramid'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/pyramid_icon.png');
	SetIconForGameObject(playField:GetObject('roundPendant'), 	'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/roundPendant_icon.png');
	SetIconForGameObject(playField:GetObject('setOfFeathers'), 	'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/setOfFeathers_icon.png');
	SetIconForGameObject(playField:GetObject('skull'), 			'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/skull_icon.png');
	SetIconForGameObject(playField:GetObject('trinket'), 		'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/trinket_icon.png');
	SetIconForGameObject(playField:GetObject('urn'), 			'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/urn_icon.png');
	SetIconForGameObject(playField:GetObject('woodenBrooch'),	'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/woodenBrooch_icon.png');
	SetIconForGameObject(playField:GetObject('woodenIdol'), 	'data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/woodenIdol_icon.png');

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

	gameState.highlightPeriod = 5.0;
	gameState.finalZoomInPos = nil;

	gameState.tutorialStarted		 = false;
	gameState.tutorialFinished		 = false;
	gameState.tutorialNextWindowDelay= 1.25;
	gameState.additionalDelayTime 	 = 0.0;
	gameState.tutorialObjectInFocus	 = nil;
	gameState.tutorialGlow = {};
	gameState.tutorialFinishTime	 = nil;

	gameState.sarcophagusKey1OnPlace = false;
	gameState.sarcophagusKey2OnPlace = true;	--// false;	--// (!) tutorial corrections
	gameState.doorLeftKeyOnPlace	 = false;
	gameState.doorRightKeyOnPlace	 = false;
	gameState.wellBucketOnPlace		 = false;
	gameState.wellWheelOnPlace		 = false;

	gameState.gateOpened			 = false;
	gameState.sarcophagusOpened		 = false;
	gameState.keyInSarcophagusCollected = false;
	gameState.bucketDroppedDown		 = false;

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

	AssignActiveZonesGlow({function() return gameState.sarcophagusKey1OnPlace; end, 'actZoneSarcophagusKey1',	'SarcophagusKey1Ghost'},
                          {function() return gameState.sarcophagusKey2OnPlace; end, 'actZoneSarcophagusKey2',	'SarcophagusKey2Ghost'},
					      {function() return gameState.doorLeftKeyOnPlace; 	   end,	'actZoneDoorLeftKey',		'DoorLeftKeyGhost'},
						  {function() return gameState.doorRightKeyOnPlace;    end,	'actZoneDoorRightKey',		'DoorRightKeyGhost'},
						  {function() return gameState.wellBucketOnPlace; 	   end,	'actZoneWellBucket',		'BucketGhost'},
						  {function() return gameState.wellWheelOnPlace; 	   end,	'actZoneWellWheel',			'WellWheelGhost'});

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

	auxSceneInit(restoringFromSave);
	auxProcessToolObjectStateAnCursorType();
end

------------------------------------------------------------------------------
--
function OnSceneFree()
    tutorialStep = nil;
    FreeData();

	StopSound('L01S11');
	StopSound('L01S12');
	StopSound('L01S13');
	StopSound('L01S14');
	StopSound('L01S15');
	StopSound('L01S16');
end

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

    	auxCreateSarcophagusAnimation(playField:GetObject('ZoomSarcophagusBackground'));
		auxCreateTempleNearTheSeaAnimations(playField:GetObject('RootBackground'),
											playField:GetObject('ZoomRoomWithWellBackground'));
		auxPlayTempleNearTheSeaAnimation('EnvTop1');
--		auxPlayTempleNearTheSeaAnimation('Ants');
--		auxPlayTempleNearTheSeaAnimation('Fly1');
--		auxPlayTempleNearTheSeaAnimation('Fly2');
          
		auxPlayTempleNearTheSeaAnimation('EnvTop2');
--		auxPlayTempleNearTheSeaAnimation('L2Fly1');
--		auxPlayTempleNearTheSeaAnimation('L2Fly2');
--		auxPlayTempleNearTheSeaAnimation('Ant');
		auxPlayTempleNearTheSeaAnimation('WellGlow');


    	gameState.customCursors['actZoneSarcophagus'] = {'CursorZoom'};
    	gameState.customCursors['actZoneShelf'] = {'CursorZoom'};
    	gameState.customCursors['actZoneGateLock'] = {'CursorZoom'};

    	gameState.customCursors['actZoneWellBucket'] = {'CursorArms'};
    	gameState.customCursors['actZoneWellWheel'] = {'CursorArms'};
    	gameState.customCursors['actZoneSarcophagusKey1'] = {'CursorArms'};
    	gameState.customCursors['actZoneSarcophagusKey2'] = {'CursorArms'};
    	gameState.customCursors['actZoneDoorLeftKey'] = {'CursorArms'};
    	gameState.customCursors['actZoneDoorRightKey'] = {'CursorArms'};

    	gameState.customCursors['dino1'] = {'CursorArms'};
    	gameState.customCursors['dino2'] = {'CursorArms'};
    	gameState.customCursors['dino3'] = {'CursorArms'};

--		gameState.lockedObjects['actZoneRoomWithWell'] = true;

        playField:IgnoreOnTestPoint('dinoLayer');
        playField:IgnoreOnTestPoint('wellRadialGlow');
        playField:IgnoreOnTestPoint('statueEyesGlowZoomed');
        playField:IgnoreOnTestPoint('leftStatueEyesGlow');
        playField:IgnoreOnTestPoint('rightStatueEyesGlow');

    	playField:GetObject('dino1Run'):SetVisible(false);
    	playField:GetObject('dino2Run'):SetVisible(false);
    	playField:GetObject('dino3Run'):SetVisible(false);
        
        --// attch key object
    	auxStopAnimation('wellAnimation', HGEANIM_FWD + HGEANIM_NOLOOP);
        auxInitKeyInSarcophagusPosition();

    	auxSetSarcophagusOpened(gameState.sarcophagusOpened);
    	auxSetGateOpened(gameState.gateOpened);

    	auxInitTutorialItemGlow();
	end

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

		--// disable tutorial when game is restore¢ from save
		gameState.tutorialStarted = true;
		gameState.tutorialFinished = true;
		playField:GetLevelScreen():GetGamePanel():LockToolBarButton(false);
		playField:GetLevelScreen():SetHintsActive(false);
		gameState.tutorialObjectInFocus = nil;
    end	
    regularActions();

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

function auxProcessToolObjectStateAnCursorType()
    assert(gameState.sarcophagusKey1OnPlace ~= nil and
           gameState.sarcophagusKey2OnPlace ~= nil and
           gameState.doorLeftKeyOnPlace ~= nil and
	       gameState.doorRightKeyOnPlace ~= nil and
	       gameState.wellBucketOnPlace ~= nil and
	       gameState.wellWheelOnPlace ~= nil and
		   gameState.keyInSarcophagusCollected ~= nil);

    if (gameState.sarcophagusKey1OnPlace == true) then
        SarcophagusZoomZone.UnhideObject('SarcophagusKey1OnPlace');
		RootZoomZone.UnhideObject('SarcophagusKey1OnPlaceSmall');
		gameState.customCursors['actZoneSarcophagusKey1'] = nil;
    else
        SarcophagusZoomZone.HideObject('SarcophagusKey1OnPlace');
		RootZoomZone.HideObject('SarcophagusKey1OnPlaceSmall');
		gameState.customCursors['actZoneSarcophagusKey1'] = {'CursorArms'};
    end

    if (gameState.sarcophagusKey2OnPlace == true) then
        SarcophagusZoomZone.UnhideObject('SarcophagusKey2OnPlace');
		RootZoomZone.UnhideObject('SarcophagusKey2OnPlaceSmall');
		gameState.customCursors['actZoneSarcophagusKey2'] = nil;
    else
        SarcophagusZoomZone.HideObject('SarcophagusKey2OnPlace');
		RootZoomZone.HideObject('SarcophagusKey2OnPlaceSmall');
		gameState.customCursors['actZoneSarcophagusKey2'] = {'CursorArms'};
    end

	if (gameState.doorLeftKeyOnPlace == true) then
		GateLockZoomZone.UnhideObject('doorLeftKeyOnPlace');
	    RootZoomZone.UnhideObject('GateKeyLeftGeneralView');
		gameState.customCursors['actZoneDoorLeftKey'] = nil;
	else
		GateLockZoomZone.HideObject('doorLeftKeyOnPlace');
	    RootZoomZone.HideObject('GateKeyLeftGeneralView');
		gameState.customCursors['actZoneDoorLeftKey'] = {'CursorArms'};
	end

	if (gameState.doorRightKeyOnPlace == true) then
		GateLockZoomZone.UnhideObject('doorRightKeyOnPlace');
	    RootZoomZone.UnhideObject('GateKeyRightGeneralView');
		gameState.customCursors['actZoneDoorRightKey'] = nil;
	else
		GateLockZoomZone.HideObject('doorRightKeyOnPlace');
	    RootZoomZone.HideObject('GateKeyRightGeneralView');
		gameState.customCursors['actZoneDoorRightKey'] = {'CursorArms'};
	end

	if (gameState.wellBucketOnPlace == true) then
		RoomWithWellZoomZone.UnhideObject('BucketOnRope');
		RoomWithWellZoomZone.HideObject('rope');
		gameState.customCursors['actZoneWellBucket'] = nil;
	else
		RoomWithWellZoomZone.HideObject('BucketOnRope');
		RoomWithWellZoomZone.UnhideObject('rope');
		gameState.customCursors['actZoneWellBucket'] = {'CursorArms'};
	end

	if (gameState.wellWheelOnPlace == true) then
		RoomWithWellZoomZone.UnhideObject('wellAnimation');
		gameState.customCursors['actZoneWellWheel'] = nil;
	else
		RoomWithWellZoomZone.HideObject('wellAnimation');
		gameState.customCursors['actZoneWellWheel'] = {'CursorArms'};
	end

	if (gameState.wellBucketOnPlace == true and gameState.wellWheelOnPlace == true) then
		if (gameState.bucketDroppedDown == true) then
			gameState.customCursors['actZoneWellBucket'] = {'CursorNavigation', 90.0/180.0 * M_PI};
			gameState.customCursors['actZoneWellWheel'] = nil;
		else
			gameState.customCursors['actZoneWellBucket'] = nil;
			gameState.customCursors['actZoneWellWheel'] = {'CursorArms'};
		end
	end

    assert(gameState.sarcophagusOpened ~= nil);
	if (gameState.keyInSarcophagusCollected == false and gameState.sarcophagusOpened == true) then
	    RootZoomZone.UnhideObject('Sarcophagus_Item');
	else
	    RootZoomZone.HideObject('Sarcophagus_Item');
	end

	--// lock zoom-zones
	if (playField:HasObject('DoorLeftKey') == false) then
		gameState.customCursors['actZoneShelf'] = nil;
		gameState.lockedObjects['actZoneShelf'] = true;
	else
		gameState.customCursors['actZoneShelf'] = {'CursorZoom'};
		gameState.lockedObjects['actZoneShelf'] = nil;
	end
	if (playField:HasObject('DoorRightKey') == false) then
		gameState.customCursors['actZoneSarcophagus'] = nil;
		gameState.lockedObjects['actZoneSarcophagus'] = true;
	else
		gameState.customCursors['actZoneSarcophagus'] = {'CursorZoom'};
		gameState.lockedObjects['actZoneSarcophagus'] = nil;
	end

end

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

function auxInitKeyInSarcophagusPosition()
	if (playField:HasObject('DoorRightKey') == true) then
	    playField:GetObject('DoorRightKey'):SetZ(playField:GetObject('keyPlatform'):GetZ() + 0.005);
	    auxAttachInPlace(playField:GetObject('DoorRightKey'), playField:GetObject('keyPlatform'));
	end
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxInitTutorialItemGlow()
	local CreateGlowEffect = function(objectName, glowObject)
			assert(gameState.tutorialGlow ~= nil and gameState.tutorialGlow[objectName] == nil);

			playField:IgnoreOnTestPoint(glowObject);
			local obj = playField:GetObject(glowObject);
			obj:SetOpacity(0.0);

			if (playField:HasObject(objectName) == true) then
				assert(playField:HasObject(glowObject) == true);

				local eff = CreateAnimationEffector();
				eff:AttachTo(obj);
				eff:SetMode(_ANIM_FWD + _ANIM_LOOP);

				if (objectName == 'actZoneSarcophagus') then
			        eff:SetKey(_TRACK_SX, 0, 0.8);
			        eff:SetKey(_TRACK_SY, 0, 0.8);
			        eff:SetKey(_TRACK_SX, 1.5, 1.4);
			        eff:SetKey(_TRACK_SY, 1.5, 1.4);
	    		    eff:SetKey(_TRACK_O, 0, 0);
			        eff:SetKey(_TRACK_O, 0.4, 1);
			        eff:SetKey(_TRACK_O, 1.5, 0);
				else
			        eff:SetKey(_TRACK_SX, 0, 	0.4);
			        eff:SetKey(_TRACK_SY, 0, 	0.4);
			        eff:SetKey(_TRACK_SX, 0.4, 	1);
			        eff:SetKey(_TRACK_SY, 0.4, 	1);
			        eff:SetKey(_TRACK_SX, 1.5, 	1.4);
			        eff:SetKey(_TRACK_SY, 1.5, 	1.4);
			        eff:SetKey(_TRACK_O, 0,		0);
			        eff:SetKey(_TRACK_O, 0.4, 	1);
			        eff:SetKey(_TRACK_O, 1.5, 	0);
				end

				eff:SetToStart();
				gameState.tutorialGlow[objectName] = eff;
			end
		end

	CreateGlowEffect('cactus', 'GlowCactusItem');
	CreateGlowEffect('SarcophagusKey1', 'GlowSarcophagusKey');
	CreateGlowEffect('actZoneSarcophagusKey1', 'GlowSarcophagusKey1');
	CreateGlowEffect('actZoneSarcophagus', 'GlowSarcophagus');
end
function auxSetTutorialItemGlowActive(objectName, state)
	assert(gameState.tutorialGlow ~= nil);

	if (--[[playField:GetLevelScreen():IsHintsActive() == true and]] playField:HasObject(objectName) == true and gameState.tutorialGlow[objectName] ~= nil) then
		local eff = gameState.tutorialGlow[objectName];

		if (state == true) then
			eff:Stop();
			eff:SetToStart();
			eff:Play();
		else
			eff:Stop();
			eff:SetToFinish();
		end
	end
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxSetGateStatuesEyeGlowVisible(state)
	assert(type(state) == 'boolean');

    playField:GetObject('leftStatueEyesGlow'):SetVisible(state);
    playField:GetObject('rightStatueEyesGlow'):SetVisible(state);
    playField:GetObject('statueEyesGlowZoomed'):SetVisible(state);
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxSetSarcophagusOpened(state)
	assert(type(state) == 'boolean');

	if (state == true) then
	    RootZoomZone.UnhideObject('sarcophagusOpenedBack');
		gameState.lockedObjects['DoorRightKey'] = nil;
		auxSetToFinishSarcophagusAnimation();
	else
	    RootZoomZone.HideObject('sarcophagusOpenedBack');
		gameState.lockedObjects['DoorRightKey'] = true;
		auxSetToStartSarcophagusAnimation();
	end
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxHighlightKeyInSarcophagus()
	if (playField:HasObject('DoorRightKey') == true) then
	    HighlightGameObject(playField:GetObject('DoorRightKey'), playField:GetTimer(), 2.0);
	    HighlightGameObject(playField:GetObject('DoorRightKey'), playField:GetTimer(), 3.0);
	end
end

function auxOpenSarcophagus()
    RootZoomZone.UnhideObject('sarcophagusOpenedBack');	
    RootZoomZone.UnhideObject('Sarcophagus_Item');
	auxSetToStartSarcophagusAnimation();
	auxPlaySarcophagusAnimation();
	gameState.sarcophagusOpened = true;
	gameState.lockedObjects['DoorRightKey'] = nil;
	PlaySound('L01S14');
	TimerDoString('PlaySound(\'L01S16\');', 5.0, playField:GetTimer());
	TimerDoString('auxHighlightKeyInSarcophagus();', 8.0, playField:GetTimer());
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxUnlockWellLocation(state)
	assert(type(state) == 'boolean');

	if (state == true) then
	    RootZoomZone.HideObject('actZoneGateLock');
	    RootZoomZone.UnhideObject('actZoneRoomWithWell');
	else
	    RootZoomZone.UnhideObject('actZoneGateLock');
	    RootZoomZone.HideObject('actZoneRoomWithWell');
	end
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxSetGateOpened(state)
	assert(type(state) == 'boolean');

	auxStopAnimation('gateOpeningAnimation', HGEANIM_FWD);
	local obj = playField:GetObject('gateOpeningAnimation');

	obj:GetAnimation():SetFrame(state == true and obj:GetAnimation():GetFrames() - 1 or 0);
	auxUnlockWellLocation(state);
	auxSetGateStatuesEyeGlowVisible(state);
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxOpenGate()
    if (playField) then
        local obj = playField:GetObject('gateOpeningAnimation');
        obj:GetAnimation():SetFrame(0);
       	obj:GetAnimation():Play();
    	auxUnlockWellLocation(true);
    	auxSetGateStatuesEyeGlowVisible(true);
    	gameState.gateOpened = true;
		PlaySound('L01S13');
    end    	
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDropDownBucket()
    playField:GetObject('wellAnimation'):GetAnimation():Play();
	playField:GetObject('BucketOnRope'):Move(0.0, 100.0, 10.0/12.0);
    gameState.customCursors['actZoneWellWheel'] = nil;
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDoDinosaurRun(dinoObject, dinoRunObject, dx, dy, duration)
	local x,y,z = dinoObject:GetScrX(), dinoObject:GetScrY(), dinoObject:GetScrZ();
	local xs,ys = dinoObject:GetScaleX(), dinoObject:GetScaleY();

	dinoObject:SetVisible(false);
	dinoRunObject:SetVisible(true);
	dinoRunObject:SetXY(x,y);
	dinoRunObject:SetZ(z);
	dinoRunObject:SetScaleX(math.abs(xs));
	dinoRunObject:SetScaleY(math.abs(ys));
	dinoRunObject:Move(dx, dy, duration);
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDinosaursRunAway()
	auxDoDinosaurRun(playField:GetObject('dino1'), playField:GetObject('dino1Run'), -340.0, -50.0, 0.9);
	auxDoDinosaurRun(playField:GetObject('dino2'), playField:GetObject('dino2Run'), -270.0, -60.0, 1.4);
	auxDoDinosaurRun(playField:GetObject('dino3'), playField:GetObject('dino3Run'), -270.0, -40.0, 1.3);
end


-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxAskAboutTutorial()
    if (playField ~= nil and gameState.tutorialStarted == false) then
        playField:GetLevelScreen():ShowYesNoDialog('DLG_START_TUTORIAL', GetTextString('TUTORIAL_TEXT0'), GetTextString('TUTORIAL_WINDOW_TITLE'));	
    end
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxShowNextTutorialDialog(delay)
	delay = (delay ~= nil and delay or gameState.tutorialNextWindowDelay);
	assert(delay ~= nil);
	TimerDoString('auxShowTutorial();', delay, playField:GetTimer());
end

function auxShowTutorial()
    if (playField ~= nil and gameState.tutorialStarted == true and playField:GetLevelScreen():IsHintsActive() == true) then

		if (tutorialStep == nil) then
			tutorialStep = 1;
		end

		if (tutorialStep == 1) then
			local object = playField:GetObject('cactus');
			assert(object ~= nil);
auxSetTutorialItemGlowActive('cactus', true);
		    playField:GetLevelScreen():ShowHintDialog(600,300, CPoints(100,50):AddPoint(object:GetScrX() + 50.0 ,object:GetScrY() - 30.0), 
													  GetTextString('TUTORIAL_TEXT1'), object, false);
			gameState.tutorialObjectInFocus = object:GetName();
			gameState.additionalDelayTime = 2.0;

		elseif (tutorialStep == 2) then
			local object = playField:GetObject('SarcophagusKey1');
			assert(object ~= nil);
auxSetTutorialItemGlowActive('SarcophagusKey1', true);
		    playField:GetLevelScreen():ShowHintDialog(370,355, CPoints(object:GetScrX() - 20.0 ,object:GetScrY()), 
													  GetTextString('TUTORIAL_TEXT2'), object, false);
			gameState.tutorialObjectInFocus = object:GetName();
			gameState.additionalDelayTime = 2.0;

		elseif (tutorialStep == 3) then
			local object = playField:GetObject('actZoneSarcophagus');
			assert(object ~= nil);
auxSetTutorialItemGlowActive('actZoneSarcophagus', true);
		    playField:GetLevelScreen():ShowHintDialog(260,205, CPoints(object:GetScrX(),object:GetScrY()), 
													  GetTextString('TUTORIAL_TEXT3'), object, true);
			gameState.tutorialObjectInFocus = object:GetName();

		elseif (tutorialStep == 4) then
			local object = playField:GetObject('actZoneInventoryButton');
			assert(object ~= nil);
		    playField:GetLevelScreen():ShowHintDialog(600,300, CPoints(125,605), 
													  GetTextString('TUTORIAL_TEXT4'), object, false);
			gameState.tutorialObjectInFocus = 'OpenToolPanel';
			gameState.additionalDelayTime = 0.0;
			playField:GetLevelScreen():GetGamePanel():LockToolBarButton(false);
		elseif (tutorialStep == 5) then
auxSetTutorialItemGlowActive('actZoneSarcophagusKey1', true);
			local object = playField:GetObject('actZoneFirstInventoryItem');
			assert(object ~= nil);
		    playField:GetLevelScreen():ShowHintDialog(780,205, CPoints(100,50):AddPoint(450,435), 
													  GetTextString('TUTORIAL_TEXT5'), object, true);
			gameState.tutorialObjectInFocus = 'ApplySarcophagusKey';
			gameState.tutorialNextWindowDelay = 2.0;

		elseif (tutorialStep == 6 or tutorialStep == 7) then
--			local button = SarcophagusZoomZone.close_button;
--			assert(button ~= nil);
--		    playField:GetLevelScreen():ShowHintDialog(360,305, button:GetScrX() - 20.0,button:GetScrY() + 10.0, GetTextString('TUTORIAL_TEXT6'), false);
			gameState.tutorialObjectInFocus = 'DoorRightKey';
			gameState.additionalDelayTime = 0.0;

		else
		    playField:GetLevelScreen():ShowHintDialog(600,300, 600,300, GetTextString('TUTORIAL_FINISH'), false);
			gameState.tutorialFinished = true;
			gameState.tutorialFinishTime = gameState.elapsedTime;
			playField:GetLevelScreen():GetGamePanel():LockToolBarButton(false);
		end
		tutorialStep = tutorialStep + 1;
	
		if (playField:GetLevelScreen():IsHintsActive() == true and 
			gameState.tutorialFinished == false and gameState.tutorialObjectInFocus == nil) then
			auxShowNextTutorialDialog(gameState.tutorialNextWindowDelay + gameState.additionalDelayTime);
			gameState.additionalDelayTime = 0.0;
		end
	end
end

function auxHidePlayfieldAndStartMinigame()
	playField:GetObject('dino1Run'):SetVisible(false);
	playField:GetObject('dino2Run'):SetVisible(false);
	playField:GetObject('dino3Run'):SetVisible(false);
	playField:GetObject('ZoomRoomWithWellBackground'):ChangeOpacity(1.0, 0.0, 0.05);
	playField:GetObject('RootBackground'):ChangeOpacity(1.0, 0.0, 0.05);
	playField:GetLevelScreen():RunMiniGame('data/Scripts/Minigames/DrumsGate.lua');
end

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

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

		local animName = animations[math.random(1, table.getn(animations))];
		if (animName ~= nil) then
			local composition = auxGetTempleNearTheSeaAnimation(animName);

            if (composition ~= nil and composition:IsPaused() == true) then
				auxPlayTempleNearTheSeaAnimation(animName);
			end
		end
		gameState.nextAnimationDelay = math.random(4, 11);
	else
		gameState.nextAnimationDelay = (gameState.nextAnimationDelay - dt >= 0.0 and gameState.nextAnimationDelay - dt or 0.0);
	end
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxTestLevelCompleteCondition()
	if (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)
	if (name == 'DLG_START_TUTORIAL') then
		gameState.tutorialStarted = true;
	    playField:GetLevelScreen():SetHintsActive(param == 'true' and true or false);
		if (param == 'true') then
		    assert(playField:GetLevelScreen():IsHintsActive() == true);
			playField:GetLevelScreen():GetGamePanel():LockToolBarButton(true);
			auxShowNextTutorialDialog();
        else
            gameState.tutorialObjectInFocus = nil;
			gameState.tutorialFinished = true;
			playField:GetLevelScreen():GetGamePanel():LockToolBarButton(false);
        end
	elseif (name == 'HintDialog') then
		assert(gameState.tutorialStarted == true);
		if (playField:GetLevelScreen():IsHintsActive() == false) then
		    gameState.tutorialObjectInFocus = nil;
			gameState.tutorialFinished = true;
			playField:GetLevelScreen():GetGamePanel():LockToolBarButton(false);
   			UnblockZone(SarcophagusZoomZone);
			auxSetTutorialItemGlowActive('cactus', false);
			auxSetTutorialItemGlowActive('SarcophagusKey1', false);
			auxSetTutorialItemGlowActive('actZoneSarcophagus', false);
			auxSetTutorialItemGlowActive('actZoneSarcophagusKey1', false);
		else
			if (gameState.tutorialFinished == false) then
				if (gameState.tutorialObjectInFocus == 'OpenToolPanel' and tutorialStep == 5) then
					playField:GetLevelScreen():GetGamePanel():OpenToolbar();
				end
				if (gameState.tutorialObjectInFocus == 'ApplySarcophagusKey' and tutorialStep == 6) then
					playField:SetToolByName('SarcophagusKey1');
				end
			end
		end
	elseif (name == 'GAME_PANEL' and param == 'MSG_OPEN_TOOLBAR' and gameState.tutorialFinished == false and tutorialStep == 5) then
		assert(gameState.tutorialObjectInFocus == 'OpenToolPanel');
		gameState.tutorialObjectInFocus = nil;
		auxShowNextTutorialDialog(0.5);
	elseif (name == 'ComicScreen' and param == 'COMIC_CLOSED' and gameState.tutorialFinished == false) then
        TimerDoString('auxAskAboutTutorial();', 0.75, playField:GetTimer());
	end
end

------------------------------------------------------------------------------
--
function OnUpdate(dt)
	if (gameState.tutorialFinished == true and 
		gameState.tutorialFinishTime ~= nil and 
		(gameState.elapsedTime - gameState.tutorialFinishTime > 10.0)) then

		gameState.tutorialFinishTime = nil;
	    playField:GetLevelScreen():ShowHintDialog(600,300, 155,670, GetTextString('TUTORIAL_HINT'), false);
	end

	auxUpdatePeriodicAnimations(dt);

    DefaultOnUpdate(dt);
end

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

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

	if (gameState.levelCompleted == false and
		gameState.wellBucketOnPlace == true and
		gameState.wellWheelOnPlace == true and
		gameState.bucketDroppedDown == true and
		objectName == 'actZoneWellBucket') then

		HighlightGameObject(playField:GetObject(objectName), playField:GetTimer(), 2.0);
	end

    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.tutorialStarted == true and 
	((gameState.tutorialFinished == true and gameState.tutorialObjectInFocus == nil) or 
	 (gameState.tutorialFinished == false and gameState.tutorialObjectInFocus == objectName)) ) then
	if (gameState.tutorialFinished == false) then
    	--// tutorial focused object has just been collected
		auxShowNextTutorialDialog(gameState.tutorialNextWindowDelay + gameState.additionalDelayTime);
    	gameState.tutorialObjectInFocus = nil;
    	gameState.additionalDelayTime = 0.0;
    end

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

if (gameState.tutorialFinished == false and tutorialStep == 4) then
	BlockZone(SarcophagusZoomZone);
	auxSetTutorialItemGlowActive('actZoneSarcophagus', false);
end
            isWrongClick = DefaultOnZoomZoneActiveObjectClick(objectName);

			if (gameState.wellBucketOnPlace == true and
				gameState.wellWheelOnPlace == true and
				gameState.levelCompleted == false) then

				if (gameState.bucketDroppedDown == false and objectName == 'actZoneWellWheel') then

					if (playField:GetLevelScreen():HasUncompletedTask() == false) then
						gameState.bucketDroppedDown = true;
						auxDropDownBucket();
						PlaySound('L01S11');
						HighlightGameObject(playField:GetObject('actZoneWellBucket'), playField:GetTimer(), 2.0);
	            		HighlightGameObject(playField:GetObject('actZoneWellBucket'), playField:GetTimer(), 2.0);

if (playField:GetLevelScreen():GetGamePanel():IsHidden() == false) then
	playField:GetLevelScreen():GetGamePanel():HidePanel();
end

	    				auxProcessToolObjectStateAnCursorType();
		                isWrongClick = false;
					else
					    --// show tip that player should find rest of items (in tip displaying section, several line below)
					end
				elseif (gameState.bucketDroppedDown == true and 
						objectName == 'actZoneWellBucket' and
						gameState.levelCompleted == false) then

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

						gameState.customCursors['actZoneWellBucket'] = nil;
						StopSound('L01S12');
						StopSound('L01S15');

						auxZoomPlayFieldIn(2.0, {playField:GetObject('actZoneWellBucket'):GetScrX(),
												 playField:GetObject('actZoneWellBucket'):GetScrY()});
						TimerDoString('auxHidePlayfieldAndStartMinigame();', 1.15, playField:GetTimer());
		                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[...

	if (objectName == 'dino1' or 
		objectName == 'dino2' or 
		objectName == 'dino3') then

		gameState.customCursors['dino1'] = nil;
		gameState.customCursors['dino2'] = nil;
		gameState.customCursors['dino3'] = nil;
		auxDinosaursRunAway();
		StopSound('L01S12');

	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL1_DINO_TEXT'));
	end

	--// Tips - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
	if (gameState.sarcophagusOpened == false and
		(objectName == 'ZoomSarcophagusBackground' or
		 objectName == 'DoorRightKey' or
		 objectName == 'actZoneSarcophagusKey1' or
		 objectName == 'actZoneSarcophagusKey2')) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL1_SARCOPHAGUS_TIP1'), 
														  GetTextString('LEVEL1_SARCOPHAGUS_TIP2'), 
														  GetTextString('LEVEL1_SARCOPHAGUS_TIP3'));
	elseif ( gameState.gateOpened == false and
			(objectName == 'ZoomGateLockBackground' or
			 objectName == 'actZoneDoorLeftKey' or
			 objectName == 'actZoneDoorRightKey')) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL1_GATE_TIP1'),
														  GetTextString('LEVEL1_GATE_TIP2'),
														  GetTextString('LEVEL1_GATE_TIP3'));
	elseif ((gameState.wellWheelOnPlace == false or gameState.wellBucketOnPlace == false) and 
			objectName == 'actZoneWellWheel') then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL1_WELLWHEEL_TIP1'),
														  GetTextString('LEVEL1_WELLWHEEL_TIP2'),
														  GetTextString('LEVEL1_WELLWHEEL_TIP3'));
	elseif ((gameState.wellWheelOnPlace == false or gameState.wellBucketOnPlace == false) and 
			objectName == 'actZoneWellBucket') then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL1_WELLBUCKET_TIP1'),
														  GetTextString('LEVEL1_WELLBUCKET_TIP2'),
														  GetTextString('LEVEL1_WELLBUCKET_TIP3'));
	elseif (gameState.bucketDroppedDown == false and 
			objectName == 'actZoneWellWheel' 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
	--//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
	
end --// if (gameState.tutorialStarted ...

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

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

------------------------------------------------------------------------------
--
function OnObjectFound(object)
    local objectName = object:GetName();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	gameState.tutorialFinishTime = nil;

	if (objectName == 'cactus' or objectName == 'SarcophagusKey1') then
		auxSetTutorialItemGlowActive(objectName, false);
	end

	if (objectName == 'DoorRightKey') then
		gameState.keyInSarcophagusCollected = true;
		auxProcessToolObjectStateAnCursorType();
	end
	if (gameState.tutorialFinished == false and objectName == 'DoorRightKey') then
		gameState.tutorialObjectInFocus = nil;
		UnblockZone(SarcophagusZoomZone);
	end


    --// automatic zoom-zone hiding and blocking when all item it has have been collected
    assert(gameState.activeZone ~= nil);

	local closeAndBlockActiveZone = false;
    if (gameState.activeZone == SarcophagusZoomZone and objectName == 'DoorRightKey') then
		closeAndBlockActiveZone = true;
    elseif (gameState.activeZone == ShelfZoomZone and objectName == 'DoorLeftKey') then
		closeAndBlockActiveZone = true;
    end
	if (closeAndBlockActiveZone == true) then
		CloseAndBlockActiveZone();
	end

	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	local objectMustBeHighlighted = DefaultOnObjectFound(object);
	return objectMustBeHighlighted;
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 == 'DoorRightKey' and objName == gameState.toolMap[toolName]) then
    	gameState.doorRightKeyOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'DoorLeftKey' and objName == gameState.toolMap[toolName]) then
    	gameState.doorLeftKeyOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'SarcophagusKey1' and objName == gameState.toolMap[toolName]) then
    	gameState.sarcophagusKey1OnPlace = true;
		toolApplied = true;
		auxSetTutorialItemGlowActive('actZoneSarcophagusKey1', false);
		gameState.tutorialObjectInFocus = nil;
		auxShowNextTutorialDialog();
	end
	if (toolName == 'SarcophagusKey2' and objName == gameState.toolMap[toolName]) then
    	gameState.sarcophagusKey2OnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Bucket' and objName == gameState.toolMap[toolName]) then
    	gameState.wellBucketOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'WellWheel' and objName == gameState.toolMap[toolName]) then
    	gameState.wellWheelOnPlace = true;
		toolApplied = true;
	end
	if (not toolApplied) then
	    playField:GetLevelScreen():ShowTip(GetTextString('WRONG_ITEM_APPLIED_TIP1'),
										   GetTextString('WRONG_ITEM_APPLIED_TIP2'));
	end

	if (gameState.wellBucketOnPlace == true and gameState.wellWheelOnPlace == true and
		(toolName == 'Bucket' or toolName == 'WellWheel')) then
		HighlightGameObject(playField:GetObject('actZoneWellWheel'), playField:GetTimer(), 2.0);
		HighlightGameObject(playField:GetObject('actZoneWellWheel'), playField:GetTimer(), 3.0);
	end


    --// automatic zoom-zone hiding and blocking when all item it has have been collected
    assert(gameState.activeZone ~= nil);

    if (gameState.activeZone == GateLockZoomZone and 
		(toolName == 'DoorRightKey' or toolName == 'DoorLeftKey') and
    	gameState.doorRightKeyOnPlace == true and
    	gameState.doorLeftKeyOnPlace == true) then

		CloseAndBlockActiveZone();
		auxOpenGate();
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL1_GATE_UNLOCKED'));
        HighlightGameObject(playField:GetObject('actZoneGateLock'), playField:GetTimer(), 3.0);
        HighlightGameObject(playField:GetObject('actZoneGateLock'), playField:GetTimer(), 3.0);
    end

	if (gameState.doorRightKeyOnPlace == true and
    	gameState.doorLeftKeyOnPlace == true and
    	gameState.sarcophagusKey1OnPlace == true and
    	gameState.sarcophagusKey2OnPlace == true and
    	gameState.wellBucketOnPlace == true and
    	gameState.wellWheelOnPlace == 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'));
		end
	end


	auxProcessToolObjectStateAnCursorType();

   	if (gameState.sarcophagusOpened == false and gameState.sarcophagusKey1OnPlace == true and gameState.sarcophagusKey2OnPlace == true) then
	    auxOpenSarcophagus();
    end
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DefaultOnObjectMouseEnter(object);
	if (toolApplied == true) then
	    DeactivateActiveZoneDeactivatedGlow(object:GetName());
	end
	return toolApplied;
end

------------------------------------------------------------------------------
--
function OnObjectReachPanel(object)
    local objectName = object:GetName();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	if (gameState.tutorialFinished == false and objectName == 'DoorRightKey') then
	    gameState.tutorialObjectInFocus = nil;
		auxShowNextTutorialDialog();
	end
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/01_TempleNearTheSea/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,383,99,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/columnLayer.png',0,0,495,192,1,0)
	anim:SetHotSpot(247,96)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('columnLayer',anim,244,672,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/gateOpeningAnimation.png',0,0,53,358,9,8)
	anim:SetHotSpot(26,179)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('gateOpeningAnimation',anim,270,384,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/sarcophagusOpenedBack.png',0,0,468,197,1,0)
	anim:SetHotSpot(234,98)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('sarcophagusOpenedBack',anim,701,467,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey1OnPlaceSmall.png',0,0,31,42,1,0)
	anim:SetHotSpot(15,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('SarcophagusKey1OnPlaceSmall',anim,541,481,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey2OnPlaceSmall.png',0,0,45,28,1,0)
	anim:SetHotSpot(22,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('SarcophagusKey2OnPlaceSmall',anim,619,485,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/Sarcophagus_Item.png',0,0,56,28,1,0)
	anim:SetHotSpot(28,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Sarcophagus_Item',anim,625,393,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/GateKeyLeftGeneralView.png',0,0,28,20,1,0)
	anim:SetHotSpot(14,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GateKeyLeftGeneralView',anim,246,267,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/GateKeyRightGeneralView.png',0,0,25,22,1,0)
	anim:SetHotSpot(12,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GateKeyRightGeneralView',anim,307,287,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radialGlow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xFF40FF20')
	play_field:CreateObject('leftStatueEyesGlow',anim,221,236,105,0,1,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radialGlow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xFF40FF20')
	play_field:CreateObject('rightStatueEyesGlow',anim,348,294,105,0,0.9,0.7)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoCyclicAnimationStand.png',0,0,186,140,100,15)
	anim:SetHotSpot(80,112)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dino1',anim,521,617,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoCyclicAnimationStand.png',0,0,186,140,100,17)
	anim:SetHotSpot(80,112)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dino2',anim,396,623,107,0,-0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoCyclicAnimationStand.png',0,0,186,140,100,12)
	anim:SetHotSpot(80,112)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dino3',anim,402,610,105,0,-0.7,0.7)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey1.png',0,0,48,71,1,0)
	anim:SetHotSpot(24,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('SarcophagusKey1',anim,858,203,102,0,0.6,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey2.png',0,0,77,45,1,0)
	anim:SetHotSpot(38,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('SarcophagusKey2',anim,282,728,111,-15,0.6,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/blackBall.png',0,0,42,49,1,0)
	anim:SetHotSpot(21,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('blackBall',anim,738,566,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/GlowCactusItem.png',0,0,150,150,1,0)
	anim:SetHotSpot(75,75)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GlowCactusItem',anim,160,518,109,0,0.75,0.75)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/GlowSarcophagusKey.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GlowSarcophagusKey',anim,858,204,101,0,0.5,0.5)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/GlowSarcophagusKey.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GlowSarcophagusKey1',anim,421,455,201,0,0.5,0.5)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/GlowSarcophagus.png',0,0,332,212,1,0)
	anim:SetHotSpot(166,106)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('GlowSarcophagus',anim,623,465,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/broom.png',0,0,92,138,1,0)
	anim:SetHotSpot(46,69)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('broom',anim,381,538,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/cactus.png',0,0,122,140,1,0)
	anim:SetHotSpot(61,70)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cactus',anim,150,514,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/catStatuette.png',0,0,80,154,1,0)
	anim:SetHotSpot(40,77)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('catStatuette',anim,983,466,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/diamond.png',0,0,57,67,1,0)
	anim:SetHotSpot(28,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('diamond',anim,819,597,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/feather.png',0,0,104,174,1,0)
	anim:SetHotSpot(52,87)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('feather',anim,760,225,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/garlic.png',0,0,80,182,1,0)
	anim:SetHotSpot(40,91)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('garlic',anim,984,163,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/onion.png',0,0,45,58,1,0)
	anim:SetHotSpot(22,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('onion',anim,853,496,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/padLock.png',0,0,96,112,1,0)
	anim:SetHotSpot(48,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('padLock',anim,438,196,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/tambourine.png',0,0,123,114,1,0)
	anim:SetHotSpot(61,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('tambourine',anim,551,335,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/teapot.png',0,0,182,110,1,0)
	anim:SetHotSpot(91,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('teapot',anim,644,711,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/Misc/wateringCan.png',0,0,153,143,1,0)
	anim:SetHotSpot(76,71)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('wateringCan',anim,255,675,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('actZoneSarcophagus',anim,622,441,103,0,2.4,1.4)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/Sarcophagus/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomSarcophagusBackground',anim,585,404,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/doorRightKey.png',0,0,154,70,1,0)
	anim:SetHotSpot(77,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('DoorRightKey',anim,583,406,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/KeyLayerOver.png',0,0,160,230,1,0)
	anim:SetHotSpot(80,115)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('KeyLayerOver',anim,575,484,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey1OnPlace.png',0,0,48,71,1,0)
	anim:SetHotSpot(24,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('SarcophagusKey1OnPlace',anim,423,453,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey2OnPlace.png',0,0,77,45,1,0)
	anim:SetHotSpot(38,22)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('SarcophagusKey2OnPlace',anim,585,455,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('actZoneSarcophagusKey1',anim,421,454,205,0,0.7,0.9)
	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('actZoneSarcophagusKey2',anim,586,456,205,0,0.9,0.7)
	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('actZoneShelf',anim,968,315,103,0,0.9,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/Shelf/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomShelfBackground',anim,644,305,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/DoorLeftKey.png',0,0,89,152,1,0)
	anim:SetHotSpot(45,76)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('DoorLeftKey',anim,492,468,204,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('actZoneGateLock',anim,275,368,103,0,0.7,3)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/GateLock/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomGateLockBackground',anim,537,342,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/doorLeftKeyOnPlace.png',0,0,178,146,1,0)
	anim:SetHotSpot(89,73)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('doorLeftKeyOnPlace',anim,315,378,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/doorRightKeyOnPlace.png',0,0,141,141,1,0)
	anim:SetHotSpot(70,70)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('doorRightKeyOnPlace',anim,676,358,204,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('actZoneDoorLeftKey',anim,313,371,205,0,1.6,0.7)
	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('actZoneDoorRightKey',anim,682,358,205,0,1.1,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radialGlow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xFF40FF20')
	play_field:CreateObject('statueEyesGlowZoomed',anim,801,386,210,-5,2,1.4)
	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('actZoneRoomWithWell',anim,274,369,102,0,0.7,3)
	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('navigationZoneRoomWithWell',anim,906,447,210,0,1.4,2.5)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Layers/background.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomRoomWithWellBackground',anim,512,384,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Layers/wellAnimation.png',0,0,480,174,10,12)
	anim:SetHotSpot(240,87)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('wellAnimation',anim,444,393,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Layers/BucketOnRopeLayer.png',0,0,162,453,1,0)
	anim:SetHotSpot(81,226)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('BucketOnRopeLayer',anim,471,428,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Layers/BucketOnRope.png',0,0,94,320,1,0)
	anim:SetHotSpot(47,160)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('BucketOnRope',anim,478,399,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Layers/rope.png',0,0,14,219,1,0)
	anim:SetHotSpot(7,109)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('rope',anim,471,348,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Layers/amuletLayer.png',0,0,29,47,1,0)
	anim:SetHotSpot(14,23)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('amuletLayer',anim,879,623,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radialGlow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xDF80FF05')
	play_field:CreateObject('wellRadialGlow',anim,460,455,204,0,4,2.6)
	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('actZoneWellBucket',anim,481,476,204,0,0.9,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('actZoneWellWheel',anim,628,389,204,0,0.8,1.3)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/amulet.png',0,0,113,70,1,0)
	anim:SetHotSpot(56,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('amulet',anim,716,717,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/barrel.png',0,0,116,166,1,0)
	anim:SetHotSpot(58,83)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('barrel',anim,202,617,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/basket.png',0,0,74,45,1,0)
	anim:SetHotSpot(37,22)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('basket',anim,378,610,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/blackBall1.png',0,0,78,52,1,0)
	anim:SetHotSpot(39,26)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('blackBall1',anim,487,688,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/blueBird.png',0,0,78,58,1,0)
	anim:SetHotSpot(39,29)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('blueBird',anim,789,181,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/catStatuette1.png',0,0,98,104,1,0)
	anim:SetHotSpot(49,52)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('catStatuette1',anim,717,606,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/diadem.png',0,0,67,67,1,0)
	anim:SetHotSpot(33,33)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('diadem',anim,518,84,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/flower.png',0,0,79,115,1,0)
	anim:SetHotSpot(39,57)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('flower',anim,926,264,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/greenMask.png',0,0,60,83,1,0)
	anim:SetHotSpot(30,41)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('greenMask',anim,777,290,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/indianWarBonnet.png',0,0,121,155,1,0)
	anim:SetHotSpot(60,77)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('indianWarBonnet',anim,159,264,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/oldCoin.png',0,0,73,78,1,0)
	anim:SetHotSpot(36,39)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('oldCoin',anim,504,582,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/owlAmulet.png',0,0,43,48,1,0)
	anim:SetHotSpot(21,24)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('owlAmulet',anim,1001,260,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/plate.png',0,0,74,63,1,0)
	anim:SetHotSpot(37,31)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('plate',anim,592,132,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/pyramid.png',0,0,67,65,1,0)
	anim:SetHotSpot(33,32)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('pyramid',anim,153,437,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/roundPendant.png',0,0,56,109,1,0)
	anim:SetHotSpot(28,54)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('roundPendant',anim,878,645,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/setOfFeathers.png',0,0,99,107,1,0)
	anim:SetHotSpot(49,53)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('setOfFeathers',anim,403,189,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/skull.png',0,0,93,83,1,0)
	anim:SetHotSpot(46,41)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('skull',anim,400,699,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/trinket.png',0,0,57,68,1,0)
	anim:SetHotSpot(28,34)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('trinket',anim,684,70,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/urn.png',0,0,75,67,1,0)
	anim:SetHotSpot(37,33)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('urn',anim,233,434,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/woodenBrooch.png',0,0,79,92,1,0)
	anim:SetHotSpot(39,46)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('woodenBrooch',anim,377,64,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Misc/woodenIdol.png',0,0,99,117,1,0)
	anim:SetHotSpot(49,58)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('woodenIdol',anim,755,586,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/Bucket.png',0,0,101,115,1,0)
	anim:SetHotSpot(50,57)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Bucket',anim,690,562,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Zones/RoomWithWell/Items/WellWheel.png',0,0,126,148,1,0)
	anim:SetHotSpot(63,74)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('WellWheel',anim,883,95,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/DoorLeftKeyGhost.png',0,0,178,146,1,0)
	anim:SetHotSpot(89,73)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DoorLeftKeyGhost',anim,316,378,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/DoorRightKeyGhost.png',0,0,141,141,1,0)
	anim:SetHotSpot(70,70)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DoorRightKeyGhost',anim,676,358,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey1Ghost.png',0,0,64,86,1,0)
	anim:SetHotSpot(32,43)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('SarcophagusKey1Ghost',anim,422,454,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/SarcophagusKey2Ghost.png',0,0,96,64,1,0)
	anim:SetHotSpot(48,32)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('SarcophagusKey2Ghost',anim,585,456,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/BucketGhost.png',0,0,110,128,1,0)
	anim:SetHotSpot(55,64)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('BucketGhost',anim,476,500,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Items/WellWheelGhost.png',0,0,128,180,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('WellWheelGhost',anim,633,368,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoCyclicAnimationRun.png',0,0,177,64,10,28)
	anim:SetHotSpot(80,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dino1Run',anim,512,681,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoCyclicAnimationRun.png',0,0,177,64,10,28)
	anim:SetHotSpot(80,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dino2Run',anim,512,681,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoCyclicAnimationRun.png',0,0,177,64,10,28)
	anim:SetHotSpot(80,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dino3Run',anim,512,681,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/01_TempleNearTheSea/Layers/dinoLayer.png',0,0,228,132,1,0)
	anim:SetHotSpot(114,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dinoLayer',anim,164,537,108,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('actZoneInventoryButton',anim,58,613,100,0,1,0.3)
	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('actZoneFirstInventoryItem',anim,62,59,100,0,0.65,0.65)
end

function FreeData()
end
-- CLEAR_ON_SAVE_END
