dofile('data/Scripts/Scenes/Common.lua');
dofile('data/Scripts/Scenes/Animations/25_NearTheCopter_Animations.lua');

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

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

    RootZoomZone = CreateZoomZone('RootZoomZone', nil, 
                                   nil, 0.0, 
                                   nil, 0.0,
							{'RootBackground',
							 'actZoneBoxes',
							 'actZoneHelicopterCabin',
							 'actZoneHelicopterEngine',

							 'apple',
							 'axe',
							 'bananas',
							 'bottle',
							 'bow',
							 'butterfly',
							 'cap',
							 'chest',
							 'cup',
							 'dagger',
							 'dinoSkeleton',
							 'drums',
							 'eagle',
							 'eggplant',
							 'flask',
							 'halberd',
							 'harp',
							 'hyena',
							 'ironClaw',
							 'jug',
							 'lizard',
							 'moccasins',
							 'necklace',
							 'orchid',
							 'owl',
							 'parrot',
							 'pear',
							 'pineapple',
							 'pumpkin1',
							 'pumpkin2',
							 'scorpion',
							 'seagull',
							 'spear',
							 'spearHead',
							 'stand',
							 'statuette',
							 'sunflower',
							 'sweetPepper',
							 'tortoise',
							 'vessel',

							 'LayerOverAxe',
							 'LayerOverBananas',
							 'LayerOverDinoSkeleton',
							 'LayerOverKnife',
							 'LayerOverOwl',
							 'LayerOverPineapple',
							 'LayerOverPot',
							 'LayerOverPumpkin1',
							 'LayerOverStatuette',
							 'LayerOverVessel',

							 'actZoneEmbers',
							 'actZoneRope',
							 
							 'EnginePart',
							 'Knife',
							 'Pot'},

							{});

    BoxesZoomZone = CreateZoomZone('BoxesZoomZone', RootZoomZone, 
                                   'actZoneBoxes', 0.0, 
                                   nil, 0.0,
							{'ZoomBoxesBackground',

							 'LayerOverFuelCan',
							 'LayerOverStarter',
							 'LayerOverWrench',

							 'FuelCan',
							 'Starter',
							 'Wrench'},

							{});

    HelicopterCabinZoomZone = CreateZoomZone('HelicopterCabinZoomZone', RootZoomZone, 
                                   'actZoneHelicopterCabin', 0.0, 
                                   nil, 0.0,
							{'ZoomHelicopterCabinBackground',

							 'Starter_onPlace',
							 'actZoneStarterPlace'},

							{});

    HelicopterEngineZoomZone = CreateZoomZone('HelicopterEngineZoomZone', RootZoomZone, 
                                   'actZoneHelicopterEngine', 0.0, 
                                   nil, 0.0,
							{'ZoomHelicopterEngineBackgound',

							 'LayerOverEnginePart',
							 'engineCap',
							 'EnginePart_onPlace',

							 'actZoneEnginePartPlace',
							 'actZoneFuelCan'},

							{});

