dofile('data/Scripts/Scenes/Common.lua');
dofile('data/Scripts/Scenes/Animations/04_ElevatorInCave_Animations.lua');

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

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

	playField:GetObject('leftTorchHighlight'):SetZ(105.0);
	playField:GetObject('rightTorchHighlight'):SetZ(105.0);

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

							 'actZoneCaveWithSnake',
							 'actZoneLeftTorchFlame',
							 'actZoneRightTorchFlame',

							 'actZoneLever',
							 'actZoneMechanism',
							 'actZoneStatuette',
							 'actZoneTorch',

							 'Torch_onPlace',
							 'DinoStatuette_onPlace',
							 'Pinion_onPlace',
							 'Lever_onPlace',

							 'caveGrid',
							 'lift',
							 'liftThreshold',
							 'liftWires',
							 'LayerOver01',
							 'LayerOver02',
							 'LayerOver03',
							 'LayerOver04',
							 'LayerOver05',
							 'LayerOver06',
							 'LayerOver07',
							 'LayerOver08',
							 'LayerOverCaveGrid',
							 'LayerOverLift',
							 'LayerOverRightTorch',
							 'LayerOverPinion',
							 'LayerOverLever',
							 'LayerOverDinoStatuette',
							 'LayerOverTorch',

							 'DinoStatuette',
							 'Flute',
							 'Lever',
							 'Pinion',
							 'Torch',

							 'axe',
							 'barometer',
							 'bat',
							 'bird',
							 'bow',
							 'bucket',
							 'chisel',
							 'coyoteStatuette',
							 'crocodile',
							 'dagger',
							 'dinosaur',
							 'dinoSkull',
							 'eagle',
							 'handgun',
							 'hook',
							 'jug',
							 'mask',
							 'ornament',
							 'pick',
							 'pincers',
							 'plate',
							 'pterodactyl',
							 'scyther',
							 'sign',
							 'slidingCallipers',
							 'spearHead',
							 'stoneFace',
							 'stoneIdol',
							 'sword',
							 'vise',
							 'wheelBarrow',
							 'wineskin',
							 'womanStatuette',

							 'leftTorchFlame',
                             'rightTorchFlame'},

							{'Torch_onPlace',
							 'rightTorchFlame',
							 'DinoStatuette_onPlace',
							 'Pinion_onPlace',
							 'Lever_onPlace'},

							{'leftTorchGlow',
							 'leftTorchHighlight',
							 'rightTorchGlow',
							 'rightTorchHighlight'});

    CaveWithSnakeZoomZone = CreateZoomZone('CaveWithSnakeZoomZone', RootZoomZone, 
                                   'actZoneCaveWithSnake', 0.0, 
                                   nil, 0.0,
							{'ZoomCaveWithSnakeBackground',
							 'actZoneSnake',

							 'basketCap',
							 'flutePlayAnimation',
							 'snakeAppearAnimation',
							 'snakeCyclicAnimation',
							 'LayerOverScroll',
							 'Scroll'},

							{'flutePlayAnimation',
							 'snakeCyclicAnimation'});