if (restoringFromSave == false) then
    AddRandomTasks(true, MISC_TASK_COUNT_24,
		CreateTask('apple'),
		CreateTask('axe'),
		CreateTask('bananas'),
		CreateTask('bottle'),
		CreateTask('bow'),
		CreateTask('butterfly'),
		CreateTask('cap'),
		CreateTask('chest'),
		CreateTask('cup'),
		CreateTask('dagger'),
		CreateTask('dinoSkeleton'),
		CreateTask('drums'),
		CreateTask('eagle'),
		CreateTask('eggplant'),
		CreateTask('flask'),
		CreateTask('halberd'),
		CreateTask('harp'),
		CreateTask('hyena'),
		CreateTask('ironClaw'),
		CreateTask('jug'),
		CreateTask('lizard'),
		CreateTask('moccasins'),
		CreateTask('necklace'),
		CreateTask('orchid'),
		CreateTask('owl'),
		CreateTask('parrot'),
		CreateTask('pear'),
		CreateTask('pineapple'),
		CreateTask('pumpkin1'),
		CreateTask('pumpkin2'),
		CreateTask('scorpion'),
		CreateTask('seagull'),
		CreateTask('spear'),
		CreateTask('spearHead'),
		CreateTask('stand'),
		CreateTask('statuette'),
		CreateTask('sunflower'),
		CreateTask('sweetPepper'),
		CreateTask('tortoise'),
		CreateTask('vessel')
	);

    playField:GetLevelScreen():AddTaskSafe(CreateTask('EnginePart'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Knife'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Pot'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Starter'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Wrench'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('FuelCan'));
end

	CreateToolMap(	{'EnginePart',	'actZoneEnginePartPlace'},
					{'Knife',		'actZoneRope'},
					{'Pot',			'actZoneEmbers'},
					{'Starter',		'actZoneStarterPlace'},
					{'Wrench',		'engineCap'},
					{'FuelCan',		'actZoneFuelCan'});

	SetIconForGameObject(playField:GetObject('apple'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/apple_icon.png');
	SetIconForGameObject(playField:GetObject('axe'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/axe_icon.png');
	SetIconForGameObject(playField:GetObject('bananas'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/bananas_icon.png');
	SetIconForGameObject(playField:GetObject('bottle'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/bottle_icon.png');
	SetIconForGameObject(playField:GetObject('bow'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/bow_icon.png');
	SetIconForGameObject(playField:GetObject('butterfly'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/butterfly_icon.png');
	SetIconForGameObject(playField:GetObject('cap'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/cap_icon.png');
	SetIconForGameObject(playField:GetObject('chest'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/chest_icon.png');
	SetIconForGameObject(playField:GetObject('cup'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/cup_icon.png');
	SetIconForGameObject(playField:GetObject('dagger'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/dagger_icon.png');
	SetIconForGameObject(playField:GetObject('dinoSkeleton'),'data/Texture/Scenes/25_NearTheCopter/Items/Misc/dinoSkeleton_icon.png');
	SetIconForGameObject(playField:GetObject('drums'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/drums_icon.png');
	SetIconForGameObject(playField:GetObject('eagle'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/eagle_icon.png');
	SetIconForGameObject(playField:GetObject('eggplant'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/eggplant_icon.png');
	SetIconForGameObject(playField:GetObject('flask'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/flask_icon.png');
	SetIconForGameObject(playField:GetObject('halberd'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/halberd_icon.png');
	SetIconForGameObject(playField:GetObject('harp'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/harp_icon.png');
	SetIconForGameObject(playField:GetObject('hyena'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/hyena_icon.png');
	SetIconForGameObject(playField:GetObject('ironClaw'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/ironClaw_icon.png');
	SetIconForGameObject(playField:GetObject('jug'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/jug_icon.png');
	SetIconForGameObject(playField:GetObject('lizard'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/lizard_icon.png');
	SetIconForGameObject(playField:GetObject('moccasins'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/moccasins_icon.png');
	SetIconForGameObject(playField:GetObject('necklace'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/necklace_icon.png');
	SetIconForGameObject(playField:GetObject('orchid'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/orchid_icon.png');
	SetIconForGameObject(playField:GetObject('owl'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/owl_icon.png');
	SetIconForGameObject(playField:GetObject('parrot'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/parrot_icon.png');
	SetIconForGameObject(playField:GetObject('pear'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/pear_icon.png');
	SetIconForGameObject(playField:GetObject('pineapple'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/pineapple_icon.png');
	SetIconForGameObject(playField:GetObject('pumpkin1'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/pumpkin1_icon.png');
	SetIconForGameObject(playField:GetObject('pumpkin2'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/pumpkin2_icon.png');
	SetIconForGameObject(playField:GetObject('scorpion'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/scorpion_icon.png');
	SetIconForGameObject(playField:GetObject('seagull'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/seagull_icon.png');
	SetIconForGameObject(playField:GetObject('spear'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/spear_icon.png');
	SetIconForGameObject(playField:GetObject('spearHead'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/spearHead_icon.png');
	SetIconForGameObject(playField:GetObject('stand'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/stand_icon.png');
	SetIconForGameObject(playField:GetObject('statuette'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/statuette_icon.png');
	SetIconForGameObject(playField:GetObject('sunflower'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/sunflower_icon.png');
	SetIconForGameObject(playField:GetObject('sweetPepper'),'data/Texture/Scenes/25_NearTheCopter/Items/Misc/sweetPepper_icon.png');
	SetIconForGameObject(playField:GetObject('tortoise'),	'data/Texture/Scenes/25_NearTheCopter/Items/Misc/tortoise_icon.png');
	SetIconForGameObject(playField:GetObject('vessel'),		'data/Texture/Scenes/25_NearTheCopter/Items/Misc/vessel_icon.png');
	
	SetIconForGameObject(playField:GetObject('EnginePart'),	'data/Texture/Scenes/25_NearTheCopter/Items/EnginePart_icon.png');
	SetIconForGameObject(playField:GetObject('Knife'),		'data/Texture/Scenes/25_NearTheCopter/Items/Knife_icon.png');
	SetIconForGameObject(playField:GetObject('Pot'),		'data/Texture/Scenes/25_NearTheCopter/Items/Pot_icon.png');
	SetIconForGameObject(playField:GetObject('Starter'),	'data/Texture/Scenes/25_NearTheCopter/Items/Starter_icon.png');
	SetIconForGameObject(playField:GetObject('Wrench'),		'data/Texture/Scenes/25_NearTheCopter/Items/Wrench_icon.png');
	SetIconForGameObject(playField:GetObject('FuelCan'),	'data/Texture/Scenes/25_NearTheCopter/Items/FuelCan_icon.png');

if (restoringFromSave == false) then
	gameState.enginePartOnPlace = false;
	gameState.knifeUsed = false;
	gameState.potUsed = false;
	gameState.starterOnPlace = false;
	gameState.wrenchUsed = false;
	gameState.fuelCanUsed = false;

	gameState.fuelCanFound = false;
	gameState.starterFound = false;
	gameState.wrenchFound = false;
	gameState.triedToRunEngineDone = false;

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

	AssignActiveZonesGlow({function() return gameState.enginePartOnPlace; end,		'actZoneEnginePartPlace',	'EnginePart_ghost'},
						  {function() return gameState.knifeUsed or
											not gameState.potUsed; end,				'actZoneRope',				'Knife_ghost'},
					      {function() return gameState.potUsed; end,				'actZoneEmbers',			'Pot_ghost'},
						  {function() return gameState.starterOnPlace; end,			'actZoneStarterPlace',		'Starter_ghost'},
						  {function() return gameState.wrenchUsed; end,				'engineCap',				'Wrench_ghost'},
						  {function() return gameState.fuelCanUsed; end,			'actZoneFuelCan',			'FuelCan_ghost'});

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

	auxSceneInit(restoringFromSave);
	auxProcessToolObjectStateAnCursorType();
end

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

	StopSound('L25S10');
	StopSound('L25S11');
	StopSound('L25S12');
	StopSound('L25S13');
end

--// Local auxiliary functions - - - - - - - - - - - - - - - - - - - - - - - -
function auxSceneInit()
end
function auxSceneInit(restoringFromSave)
    local initialActions = function()
		ShowLevelIntro(25);
    end
	local regularActions = function()
		gameState.customCursors['actZoneBoxes'] = {'CursorZoom'};
		gameState.customCursors['actZoneHelicopterEngine'] = {'CursorZoom'};
		gameState.customCursors['actZoneHelicopterCabin'] = {'CursorZoom'};

		playField:IgnoreOnTestPoint('LayerOverAxe');
		playField:IgnoreOnTestPoint('LayerOverBananas');
		playField:IgnoreOnTestPoint('LayerOverDinoSkeleton');
		playField:IgnoreOnTestPoint('LayerOverKnife');
		playField:IgnoreOnTestPoint('LayerOverOwl');
		playField:IgnoreOnTestPoint('LayerOverPineapple');
		playField:IgnoreOnTestPoint('LayerOverPot');
		playField:IgnoreOnTestPoint('LayerOverPumpkin1');
		playField:IgnoreOnTestPoint('LayerOverStatuette');
		playField:IgnoreOnTestPoint('LayerOverVessel');
		playField:IgnoreOnTestPoint('LayerOverFuelCan');
		playField:IgnoreOnTestPoint('LayerOverStarter');
		playField:IgnoreOnTestPoint('LayerOverWrench');

		auxCreateNearTheCopterAnimations(playField:GetObject('RootBackground'));
		auxPlayNearTheCopterAnimation('EnvTop');
--		auxPlayNearTheCopterAnimation('Crab1');
--		auxPlayNearTheCopterAnimation('Crab2');
--		auxPlayNearTheCopterAnimation('Balloon');
--		auxPlayNearTheCopterAnimation('Seagull');
--		auxPlayNearTheCopterAnimation('BurningEmbers');
		auxPlayNearTheCopterAnimation('Wood');
--		auxPlayNearTheCopterAnimation('Pilot');

		gameState.nextAnimationDelay = 0.0;
	end

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

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


function auxProcessToolObjectStateAnCursorType()
    assert(	gameState.enginePartOnPlace ~= nil and
			gameState.knifeUsed ~= nil and
			gameState.potUsed ~= nil and
			gameState.starterOnPlace ~= nil and
			gameState.wrenchUsed ~= nil and
			gameState.fuelCanUsed ~= nil and

			gameState.triedToRunEngineDone ~= nil);

	if (gameState.enginePartOnPlace == true) then
		HelicopterEngineZoomZone.UnhideObject('EnginePart_onPlace');
		gameState.customCursors['actZoneEnginePartPlace'] = nil;
	else
		HelicopterEngineZoomZone.HideObject('EnginePart_onPlace');
		gameState.customCursors['actZoneEnginePartPlace'] = {'CursorArms'};
	end

	if (gameState.knifeUsed == true) then
		if (auxGetNearTheCopterAnimation('Pilot'):IsVisible() == true) then
			auxHideNearTheCopterAnimation('Pilot');
		end
		gameState.customCursors['actZoneRope'] = nil;
	else
		if (auxGetNearTheCopterAnimation('Pilot'):IsVisible() == false) then
			auxPlayNearTheCopterAnimation('Pilot');
		end
		if (gameState.potUsed == true) then
			gameState.customCursors['actZoneRope'] = {'CursorArms'};
		else
			gameState.customCursors['actZoneRope'] = nil;
		end
	end

	if (gameState.potUsed == true) then
		if (auxGetNearTheCopterAnimation('BurningEmbers'):IsVisible() == true) then
			auxHideNearTheCopterAnimation('BurningEmbers');
			StopSound('L25S13');
		end
		gameState.customCursors['actZoneEmbers'] = nil;
	else
		if (auxGetNearTheCopterAnimation('BurningEmbers'):IsVisible() == false) then
			auxPlayNearTheCopterAnimation('BurningEmbers');
			PlaySound('L25S13', true);
		end
		gameState.customCursors['actZoneEmbers'] = {'CursorArms'};
	end

	if (gameState.starterOnPlace == true) then
		HelicopterCabinZoomZone.UnhideObject('Starter_onPlace');
		if (gameState.triedToRunEngineDone == true) then
			gameState.customCursors['actZoneStarterPlace'] = nil;
		else
			gameState.customCursors['actZoneStarterPlace'] = {'CursorArms'};
		end
	else
		HelicopterCabinZoomZone.HideObject('Starter_onPlace');
		gameState.customCursors['actZoneStarterPlace'] = {'CursorArms'};
	end

	if (gameState.wrenchUsed == true) then
		HelicopterEngineZoomZone.HideObject('engineCap');
		gameState.customCursors['engineCap'] = nil;
	else
		HelicopterEngineZoomZone.UnhideObject('engineCap');
		gameState.customCursors['engineCap'] = {'CursorArms'};
	end

	if (gameState.fuelCanUsed == true) then
		gameState.customCursors['actZoneFuelCan'] = nil;
	else
		gameState.customCursors['actZoneFuelCan'] = {'CursorArms'};
	end

	--// zoom-zones blocking
	if (gameState.fuelCanFound == true and 
		gameState.wrenchFound == true and 
		gameState.starterFound == true) then

		gameState.customCursors['actZoneBoxes'] = nil;
		gameState.lockedObjects['actZoneBoxes'] = true;
	else
		gameState.customCursors['actZoneBoxes'] = {'CursorZoom'};
		gameState.lockedObjects['actZoneBoxes'] = nil;
	end

	if (gameState.fuelCanUsed == true  and 
		gameState.enginePartOnPlace == true) then

		gameState.customCursors['actZoneHelicopterEngine'] = nil;
		gameState.lockedObjects['actZoneHelicopterEngine'] = true;
	else
		gameState.customCursors['actZoneHelicopterEngine'] = {'CursorZoom'};
		gameState.lockedObjects['actZoneHelicopterEngine'] = nil;
	end

	if (gameState.triedToRunEngineDone) then
		gameState.customCursors['actZoneHelicopterCabin'] = nil;
		gameState.lockedObjects['actZoneHelicopterCabin'] = true;
	else
		gameState.customCursors['actZoneHelicopterCabin'] = {'CursorZoom'};
		gameState.lockedObjects['actZoneHelicopterCabin'] = nil;
	end
end

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

		for compositionName, composition in pairs(nearTheCopterCompositions) do
			if (composition:IsCyclic() == false and composition:GetName()~= 'Balloon') then
				table.insert(animations, composition:GetName());
			end
		end

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

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

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

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

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

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

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

	auxUpdatePeriodicAnimations(dt);
end

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

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

    DefaultOnObjectMouseEnter(object);
	ActivateActiveZoneGlow(objectName);
end

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

    DefaultOnObjectMouseLeave(object);
    DeactivateActiveZoneGlow(objectName);
end

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

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

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

			--// ...
			if (objectName == 'actZoneStarterPlace' and gameState.starterOnPlace == true and
				gameState.triedToRunEngineDone == false) then

				if (gameState.knifeUsed == true and gameState.potUsed == true and
					gameState.enginePartOnPlace == true and gameState.fuelCanUsed == true) then
					local delay = 0.5;

					gameState.triedToRunEngineDone = true;
					CloseAndBlockActiveZone();
					TimerDoString('playField:GetLevelScreen():ShowComicScreen(\'Level25Outro\');', delay, playField:GetTimer());
					auxTestLevelCompleteCondition();
				else
					if (gameState.knifeUsed == false or gameState.potUsed == false) then
					    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_MUST_SAVE_JOHN'));
					elseif (gameState.enginePartOnPlace == false or gameState.fuelCanUsed == false) then
					    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_HAVE_TO_FIX_TIP1'));
					end
				end
			end

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

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

	--// Tips - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
	if (objectName == 'actZoneEmbers' and gameState.potUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_POT_TIP1'));
	elseif (objectName == 'actZoneRope' and gameState.knifeUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_KNIFE_TIP1'));
	elseif (objectName == 'engineCap' and gameState.wrenchUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_WRENCH_TIP1'));
	elseif (objectName == 'actZoneEnginePartPlace' and gameState.enginePartOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_ENGINE_PART_TIP1'));
	elseif (objectName == 'actZoneFuelCan' and gameState.fuelCanUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_FUEL_CAN_TIP1'));
	elseif (objectName == 'actZoneStarterPlace' and gameState.starterOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL25_STARTER_TIP1'));
	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
	do
		if (objectName == 'FuelCan') then
			gameState.fuelCanFound = true;
		elseif (objectName == 'Wrench') then
			gameState.wrenchFound = true;
		elseif (objectName == 'Starter') then
			gameState.starterFound = true;
		end

	    assert(gameState.activeZone ~= nil);
	    if (gameState.activeZone == BoxesZoomZone and 
			(objectName == 'FuelCan' or objectName == 'Wrench' or objectName == 'Starter') and
			gameState.fuelCanFound == true and gameState.wrenchFound == true and gameState.starterFound == true) then

			CloseAndBlockActiveZone();
	    end
	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 == 'EnginePart' and objName == gameState.toolMap[toolName]) then
		gameState.enginePartOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Knife' and objName == gameState.toolMap[toolName]) then
		if (gameState.potUsed == true) then
			gameState.knifeUsed = true;
			toolApplied = true;

			local delay = 0.5;
			TimerDoString('playField:GetLevelScreen():ShowComicScreen(\'Level25JohnSaved\');', delay, playField:GetTimer());
		else
		    playField:GetLevelScreen():ShowTip(GetTextString('CANNT_USE_ITEM_YET_TIP1'),
											   GetTextString('CANNT_USE_ITEM_YET_TIP2'));
		end
	end
	if (toolName == 'Pot' and objName == gameState.toolMap[toolName]) then
		gameState.potUsed = true;
		toolApplied = true;
		PlaySound('L25S12');
	end
	if (toolName == 'Starter' and objName == gameState.toolMap[toolName]) then
		gameState.starterOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Wrench' and objName == gameState.toolMap[toolName]) then
		gameState.wrenchUsed = true;
		toolApplied = true;
		PlaySound('L25S11');
	end
	if (toolName == 'FuelCan' and objName == gameState.toolMap[toolName]) then
		gameState.fuelCanUsed = true;
		toolApplied = true;
		PlaySound('L25S10');
	end
	if (not toolApplied) then
	    playField:GetLevelScreen():ShowTip(GetTextString('WRONG_ITEM_APPLIED_TIP1'),
										   GetTextString('WRONG_ITEM_APPLIED_TIP2'));
	else
	    playField:GetLevelScreen():HideTip();
	end

    --// automatic zoom-zone hiding and blocking
	do
	    assert(gameState.activeZone ~= nil);
	    if (gameState.activeZone == HelicopterEngineZoomZone and 
			(toolName == 'FuelCan' or toolName == 'EnginePart') and toolApplied == true and
			gameState.fuelCanUsed == true  and gameState.enginePartOnPlace == true) then

			CloseAndBlockActiveZone();
	    end
	end


	if (gameState.enginePartOnPlace == true and
		gameState.knifeUsed == true and
		gameState.potUsed == true and
		gameState.starterOnPlace == true and
		gameState.wrenchUsed == true and
		gameState.fuelCanUsed == 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/25_NearTheCopter/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/25_NearTheCopter/Items/Misc/apple.png',0,0,51,43,1,0)
	anim:SetHotSpot(25,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('apple',anim,154,583,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/axe.png',0,0,141,119,1,0)
	anim:SetHotSpot(70,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('axe',anim,688,564,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/bananas.png',0,0,48,36,1,0)
	anim:SetHotSpot(24,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bananas',anim,926,155,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/bottle.png',0,0,43,95,1,0)
	anim:SetHotSpot(21,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bottle',anim,974,709,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/bow.png',0,0,139,136,1,0)
	anim:SetHotSpot(69,68)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bow',anim,246,651,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/butterfly.png',0,0,42,37,1,0)
	anim:SetHotSpot(21,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('butterfly',anim,279,191,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/cap.png',0,0,54,38,1,0)
	anim:SetHotSpot(27,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cap',anim,635,495,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/chest.png',0,0,59,46,1,0)
	anim:SetHotSpot(29,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('chest',anim,942,474,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/cup.png',0,0,55,53,1,0)
	anim:SetHotSpot(27,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cup',anim,778,487,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/dagger.png',0,0,68,40,1,0)
	anim:SetHotSpot(34,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dagger',anim,160,516,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/dinoSkeleton.png',0,0,86,118,1,0)
	anim:SetHotSpot(43,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dinoSkeleton',anim,177,278,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/drums.png',0,0,146,71,1,0)
	anim:SetHotSpot(73,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('drums',anim,382,698,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/eagle.png',0,0,61,42,1,0)
	anim:SetHotSpot(30,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('eagle',anim,391,202,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/eggplant.png',0,0,60,44,1,0)
	anim:SetHotSpot(30,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('eggplant',anim,312,738,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/flask.png',0,0,72,43,1,0)
	anim:SetHotSpot(36,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('flask',anim,456,738,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/halberd.png',0,0,121,155,1,0)
	anim:SetHotSpot(60,77)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('halberd',anim,505,585,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/harp.png',0,0,73,72,1,0)
	anim:SetHotSpot(36,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('harp',anim,542,474,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/hyena.png',0,0,78,106,1,0)
	anim:SetHotSpot(39,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('hyena',anim,153,413,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/ironClaw.png',0,0,77,60,1,0)
	anim:SetHotSpot(38,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('ironClaw',anim,259,713,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/jug.png',0,0,63,61,1,0)
	anim:SetHotSpot(31,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('jug',anim,194,561,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/lizard.png',0,0,47,41,1,0)
	anim:SetHotSpot(23,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('lizard',anim,496,455,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/moccasins.png',0,0,64,50,1,0)
	anim:SetHotSpot(32,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('moccasins',anim,433,611,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/necklace.png',0,0,58,90,1,0)
	anim:SetHotSpot(29,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('necklace',anim,822,589,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/orchid.png',0,0,61,69,1,0)
	anim:SetHotSpot(30,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('orchid',anim,984,474,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/owl.png',0,0,34,57,1,0)
	anim:SetHotSpot(17,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('owl',anim,171,168,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/parrot.png',0,0,28,54,1,0)
	anim:SetHotSpot(14,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('parrot',anim,978,117,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/pear.png',0,0,49,45,1,0)
	anim:SetHotSpot(24,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pear',anim,776,651,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/pineapple.png',0,0,76,94,1,0)
	anim:SetHotSpot(38,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pineapple',anim,989,634,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/pumpkin1.png',0,0,65,29,1,0)
	anim:SetHotSpot(32,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pumpkin1',anim,665,459,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/pumpkin2.png',0,0,62,50,1,0)
	anim:SetHotSpot(31,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pumpkin2',anim,177,460,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/scorpion.png',0,0,45,32,1,0)
	anim:SetHotSpot(22,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('scorpion',anim,560,395,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/seagull.png',0,0,48,20,1,0)
	anim:SetHotSpot(24,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('seagull',anim,602,223,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/spear.png',0,0,154,78,1,0)
	anim:SetHotSpot(77,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spear',anim,882,486,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/spearHead.png',0,0,99,32,1,0)
	anim:SetHotSpot(49,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spearHead',anim,516,714,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/stand.png',0,0,112,59,1,0)
	anim:SetHotSpot(56,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('stand',anim,763,704,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/statuette.png',0,0,65,160,1,0)
	anim:SetHotSpot(32,80)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('statuette',anim,648,685,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/sunflower.png',0,0,42,34,1,0)
	anim:SetHotSpot(21,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sunflower',anim,247,257,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/sweetPepper.png',0,0,39,39,1,0)
	anim:SetHotSpot(19,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('sweetPepper',anim,520,504,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/tortoise.png',0,0,72,49,1,0)
	anim:SetHotSpot(36,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('tortoise',anim,875,504,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Misc/vessel.png',0,0,92,40,1,0)
	anim:SetHotSpot(46,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('vessel',anim,228,440,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverAxe.png',0,0,32,39,1,0)
	anim:SetHotSpot(16,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverAxe',anim,747,545,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverBananas.png',0,0,36,42,1,0)
	anim:SetHotSpot(18,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverBananas',anim,914,160,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverDinoSkeleton.png',0,0,83,132,1,0)
	anim:SetHotSpot(41,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverDinoSkeleton',anim,180,278,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverKnife.png',0,0,26,17,1,0)
	anim:SetHotSpot(13,8)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverKnife',anim,894,749,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverOwl.png',0,0,33,60,1,0)
	anim:SetHotSpot(16,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverOwl',anim,184,162,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverPineapple.png',0,0,55,74,1,0)
	anim:SetHotSpot(27,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPineapple',anim,970,614,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverPot.png',0,0,103,84,1,0)
	anim:SetHotSpot(51,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPot',anim,676,547,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverPumpkin1.png',0,0,60,23,1,0)
	anim:SetHotSpot(30,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPumpkin1',anim,660,470,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverStatuette.png',0,0,55,50,1,0)
	anim:SetHotSpot(27,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverStatuette',anim,635,747,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Layers/LayerOverVessel.png',0,0,76,21,1,0)
	anim:SetHotSpot(38,10)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverVessel',anim,223,454,105,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('actZoneEmbers',anim,327,551,103,0,1.4,0.75)
	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('actZoneRope',anim,324,359,104,0,0.8,0.5)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/EnginePart.png',0,0,57,80,1,0)
	anim:SetHotSpot(28,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('EnginePart',anim,246,504,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Knife.png',0,0,69,98,1,0)
	anim:SetHotSpot(34,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Knife',anim,917,708,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Pot.png',0,0,77,71,1,0)
	anim:SetHotSpot(38,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pot',anim,675,537,101,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('actZoneBoxes',anim,495,359,100,0,1.2,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/Boxes/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomBoxesBackground',anim,547,311,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/Boxes/Layers/LayerOverFuelCan.png',0,0,80,77,1,0)
	anim:SetHotSpot(40,38)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerOverFuelCan',anim,612,160,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/Boxes/Layers/LayerOverStarter.png',0,0,29,36,1,0)
	anim:SetHotSpot(14,18)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerOverStarter',anim,696,299,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/Boxes/Layers/LayerOverWrench.png',0,0,85,60,1,0)
	anim:SetHotSpot(42,30)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerOverWrench',anim,422,259,205,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/FuelCan.png',0,0,92,99,1,0)
	anim:SetHotSpot(46,49)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('FuelCan',anim,639,143,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Starter.png',0,0,48,54,1,0)
	anim:SetHotSpot(24,27)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Starter',anim,687,313,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Wrench.png',0,0,86,60,1,0)
	anim:SetHotSpot(43,30)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Wrench',anim,419,249,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('actZoneHelicopterCabin',anim,804,374,104,0,1.2,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/HelicopterCabin/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomHelicopterCabinBackground',anim,648,360,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Starter_onPlace.png',0,0,75,82,1,0)
	anim:SetHotSpot(37,41)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Starter_onPlace',anim,527,409,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('actZoneStarterPlace',anim,518,396,204,-50,1.2,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('actZoneHelicopterEngine',anim,833,281,104,15,0.9,0.6)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/HelicopterEngine/Layers/backgound.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomHelicopterEngineBackgound',anim,640,316,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/HelicopterEngine/Layers/LayerOverEnginePart.png',0,0,117,93,1,0)
	anim:SetHotSpot(58,46)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('LayerOverEnginePart',anim,592,333,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Zones/HelicopterEngine/Layers/engineCap.png',0,0,318,204,1,0)
	anim:SetHotSpot(159,102)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('engineCap',anim,573,354,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/EnginePart_onPlace.png',0,0,114,76,1,0)
	anim:SetHotSpot(57,38)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('EnginePart_onPlace',anim,596,333,201,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('actZoneEnginePartPlace',anim,570,360,203,0,1.6,1.3)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(0)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneFuelCan',anim,789,347,204,0,0.9,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Starter_ghost.png',0,0,100,110,1,0)
	anim:SetHotSpot(50,55)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Starter_ghost',anim,529,410,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/EnginePart_ghost.png',0,0,140,100,1,0)
	anim:SetHotSpot(70,50)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('EnginePart_ghost',anim,597,333,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Wrench_ghost.png',0,0,100,100,1,0)
	anim:SetHotSpot(50,50)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Wrench_ghost',anim,486,298,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/FuelCan_ghost.png',0,0,100,100,1,0)
	anim:SetHotSpot(50,50)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('FuelCan_ghost',anim,807,339,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Knife_ghost.png',0,0,100,100,1,0)
	anim:SetHotSpot(50,50)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Knife_ghost',anim,334,365,110,90,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/25_NearTheCopter/Items/Pot_ghost.png',0,0,100,100,1,0)
	anim:SetHotSpot(50,50)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pot_ghost',anim,274,552,110,45,1,1)
end

function FreeData()
end
-- CLEAR_ON_SAVE_END