if (restoringFromSave == false) then
    AddRandomTasks(true, MISC_TASK_COUNT_24,
		CreateTask('axe'),
		CreateTask('barometer'),
		CreateTask('bat'),
		CreateTask('bird'),
		CreateTask('bow'),
		CreateTask('bucket'),
		CreateTask('chisel'),
		CreateTask('coyoteStatuette'),
		CreateTask('crocodile'),
		CreateTask('dagger'),
		CreateTask('dinosaur'),
		CreateTask('dinoSkull'),
		CreateTask('eagle'),
		CreateTask('handgun'),
		CreateTask('hook'),
		CreateTask('jug'),
		CreateTask('mask'),
		CreateTask('ornament'),
		CreateTask('pick'),
		CreateTask('pincers'),
		CreateTask('plate'),
		CreateTask('pterodactyl'),
		CreateTask('scyther'),
		CreateTask('sign'),
		CreateTask('slidingCallipers'),
		CreateTask('spearHead'),
		CreateTask('stoneFace'),
		CreateTask('stoneIdol'),
		CreateTask('sword'),
		CreateTask('vise'),
		CreateTask('wheelBarrow'),
		CreateTask('wineskin'),
		CreateTask('womanStatuette')
	);

    playField:GetLevelScreen():AddTaskSafe(CreateTask('Torch'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Pinion'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Scroll'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Lever'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Flute'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('DinoStatuette'));
end

	CreateToolMap(	{'Torch', 		'actZoneTorch'},
					{'Pinion', 		'actZoneMechanism'},
					{'Scroll', 		'actZoneMechanism'},
					{'Lever',		'actZoneLever'},
					{'Flute',		'actZoneSnake'},
					{'DinoStatuette','actZoneStatuette'});

	SetIconForGameObject(playField:GetObject('axe'), 		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/axe_icon.png');
	SetIconForGameObject(playField:GetObject('barometer'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/barometer_icon.png');
	SetIconForGameObject(playField:GetObject('bat'), 		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bat_icon.png');
	SetIconForGameObject(playField:GetObject('bird'), 		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bird_icon.png');
	SetIconForGameObject(playField:GetObject('bow'), 		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bow_icon.png');
	SetIconForGameObject(playField:GetObject('bucket'), 	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bucket_icon.png');
	SetIconForGameObject(playField:GetObject('chisel'), 	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/chisel_icon.png');
	SetIconForGameObject(playField:GetObject('coyoteStatuette'),'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/coyoteStatuette_icon.png');
	SetIconForGameObject(playField:GetObject('crocodile'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/crocodile_icon.png');
	SetIconForGameObject(playField:GetObject('dagger'), 	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/dagger_icon.png');
	SetIconForGameObject(playField:GetObject('dinosaur'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/dinosaur_icon.png');
	SetIconForGameObject(playField:GetObject('dinoSkull'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/dinoSkull_icon.png');
	SetIconForGameObject(playField:GetObject('eagle'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/eagle_icon.png');
	SetIconForGameObject(playField:GetObject('handgun'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/handgun_icon.png');
	SetIconForGameObject(playField:GetObject('hook'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/hook_icon.png');
	SetIconForGameObject(playField:GetObject('jug'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/jug_icon.png');
	SetIconForGameObject(playField:GetObject('mask'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/mask_icon.png');
	SetIconForGameObject(playField:GetObject('ornament'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/ornament_icon.png');
	SetIconForGameObject(playField:GetObject('pick'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/pick_icon.png');
	SetIconForGameObject(playField:GetObject('pincers'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/pincers_icon.png');
	SetIconForGameObject(playField:GetObject('plate'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/plate_icon.png');
	SetIconForGameObject(playField:GetObject('pterodactyl'),'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/pterodactyl_icon.png');
	SetIconForGameObject(playField:GetObject('scyther'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/scyther_icon.png');
	SetIconForGameObject(playField:GetObject('sign'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/sign_icon.png');
	SetIconForGameObject(playField:GetObject('slidingCallipers'),'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/slidingCallipers_icon.png');
	SetIconForGameObject(playField:GetObject('spearHead'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/spearHead_icon.png');
	SetIconForGameObject(playField:GetObject('stoneFace'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/stoneFace_icon.png');
	SetIconForGameObject(playField:GetObject('stoneIdol'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/stoneIdol_icon.png');
	SetIconForGameObject(playField:GetObject('sword'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/sword_icon.png');
	SetIconForGameObject(playField:GetObject('vise'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/vise_icon.png');
	SetIconForGameObject(playField:GetObject('wheelBarrow'),'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/wheelBarrow_icon.png');
	SetIconForGameObject(playField:GetObject('wineskin'),	'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/wineskin_icon.png');
	SetIconForGameObject(playField:GetObject('womanStatuette'),'data/Texture/Scenes/04_ElevatorInCave/Items/Misc/womanStatuette_icon.png');

	SetIconForGameObject(playField:GetObject('Torch'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Torch_icon.png');
	SetIconForGameObject(playField:GetObject('Pinion'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Pinion_icon.png');
	SetIconForGameObject(playField:GetObject('Scroll'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Scroll_icon.png');
	SetIconForGameObject(playField:GetObject('Lever'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Lever_icon.png');
	SetIconForGameObject(playField:GetObject('Flute'),		'data/Texture/Scenes/04_ElevatorInCave/Items/Flute_icon.png');
	SetIconForGameObject(playField:GetObject('DinoStatuette'),'data/Texture/Scenes/04_ElevatorInCave/Items/DinoStatuette_icon.png');


if (restoringFromSave == false) then
	gameState.elevatorInitPosY = playField:GetObject('lift'):GetY();
	gameState.elevatorShift = 128.0;
	gameState.basketCapInitPosXY = {playField:GetObject('basketCap'):GetX(), playField:GetObject('basketCap'):GetY()};
	gameState.basketCapShiftXYA = {100.0, 35.0, 44.0};
	gameState.gridInitPosY = playField:GetObject('caveGrid'):GetY();
	gameState.gridShift = 60.0;
	gameState.leverRotationAngle = 45.0;
	gameState.dinoStatuetteInitY = playField:GetObject('DinoStatuette_onPlace'):GetY();
	gameState.dinoStatuetteShift = 5;
	gameState.pinionFinalY = playField:GetObject('Pinion'):GetY();
	gameState.pinionShift = -40.0;

	gameState.batAnimationDelay = 0.0;
	gameState.batIsActive = true;

	gameState.torchOnPlace = false;
	gameState.leverOnPlace = false;
	gameState.fluteApplied = false;
	gameState.pinionOnPlace = false;
	gameState.dinoStatuetteIsMoving = false;
	gameState.dinoStatuetteOnPlace = false;
	gameState.scrollUsed = false;

	gameState.gridAndLeverAreMoving = false;
	gameState.gridOpened = false;
    gameState.basketCapIsMoving = false;
    gameState.basketCapOnPlace = false;
	gameState.elevatorIsMoving = false;
	gameState.elevatorFixed = false;
	gameState.scrollPickedUp = false;
	gameState.fluteIsBeingPlayed = false;

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

	AssignActiveZonesGlow({function() return gameState.torchOnPlace; end,		'actZoneTorch',			'Torch_ghost'},
                          {function() return gameState.pinionOnPlace; end,		'actZoneMechanism',		'Pinion_ghost'},
					      {function() return gameState.scrollUsed; end,			'actZoneMechanism',		'Scroll_ghost'},
						  {function() return gameState.leverOnPlace; end,		'actZoneLever',			'Lever_ghost'},
						  {function() return gameState.fluteApplied; end,		'actZoneSnake',			'Flute_ghost'},
						  {function() return gameState.dinoStatuetteOnPlace; end,'actZoneStatuette',	'DinoStatuette_ghost'});

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

	auxSceneInit(restoringFromSave);
	auxProcessToolObjectStateAnCursorType();
end

------------------------------------------------------------------------------
--
function OnSceneFree()
    FreeData();
    StopSound('L04S10');
    StopSound('L04S11');
    StopSound('L04S12');
    StopSound('L04S13');
    StopSound('L04S14');
    StopSound('L04S15');
    StopSound('L04S16');
    StopSound('L04S17');
    StopSound('L04S18');
    StopSound('L04S19');
    StopSound('L04S20');
end

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

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

	    playField:IgnoreOnTestPoint('LayerOverTorch');
	    playField:IgnoreOnTestPoint('LayerOverDinoStatuette');

		auxStopAnimation('snakeAppearAnimation', HGEANIM_FWD + HGEANIM_NOLOOP);

		--//------------------------------------------------------------------
	    playField:IgnoreOnTestPoint('leftTorchGlow');
	    playField:IgnoreOnTestPoint('leftTorchHighlight');
	    playField:IgnoreOnTestPoint('rightTorchGlow');
	    playField:IgnoreOnTestPoint('rightTorchHighlight');

		gameState.leftTorchPSystem = auxCreateTorchPSystem(playField:GetObject('leftTorchGlow'));
		auxSetFibrillationEffector(playField:GetObject('leftTorchGlow'), 0.25, 0.28);

		gameState.rightTorchPSystem = auxCreateTorchPSystem(playField:GetObject('rightTorchGlow'));
		auxSetFibrillationEffector(playField:GetObject('rightTorchGlow'), 0.25, 0.28);

		auxSetFibrillationEffector(playField:GetObject('leftTorchHighlight'), 0.15, 0.28);
		auxSetFibrillationEffector(playField:GetObject('rightTorchHighlight'), 0.15, 0.28);

		auxCreateElevatorInCaveAnimations(playField:GetObject('RootBackground'));
		auxPlayElevatorInCaveAnimation('CyclicCompGroup');
--		auxPlayElevatorInCaveAnimation('Bat_FLY');
		auxStopElevatorInCaveAnimation('Bats1');
		auxStopElevatorInCaveAnimation('Bats2');
		auxStopElevatorInCaveAnimation('Bats3');

		gameState.batIsActive = true;
		gameState.dinoStatuetteIsMoving = false;
		gameState.gridAndLeverAreMoving = false;
	    gameState.basketCapIsMoving = false;
		gameState.elevatorIsMoving = false;
		gameState.fluteIsBeingPlayed = false;
	end

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

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

function auxProcessToolObjectStateAnCursorType()
    assert(gameState.torchOnPlace ~= nil and
		   gameState.leverOnPlace ~= nil and
		   gameState.fluteApplied ~= nil and
		   true);

	if (gameState.torchOnPlace == true) then
		RootZoomZone.UnhideObject('Torch_onPlace');
		RootZoomZone.UnhideObject('rightTorchFlame');
		playField:GetObject('rightTorchGlow'):SetVisible(true);
		playField:GetObject('rightTorchHighlight'):SetVisible(true);
        gameState.customCursors['actZoneTorch'] = nil;
		PlaySound('L04S11', true);
	else
		RootZoomZone.HideObject('Torch_onPlace');
		RootZoomZone.HideObject('rightTorchFlame');
		playField:GetObject('rightTorchGlow'):SetVisible(false);
		playField:GetObject('rightTorchHighlight'):SetVisible(false);
        gameState.customCursors['actZoneTorch'] = {'CursorArms'};
	end
	
	if (gameState.basketCapIsMoving == false) then
	    local objCap = playField:GetObject('basketCap');
	    if (gameState.basketCapOnPlace == true) then
	        objCap:SetXY(gameState.basketCapInitPosXY[1], gameState.basketCapInitPosXY[2]);
	        objCap:SetAngle(0.0);
	        gameState.customCursors['basketCap'] = nil;
	    else
	        objCap:SetXY(gameState.basketCapInitPosXY[1] + gameState.basketCapShiftXYA[1], gameState.basketCapInitPosXY[2] + gameState.basketCapShiftXYA[2]);
	        objCap:SetAngle(gameState.basketCapShiftXYA[3] /180.0 * M_PI);
	        gameState.customCursors['basketCap'] = {'CursorArms'};
	    end
	end

	if (gameState.gridAndLeverAreMoving == false) then
		if (gameState.leverOnPlace == true) then
			RootZoomZone.UnhideObject('Lever_onPlace');
		else
			RootZoomZone.HideObject('Lever_onPlace');
		end

		if (gameState.gridOpened == true) then
			playField:GetObject('caveGrid'):SetY(gameState.gridInitPosY + gameState.gridShift);
			playField:GetObject('Lever_onPlace'):SetAngle(gameState.leverRotationAngle /180.0 * M_PI);
			if (playField:HasObject('Scroll') == true) then
				-- block zoom-zone to prevent its closing while Sarah is playing a flute
				if (CaveWithSnakeZoomZone.invisibleObjects['flutePlayAnimation'] == true) then
					gameState.lockedObjects['actZoneCaveWithSnake'] = nil;
				end
				gameState.customCursors['actZoneCaveWithSnake'] = {'CursorZoom'};
			else
				gameState.lockedObjects['actZoneCaveWithSnake'] = true;
				gameState.customCursors['actZoneCaveWithSnake'] = nil;
			end
			gameState.customCursors['actZoneLever'] = nil;
		else
			playField:GetObject('caveGrid'):SetY(gameState.gridInitPosY);
			playField:GetObject('Lever_onPlace'):SetAngle(0.0);
			gameState.lockedObjects['actZoneCaveWithSnake'] = true;
			gameState.customCursors['actZoneCaveWithSnake'] = nil;
			gameState.customCursors['actZoneLever'] = {'CursorArms'};
		end
	end

	if (gameState.fluteIsBeingPlayed == false) then
		if (gameState.fluteApplied == true) then
			gameState.customCursors['actZoneSnake'] = nil;
			if (gameState.scrollPickedUp == false) then
				UnblockZone(CaveWithSnakeZoomZone);
			end
		else
			gameState.customCursors['actZoneSnake'] = {'CursorArms'};
		end
	end
	if (gameState.pinionOnPlace == true) then
		RootZoomZone.UnhideObject('Pinion_onPlace');
	else
		RootZoomZone.HideObject('Pinion_onPlace');
	end

	if (gameState.scrollUsed == true and gameState.pinionOnPlace == true) then
		assert(gameState.elevatorFixed == true);
		gameState.customCursors['actZoneMechanism'] = nil;
	else
		gameState.customCursors['actZoneMechanism'] = {'CursorArms'};
	end

	if (gameState.dinoStatuetteIsMoving == false) then
		if (gameState.dinoStatuetteOnPlace == true) then
			playField:GetObject('DinoStatuette_onPlace'):SetY(gameState.dinoStatuetteInitY + gameState.dinoStatuetteShift);
			RootZoomZone.UnhideObject('DinoStatuette_onPlace');
			gameState.customCursors['actZoneStatuette'] = nil;

			if (playField:HasObject('Pinion')) then
				playField:GetObject('Pinion'):SetY(gameState.pinionFinalY);
			end
		else
			playField:GetObject('DinoStatuette_onPlace'):SetY(gameState.dinoStatuetteInitY);
			RootZoomZone.HideObject('DinoStatuette_onPlace');
			gameState.customCursors['actZoneStatuette'] = {'CursorArms'};

			if (playField:HasObject('Pinion')) then
				playField:GetObject('Pinion'):SetY(gameState.pinionFinalY + gameState.pinionShift);
			end
		end
	end

	if (gameState.elevatorIsMoving == false) then
		if (gameState.elevatorFixed == false) then
			auxAssignElevatorTwitchingEffect();
		else
			auxAssignElevatorRisingEffect(0.1);
		end
	end
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDisableParticleGeneration(pSystem)
	pSystem:SetGeneration(false);
end

function auxCreateTorchPSystem(parent)
	local pSystem = CreateParticleSystemEntity('data/ParticleSystem/TorchSparks.psi', 'TorchSparksParticle');
	pSystem:AttachTo(parent);
	pSystem:SetZ(101.0);
--	gameState.leftTorchPSystem = pSystem;

	local eff = CreateAnimationEffector();
	local movementDuration = 0.3;
	eff:AttachTo(leftTorchSparks);
	eff:SetMode(HGEANIM_FWD	+ HGEANIM_PINGPONG);
	eff:SetKey(_TRACK_X, 0.0, 			   pSystem:GetX() - 15.0);
	eff:SetKey(_TRACK_X, movementDuration, pSystem:GetX() + 15.0);
	eff:Play();

	return pSystem;
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--function auxDisableElevatorMovingFlag()
--	gameState.elevatorIsMoving = false;
--end
function auxGetElevatorEffector()
	if (gameState.elevatorTwitchingEffector == nil) then
		gameState.elevatorTwitchingEffector = CreateAnimationEffector();
		gameState.elevatorTwitchingEffector:AttachTo(playField:GetObject('lift'));
	end
	return gameState.elevatorTwitchingEffector;
end
function auxAssignElevatorTwitchingEffect()
	local elevatorY = gameState.elevatorInitPosY;
	local duration = 1.0;

	gameState.elevatorIsMoving = true;

	local eff = auxGetElevatorEffector();
	eff:Stop();
	eff:EraseAllKeys();

	eff:SetMode(_ANIM_LOOP);
	eff:SetKey(_TRACK_Y, 0.0, 	 		  elevatorY);
	eff:SetKey(_TRACK_Y, duration *1.0/17.0, elevatorY - 1.0);
	eff:SetKey(_TRACK_Y, duration *2.0/17.0, elevatorY);
	eff:SetKey(_TRACK_Y, duration *3.0/17.0, elevatorY - 1.0);
	eff:SetKey(_TRACK_Y, duration *4.0/17.0, elevatorY);
	eff:SetKey(_TRACK_Y, duration *5.0/17.0, elevatorY - 2.0);
	eff:SetKey(_TRACK_Y, duration *6.0/17.0, elevatorY);
	eff:SetKey(_TRACK_Y, duration *7.0/17.0, elevatorY - 2.0);
	eff:SetKey(_TRACK_Y, duration *8.0/17.0, elevatorY);
	eff:SetKey(_TRACK_Y, duration *9.0/17.0, elevatorY - 2.0);
	eff:SetKey(_TRACK_Y, duration *10.0/17.0, elevatorY);
	eff:SetKey(_TRACK_Y, duration *11.0/17.0, elevatorY - 1.0);
	eff:SetKey(_TRACK_Y, duration *12.0/17.0, elevatorY);
	eff:SetKey(_TRACK_Y, duration *13.0/17.0, elevatorY - 2.0);
	eff:SetKey(_TRACK_Y, duration *14.0/17.0, elevatorY + 1.0);
	eff:SetKey(_TRACK_Y, duration *15.0/17.0, elevatorY - 10.0);
	eff:SetKey(_TRACK_Y, duration *16.0/17.0, elevatorY - 5.0);
	eff:SetKey(_TRACK_Y, duration *17.0/17.0, elevatorY - 8.0);
	eff:SetKey(_TRACK_Y, duration  + 1.0, elevatorY);	
	eff:SetKey(_TRACK_Y, duration  + 2.5, elevatorY - 5.0);	
	eff:SetKey(_TRACK_Y, duration  + 5.0, elevatorY);

	eff:Play();
end
function auxAssignElevatorRisingEffect(duration)
	duration = (duration ~= nil and duration or 1.4);

	local elevatorY = playField:GetObject('lift'):GetY();
	local risingDistance = gameState.elevatorShift;

	gameState.elevatorIsMoving = true;
--	TimerDoString('auxDisableElevatorMovingFlag();', duration, playField:GetTimer());

	local eff = auxGetElevatorEffector();

	eff:Stop();
	eff:EraseAllKeys();

	eff:SetMode(_ANIM_FWD + _ANIM_NOLOOP);
	eff:SetKey(_TRACK_Y, 0.0, 		elevatorY);
	eff:SetKey(_TRACK_Y, duration,	elevatorY - risingDistance);

	eff:Play();
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxUnhideCyclicAnimation()
	CaveWithSnakeZoomZone.UnhideObject('snakeCyclicAnimation', 0.01);
	CaveWithSnakeZoomZone.HideObject('snakeAppearAnimation', 0.1);
	playField:GetObject('snakeAppearAnimation'):GetAnimation():Play();
end
function auxPlaySnakeAppearing()
	CaveWithSnakeZoomZone.UnhideObject('snakeAppearAnimation');
	CaveWithSnakeZoomZone.HideObject('snakeCyclicAnimation', 0.01);
	local objAnim = playField:GetObject('snakeAppearAnimation'):GetAnimation();
	objAnim:Stop();
	objAnim:SetFrame(0);
	objAnim:SetMode(HGEANIM_FWD + HGEANIM_NOLOOP);
	objAnim:Play();
	TimerDoString('auxUnhideCyclicAnimation();', 17.0/13.0, playField:GetTimer());
	PlaySound('L04S18');
end
function auxHideSnake()
	CaveWithSnakeZoomZone.HideObject('snakeCyclicAnimation', 0.01);
	CaveWithSnakeZoomZone.UnhideObject('snakeAppearAnimation', 0.01);
	local objAnim = playField:GetObject('snakeAppearAnimation'):GetAnimation();
    objAnim:Stop();
	objAnim:SetMode(HGEANIM_REV + HGEANIM_NOLOOP);
	objAnim:SetFrame(objAnim:GetFrames() - 1);
	objAnim:Play();
end

function auxHidePlayFluteAnimation()
    CaveWithSnakeZoomZone.HideObject('flutePlayAnimation');
	UnblockZone(CaveWithSnakeZoomZone);
	gameState.fluteIsBeingPlayed = false;
end
function auxShowPlayFluteAnimation(duration)
    CaveWithSnakeZoomZone.UnhideObject('flutePlayAnimation');
	TimerDoString('auxHidePlayFluteAnimation();', duration, playField:GetTimer());
	gameState.fluteIsBeingPlayed = true;
	BlockZone(CaveWithSnakeZoomZone);
end

function auxDisableCapMovingFlag()
	gameState.basketCapIsMoving = false;
end
function auxPlayCapMovingAnimation()
    local objCap = playField:GetObject('basketCap');
    local duration = 0.75;

	gameState.basketCapIsMoving = true;
	TimerDoString('auxDisableCapMovingFlag();', duration, playField:GetTimer());

	objCap:SetXY(gameState.basketCapInitPosXY[1] + gameState.basketCapShiftXYA[1], gameState.basketCapInitPosXY[2] + gameState.basketCapShiftXYA[2]);
	objCap:SetAngle(gameState.basketCapShiftXYA[3] /180.0 * M_PI);
	
    objCap:Move(-gameState.basketCapShiftXYA[1], -gameState.basketCapShiftXYA[2], duration);
    objCap:Rotate(-gameState.basketCapShiftXYA[3] /180.0 * M_PI, duration);

    gameState.customCursors['basketCap'] = nil;
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDisableLeverMovingFlag()
	gameState.gridAndLeverAreMoving = false;	
end
function auxPlayGridOpeningAnimation()
	local duration = 1.0;

	gameState.gridAndLeverAreMoving = true;
	TimerDoString('auxDisableLeverMovingFlag();', duration, playField:GetTimer());
	
	RootZoomZone.UnhideObject('Lever_onPlace');

	local objGrid = playField:GetObject('caveGrid');
	local objLever = playField:GetObject('Lever_onPlace');
	objGrid:SetY(gameState.gridInitPosY);
	objGrid:Move(0.0, gameState.gridShift, duration);
	objLever:SetAngle(0.0);
	objLever:Rotate(gameState.leverRotationAngle /180.0 * M_PI, duration/3.0);

	gameState.lockedObjects['actZoneCaveWithSnake'] = nil;
	gameState.customCursors['actZoneCaveWithSnake'] = {'CursorZoom'};
	gameState.customCursors['actZoneLever'] = nil;
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDisableStatuetteMovingFlag()
	gameState.dinoStatuetteIsMoving = false;	
end
function auxPlayStatuePlacingAnimation()
	local duration = 0.5;

	gameState.dinoStatuetteIsMoving = true;
	TimerDoString('auxDisableStatuetteMovingFlag();', duration, playField:GetTimer());
	
	RootZoomZone.UnhideObject('DinoStatuette_onPlace');

	local objStatuette = playField:GetObject('DinoStatuette_onPlace');
	local objPinion = playField:GetObject('Pinion');

	objStatuette:SetY(gameState.dinoStatuetteInitY);
	objStatuette:Move(0.0, gameState.dinoStatuetteShift, duration);

	objPinion:SetY(gameState.pinionFinalY + gameState.pinionShift);
	objPinion:Move(0.0, -gameState.pinionShift, duration);

	gameState.customCursors['actZoneStatuette'] = nil;
	PlaySound('L04S20');
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxUpdateBatCompositions(dt)
	assert(auxGetElevatorInCaveAnimation('Bat_FLY') ~= nil);
	if (gameState.batIsActive == false or auxGetElevatorInCaveAnimation('Bat_FLY'):IsPaused() == false) then
		return;
	end

	if (gameState.batAnimationDelay == 0.0) then
		local animations = {};

		for compositionName, composition in pairs(elevatorInCaveCompositions) do
			if (composition:GetName() ~= 'Bat_FLY' and 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 = elevatorInCaveCompositions[animName];

            if (composition ~= nil and composition:IsPaused() == true) then
				composition:SetVisible(true);
			    composition:Play();
			end
		end
		gameState.batAnimationDelay = math.random(10, 20);
	else
		gameState.batAnimationDelay = (gameState.batAnimationDelay - dt >= 0.0 and gameState.batAnimationDelay - dt or 0.0);
	end
end

function auxPlayBatsPlayingAnimation()
	assert(auxGetElevatorInCaveAnimation('Bat_FLY') ~= nil);
	if (gameState.batIsActive == false or auxGetElevatorInCaveAnimation('Bat_FLY'):IsPaused() == false) then
		return;
	end
	gameState.batIsActive = false;
	auxPlayElevatorInCaveAnimation('Bat_FLY');
	auxHideElevatorInCaveAnimation('Bats1');
	auxHideElevatorInCaveAnimation('Bats2');
	auxHideElevatorInCaveAnimation('Bats3');
	PlaySound('L05S01');
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxTestLevelCompleteCondition()
	if (gameState.torchOnPlace == true and
		gameState.elevatorFixed == 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 (param == 'MSG_MINIGAME_SKIPPED' or param == 'MSG_MINIGAME_DONE') then
        SetSoundVolume('L04S15', 1.0);
        SetSoundVolume('L04S12', 1.0);
        SetSoundVolume('L04S11', 1.0);
        
        if (gameState.elevatorFixed == true) then
		    PlaySound('L04S10');
		end
    end
end

------------------------------------------------------------------------------
--
function OnUpdate(dt)
	auxUpdateBatCompositions(dt);
    DefaultOnUpdate(dt);
end

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

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

	if (objectName == 'actZoneLeftTorchFlame') then
		gameState.leftTorchPSystem:SetGeneration(true);
		TimerDoString('auxDisableParticleGeneration(gameState.leftTorchPSystem)', 0.35, playField:GetTimer());
	elseif (objectName == 'actZoneRightTorchFlame' and gameState.torchOnPlace == true) then
		gameState.rightTorchPSystem:SetGeneration(true);
		TimerDoString('auxDisableParticleGeneration(gameState.rightTorchPSystem)', 0.35, playField:GetTimer());
	end
	if (objectName == 'actZoneBats') then
--		playField:IgnoreOnTestPoint('actZoneBats');
		playField:GetObject('actZoneBats'):SetVisible(false);
		auxPlayBatsPlayingAnimation();
	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.lockedObjects[objectName] ~= true) then
        if (gameState.activeZone.HasObject(objectName)) then
            isWrongClick = DefaultOnZoomZoneActiveObjectClick(objectName);

			--// ...
			if (objectName == CaveWithSnakeZoomZone.activeObject and not gameState.fluteApplied) then
				auxPlaySnakeAppearing();
                isWrongClick = false;
			end
			if (objectName == 'actZoneLever' and gameState.gridOpened == false and gameState.leverOnPlace == true) then
				gameState.gridOpened = true;
				auxPlayGridOpeningAnimation();
				PlaySound('L04S16');
                isWrongClick = false;
			end
			if (objectName == 'basketCap' and gameState.fluteApplied == true and gameState.basketCapOnPlace == false and
				gameState.fluteIsBeingPlayed == false) then
--				CaveWithSnakeZoomZone.invisibleObjects['snakeCyclicAnimation'] == true) then

				gameState.basketCapOnPlace = true;
				auxPlayCapMovingAnimation();
				PlaySound('L04S14');
                isWrongClick = false;
			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 == 'actZoneCaveWithSnake' or objectName == 'actZoneLever') and gameState.gridOpened == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL4_GRID_LOCKED_TIP1'), GetTextString('LEVEL4_GRID_LOCKED_TIP2'));
	elseif (objectName == 'actZoneMechanism' and gameState.elevatorFixed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL4_MECH_BROKEN_TIP1'), GetTextString('LEVEL4_MECH_BROKEN_TIP2'));
	elseif (objectName == 'actZoneSnake' and gameState.fluteApplied == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL4_SNAKE_TIP1'), GetTextString('LEVEL4_SNAKE_TIP2'));
	elseif (objectName == 'actZoneStatuette' and gameState.dinoStatuetteOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL4_DINO_PLACE_TIP1'), GetTextString('LEVEL4_DINO_PLACE_TIP2'));
	elseif (objectName == 'actZoneTorch' and gameState.torchOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL4_TORCH_TIP1'), GetTextString('LEVEL4_TORCH_TIP2'));
	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();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    --// automatic zoom-zone hiding and blocking when all item it has have been collected
    assert(gameState.activeZone ~= nil);

    if (gameState.activeZone == CaveWithSnakeZoomZone and objectName == 'Scroll') then
		gameState.scrollPickedUp = true;
		CloseAndBlockActiveZone();
    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 == 'Torch' and objName == gameState.toolMap[toolName]) then
    	gameState.torchOnPlace = true;
		toolApplied = true;
		PlaySound('L04S11', true);
	end
	if (toolName == 'Lever' and objName == gameState.toolMap[toolName]) then
    	gameState.leverOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Flute' and objName == gameState.toolMap[toolName]) then
    	gameState.fluteApplied = true;
		toolApplied = true;
		local playDuration = 8.0;
		auxShowPlayFluteAnimation(playDuration);
		TimerDoString('auxHideSnake();', 0.95 * playDuration, playField:GetTimer());
		PlaySound('L04S13');
	end
	if (toolName == 'DinoStatuette' and objName == gameState.toolMap[toolName]) then
    	gameState.dinoStatuetteOnPlace = true;
		toolApplied = true;
		auxPlayStatuePlacingAnimation();
	end
	if (toolName == 'Pinion' and objName == gameState.toolMap[toolName]) then
    	gameState.pinionOnPlace = true;
		toolApplied = true;
		if (gameState.scrollUsed == false) then
		    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL4_PINIONONPLACE_TIP'));
		end
	end
	if (toolName == 'Scroll' and objName == gameState.toolMap[toolName]) then
    	gameState.scrollUsed = true;
		toolApplied = true;
	end
	if (not toolApplied) then
	    playField:GetLevelScreen():ShowTip(GetTextString('WRONG_ITEM_APPLIED_TIP1'),
										   GetTextString('WRONG_ITEM_APPLIED_TIP2'));
	end

	if (gameState.scrollUsed == true and
		gameState.pinionOnPlace == true and
		gameState.elevatorFixed == false) then

		gameState.elevatorFixed = true;

		SetSoundVolume('L04S15', 0.4);
        SetSoundVolume('L04S12', 0.4);
        SetSoundVolume('L04S11', 0.4);

		playField:GetLevelScreen():RunMiniGame('data/Scripts/Minigames/Pinions.lua');
		auxAssignElevatorRisingEffect();
	end

	if (gameState.torchOnPlace == true and
    	gameState.leverOnPlace == true and
    	gameState.fluteApplied == true and
    	gameState.dinoStatuetteOnPlace == true and
    	gameState.pinionOnPlace == true and
    	gameState.scrollUsed == 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
			auxTestLevelCompleteCondition();
		end
	end

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

------------------------------------------------------------------------------
--
function OnObjectReachPanel(object)
    local objectName = object:GetName();
	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	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/04_ElevatorInCave/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,99,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('actZoneBats',anim,591,71,100,0,2,1.2)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/caveGrid.png',0,0,91,87,1,0)
	anim:SetHotSpot(45,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('caveGrid',anim,257,554,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverCaveGrid.png',0,0,100,120,1,0)
	anim:SetHotSpot(50,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverCaveGrid',anim,253,637,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverLift.png',0,0,234,178,1,0)
	anim:SetHotSpot(117,89)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverLift',anim,710,681,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/lift.png',0,0,173,316,1,0)
	anim:SetHotSpot(86,158)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lift',anim,719,582,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/liftThreshold.png',0,0,193,76,1,0)
	anim:SetHotSpot(96,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('liftThreshold',anim,712,589,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/liftWires.png',0,0,72,446,1,0)
	anim:SetHotSpot(36,223)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('liftWires',anim,743,395,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Torch_onPlace.png',0,0,61,124,1,0)
	anim:SetHotSpot(30,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Torch_onPlace',anim,906,403,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver01.png',0,0,35,39,1,0)
	anim:SetHotSpot(17,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver01',anim,937,554,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver02.png',0,0,104,67,1,0)
	anim:SetHotSpot(52,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver02',anim,618,706,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver03.png',0,0,62,65,1,0)
	anim:SetHotSpot(31,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver03',anim,477,152,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver04.png',0,0,51,49,1,0)
	anim:SetHotSpot(25,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver04',anim,193,623,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver05.png',0,0,67,46,1,0)
	anim:SetHotSpot(33,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver05',anim,678,745,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver06.png',0,0,23,59,1,0)
	anim:SetHotSpot(11,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver06',anim,602,263,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver07.png',0,0,45,55,1,0)
	anim:SetHotSpot(22,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver07',anim,239,683,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOver08.png',0,0,86,189,1,0)
	anim:SetHotSpot(43,94)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOver08',anim,198,439,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverRightTorch.png',0,0,30,30,1,0)
	anim:SetHotSpot(15,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverRightTorch',anim,903,409,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverPinion.png',0,0,76,104,1,0)
	anim:SetHotSpot(38,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPinion',anim,843,543,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverLever.png',0,0,36,46,1,0)
	anim:SetHotSpot(18,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverLever',anim,309,539,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverDinoStatuette.png',0,0,86,120,1,0)
	anim:SetHotSpot(43,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverDinoStatuette',anim,968,677,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/LayerOverTorch.png',0,0,32,94,1,0)
	anim:SetHotSpot(16,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverTorch',anim,613,397,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('actZoneLever',anim,325,524,104,15,0.5,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('actZoneMechanism',anim,586,524,104,4,0.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('actZoneStatuette',anim,850,459,104,0,0.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('actZoneTorch',anim,902,404,104,-5,0.5,0.7)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/DinoStatuette_onPlace.png',0,0,80,80,1,0)
	anim:SetHotSpot(40,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DinoStatuette_onPlace',anim,844,461,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Pinion_onPlace.png',0,0,24,25,1,0)
	anim:SetHotSpot(12,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pinion_onPlace',anim,593,548,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Lever_onPlace.png',0,0,36,53,1,0)
	anim:SetHotSpot(2,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Lever_onPlace',anim,314,537,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/DinoStatuette.png',0,0,80,80,1,0)
	anim:SetHotSpot(40,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DinoStatuette',anim,988,684,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Flute.png',0,0,139,50,1,0)
	anim:SetHotSpot(69,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Flute',anim,483,748,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Lever.png',0,0,52,28,1,0)
	anim:SetHotSpot(26,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Lever',anim,248,689,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Pinion.png',0,0,40,53,1,0)
	anim:SetHotSpot(20,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pinion',anim,844,548,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Torch.png',0,0,37,117,1,0)
	anim:SetHotSpot(18,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Torch',anim,592,396,100,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/axe.png',0,0,155,57,1,0)
	anim:SetHotSpot(77,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('axe',anim,289,620,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/barometer.png',0,0,61,69,1,0)
	anim:SetHotSpot(30,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('barometer',anim,535,580,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bat.png',0,0,73,118,1,0)
	anim:SetHotSpot(36,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bat',anim,148,122,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bird.png',0,0,102,73,1,0)
	anim:SetHotSpot(51,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bird',anim,318,194,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bow.png',0,0,37,99,1,0)
	anim:SetHotSpot(18,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bow',anim,938,239,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/bucket.png',0,0,118,110,1,0)
	anim:SetHotSpot(59,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bucket',anim,627,677,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/chisel.png',0,0,78,113,1,0)
	anim:SetHotSpot(39,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('chisel',anim,980,554,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/coyoteStatuette.png',0,0,67,110,1,0)
	anim:SetHotSpot(33,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('coyoteStatuette',anim,505,443,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/crocodile.png',0,0,104,45,1,0)
	anim:SetHotSpot(52,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('crocodile',anim,368,68,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/dagger.png',0,0,41,100,1,0)
	anim:SetHotSpot(20,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dagger',anim,587,287,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/dinosaur.png',0,0,76,94,1,0)
	anim:SetHotSpot(38,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dinosaur',anim,746,75,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/dinoSkull.png',0,0,106,92,1,0)
	anim:SetHotSpot(53,46)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dinoSkull',anim,791,662,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/eagle.png',0,0,72,76,1,0)
	anim:SetHotSpot(36,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('eagle',anim,650,150,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/handgun.png',0,0,123,40,1,0)
	anim:SetHotSpot(61,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('handgun',anim,674,268,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/hook.png',0,0,40,105,1,0)
	anim:SetHotSpot(20,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('hook',anim,496,187,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/jug.png',0,0,106,106,1,0)
	anim:SetHotSpot(53,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('jug',anim,333,716,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/mask.png',0,0,55,63,1,0)
	anim:SetHotSpot(27,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('mask',anim,400,336,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/ornament.png',0,0,29,100,1,0)
	anim:SetHotSpot(14,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('ornament',anim,124,452,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/pick.png',0,0,189,113,1,0)
	anim:SetHotSpot(94,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pick',anim,825,702,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/pincers.png',0,0,95,84,1,0)
	anim:SetHotSpot(47,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pincers',anim,424,716,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/plate.png',0,0,68,67,1,0)
	anim:SetHotSpot(34,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('plate',anim,386,592,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/pterodactyl.png',0,0,104,77,1,0)
	anim:SetHotSpot(52,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pterodactyl',anim,274,466,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/scyther.png',0,0,48,201,1,0)
	anim:SetHotSpot(24,100)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('scyther',anim,412,497,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/sign.png',0,0,66,71,1,0)
	anim:SetHotSpot(33,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sign',anim,226,40,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/slidingCallipers.png',0,0,41,140,1,0)
	anim:SetHotSpot(20,70)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('slidingCallipers',anim,817,324,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/spearHead.png',0,0,103,52,1,0)
	anim:SetHotSpot(51,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spearHead',anim,656,748,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/stoneFace.png',0,0,94,120,1,0)
	anim:SetHotSpot(47,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('stoneFace',anim,973,76,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/stoneIdol.png',0,0,74,149,1,0)
	anim:SetHotSpot(37,74)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('stoneIdol',anim,182,431,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/sword.png',0,0,154,39,1,0)
	anim:SetHotSpot(77,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sword',anim,471,658,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/vise.png',0,0,80,94,1,0)
	anim:SetHotSpot(40,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('vise',anim,870,647,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/wheelBarrow.png',0,0,175,99,1,0)
	anim:SetHotSpot(87,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('wheelBarrow',anim,144,583,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/wineskin.png',0,0,89,107,1,0)
	anim:SetHotSpot(44,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('wineskin',anim,207,641,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Misc/womanStatuette.png',0,0,70,106,1,0)
	anim:SetHotSpot(35,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('womanStatuette',anim,437,555,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('actZoneLeftTorchFlame',anim,281,339,104,0,0.4,0.5)
	local anim = CreateAnimation('data/Texture/Scenes/Common/fire3.png',0,0,64,128,31,12)
	anim:SetHotSpot(32,32)
	anim:SetBlendMode(0)
	anim:SetColor('0xF0FFFFFF')
	play_field:CreateObject('leftTorchFlame',anim,285,273,103,0,0.8,0.9)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radialGlow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xA0E0B000')
	play_field:CreateObject('leftTorchGlow',anim,282,333,103,0,2.2,2.2)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/leftTorchHighlight.jpg',0,0,256,192,1,0)
	anim:SetHotSpot(128,96)
	anim:SetBlendMode(0)
	anim:SetColor('0x60FFFFFF')
	play_field:CreateObject('leftTorchHighlight',anim,512,384,98,0,4,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('actZoneRightTorchFlame',anim,896,353,104,0,0.4,0.55)
	local anim = CreateAnimation('data/Texture/Scenes/Common/fire3.png',0,0,64,128,31,12)
	anim:SetHotSpot(32,32)
	anim:SetBlendMode(0)
	anim:SetColor('0xF0FFFFFF')
	play_field:CreateObject('rightTorchFlame',anim,895,280,103,0,0.8,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('0xA0E0B000')
	play_field:CreateObject('rightTorchGlow',anim,892,348,103,0,2.4,2.4)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Layers/rightTorchHighlight.jpg',0,0,256,192,1,0)
	anim:SetHotSpot(128,96)
	anim:SetBlendMode(0)
	anim:SetColor('0x60FFFFFF')
	play_field:CreateObject('rightTorchHighlight',anim,512,385,98,0,4,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('actZoneCaveWithSnake',anim,259,560,102,0,0.7,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Zones/CaveWithSnake/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomCaveWithSnakeBackground',anim,532,375,200,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('actZoneSnake',anim,486,338,204,0,1.2,1.85)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Zones/CaveWithSnake/Layers/basketCap.png',0,0,140,87,1,0)
	anim:SetHotSpot(70,43)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('basketCap',anim,502,375,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Zones/CaveWithSnake/Layers/flutePlayAnimation.png',0,0,245,225,6,12)
	anim:SetHotSpot(120,120)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('flutePlayAnimation',anim,332,510,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Zones/CaveWithSnake/Layers/snakeAppearAnimation.png',0,0,96,152,17,13)
	anim:SetHotSpot(76,76)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('snakeAppearAnimation',anim,533,329,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Zones/CaveWithSnake/Layers/snakeCyclicAnimation.png',0,0,71,153,9,12)
	anim:SetHotSpot(76,76)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('snakeCyclicAnimation',anim,534,328,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Zones/CaveWithSnake/Layers/LayerOverScroll.png',0,0,64,128,1,0)
	anim:SetHotSpot(32,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerOverScroll',anim,546,404,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Scroll.png',0,0,137,76,1,0)
	anim:SetHotSpot(68,38)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Scroll',anim,592,416,201,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/DinoStatuette_ghost.png',0,0,96,96,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('DinoStatuette_ghost',anim,844,459,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Lever_ghost.png',0,0,64,72,1,0)
	anim:SetHotSpot(32,36)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Lever_ghost',anim,330,520,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Pinion_ghost.png',0,0,45,45,1,0)
	anim:SetHotSpot(22,22)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pinion_ghost',anim,593,550,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Scroll_ghost.png',0,0,80,80,1,0)
	anim:SetHotSpot(40,40)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Scroll_ghost',anim,581,493,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Torch_ghost.png',0,0,64,140,1,0)
	anim:SetHotSpot(32,70)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Torch_ghost',anim,897,405,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/04_ElevatorInCave/Items/Flute_ghost.png',0,0,96,96,1,0)
	anim:SetHotSpot(48,48)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Flute_ghost',anim,455,263,210,0,1,1)
end

function FreeData()
end
-- CLEAR_ON_SAVE_END
