dofile('data/Scripts/Scenes/Common.lua');
dofile('data/Scripts/Scenes/Animations/11_AboriginalCamp_Animations.lua');

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

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

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

							 'alarmClock',
							 'arrow',
							 'banana',
							 'barrow',
							 'bat',
							 'bird',
							 'brick',
							 'bundleOfKeys',
							 'butterfly',
							 'cactus',
							 'crab',
							 'crossbow',
							 'cushio',
							 'demijohn',
							 'dragon',
							 'feather',
							 'gloves',
							 'grapes',
							 'gromophone',
							 'hammer',
							 'handSaw',
							 'hat',
							 'helmet',
							 'kite',
							 'magnifyingGlass',
							 'mask',
							 'nest',
							 'onion',
							 'pineapple',
							 'playingCards',
							 'rose',
							 'scroll',
							 'seashell',
							 'seaStar',
							 'skin',
							 'statuette',
							 'streetLamp',
							 'tomato',
							 'tree',
							 'turtle',
							 'watch',
							 'watermelon',

							 'boxLayer',
							 'boxLock',
							 'brushwood',
							 'bush',
							 'LayerOverPot',
							 'palmLeaf1',
							 'palmLeaf2',
							 'palmTrunk',
							 'plateLayer',
							 'LayerBoxes',
							 'rope',
							 'spear1',
							 'spear2',
							 'spear3',
							 'stone',
							 'tambourine',
							 'embersAnim',
							 'parrotAnim',

							 'actZoneBoxLock',

							 'Knife',
							 'Pot',
							 'Statuette',
							 'TeethNecklace'},

							{});

    BoxZoomZone = CreateZoomZone('BoxZoomZone', RootZoomZone, 
                                   'actZoneBox', 0.0, 
                                   nil, 0.0,
							{'ZoomBoxBackground',
							 'chestOpened',
							 'chestClosed',
							 'Spear',
							 'Statuette_onPlace'},

							{'chestOpened',
							 'Spear',
							 'Statuette_onPlace'});

    WigwamZoomZone = CreateZoomZone('WigwamZoomZone', RootZoomZone, 
                                   'actZoneWigwam', 0.0, 
                                   nil, 0.0,
							{'ZoomWigwamBackground',
							 'beamAnim',

							 'Hammer',
							 'Spear_onPlace',
							 'TeethNecklace_onPlace',
							 'actZoneSpear',
							 'actZoneTeethNecklace',},

							{'Spear_onPlace',
							 'TeethNecklace_onPlace'});

if (restoringFromSave == false) then
    AddRandomTasks(true, MISC_TASK_COUNT_24,
		CreateTask('alarmClock'),
		CreateTask('arrow'),
		CreateTask('banana'),
		CreateTask('barrow'),
		CreateTask('bat'),
		CreateTask('bird'),
		CreateTask('brick'),
		CreateTask('bundleOfKeys'),
		CreateTask('butterfly'),
		CreateTask('cactus'),
		CreateTask('crab'),
		CreateTask('crossbow'),
		CreateTask('cushio'),
		CreateTask('demijohn'),
		CreateTask('dragon'),
		CreateTask('feather'),
		CreateTask('gloves'),
		CreateTask('grapes'),
		CreateTask('gromophone'),
		CreateTask('hammer'),
		CreateTask('handSaw'),
		CreateTask('hat'),
		CreateTask('helmet'),
		CreateTask('kite'),
		CreateTask('magnifyingGlass'),
		CreateTask('mask'),
		CreateTask('nest'),
		CreateTask('onion'),
		CreateTask('pineapple'),
		CreateTask('playingCards'),
		CreateTask('rose'),
		CreateTask('scroll'),
		CreateTask('seashell'),
		CreateTask('seaStar'),
		CreateTask('skin'),
		CreateTask('statuette'),
		CreateTask('streetLamp'),
		CreateTask('tomato'),
		CreateTask('tree'),
		CreateTask('turtle'),
		CreateTask('watch'),
		CreateTask('watermelon')
	);

    playField:GetLevelScreen():AddTaskSafe(CreateTask('Knife'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Hammer'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('TeethNecklace'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Spear'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Statuette'));
    playField:GetLevelScreen():AddTaskSafe(CreateTask('Pot'));
end

	CreateToolMap(	{'Knife', 			'actZoneWigwam'},
					{'Hammer',   		'actZoneBoxLock'},
					{'TeethNecklace',	'actZoneTeethNecklace'},
					{'Spear',   		'actZoneSpear'},
					{'Statuette',  		'chestClosed'},
					{'Pot',				'brushwood'});

	SetIconForGameObject(playField:GetObject('alarmClock'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/alarmClock_icon.png');
	SetIconForGameObject(playField:GetObject('arrow'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/arrow_icon.png');
	SetIconForGameObject(playField:GetObject('banana'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/banana_icon.png');
	SetIconForGameObject(playField:GetObject('barrow'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/barrow_icon.png');
	SetIconForGameObject(playField:GetObject('bat'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/bat_icon.png');
	SetIconForGameObject(playField:GetObject('bird'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/bird_icon.png');
	SetIconForGameObject(playField:GetObject('brick'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/brick_icon.png');
	SetIconForGameObject(playField:GetObject('bundleOfKeys'),	'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/bundleOfKeys_icon.png');
	SetIconForGameObject(playField:GetObject('butterfly'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/butterfly_icon.png');
	SetIconForGameObject(playField:GetObject('cactus'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/cactus_icon.png');
	SetIconForGameObject(playField:GetObject('crab'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/crab_icon.png');
	SetIconForGameObject(playField:GetObject('crossbow'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/crossbow_icon.png');
	SetIconForGameObject(playField:GetObject('cushio'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/cushio_icon.png');
	SetIconForGameObject(playField:GetObject('demijohn'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/demijohn_icon.png');
	SetIconForGameObject(playField:GetObject('dragon'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/dragon_icon.png');
	SetIconForGameObject(playField:GetObject('feather'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/feather_icon.png');
	SetIconForGameObject(playField:GetObject('gloves'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/gloves_icon.png');
	SetIconForGameObject(playField:GetObject('grapes'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/grapes_icon.png');
	SetIconForGameObject(playField:GetObject('gromophone'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/gromophone_icon.png');
	SetIconForGameObject(playField:GetObject('hammer'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/hammer_icon.png');
	SetIconForGameObject(playField:GetObject('handSaw'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/handSaw_icon.png');
	SetIconForGameObject(playField:GetObject('hat'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/hat_icon.png');
	SetIconForGameObject(playField:GetObject('helmet'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/helmet_icon.png');
	SetIconForGameObject(playField:GetObject('kite'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/kite_icon.png');
	SetIconForGameObject(playField:GetObject('magnifyingGlass'),'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/magnifyingGlass_icon.png');
	SetIconForGameObject(playField:GetObject('mask'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/mask_icon.png');
	SetIconForGameObject(playField:GetObject('nest'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/nest_icon.png');
	SetIconForGameObject(playField:GetObject('onion'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/onion_icon.png');
	SetIconForGameObject(playField:GetObject('pineapple'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/pineapple_icon.png');
	SetIconForGameObject(playField:GetObject('playingCards'),	'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/playingCards_icon.png');
	SetIconForGameObject(playField:GetObject('rose'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/rose_icon.png');
	SetIconForGameObject(playField:GetObject('scroll'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/scroll_icon.png');
	SetIconForGameObject(playField:GetObject('seashell'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/seashell_icon.png');
	SetIconForGameObject(playField:GetObject('seaStar'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/seaStar_icon.png');
	SetIconForGameObject(playField:GetObject('skin'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/skin_icon.png');
	SetIconForGameObject(playField:GetObject('statuette'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/statuette_icon.png');
	SetIconForGameObject(playField:GetObject('streetLamp'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/streetLamp_icon.png');
	SetIconForGameObject(playField:GetObject('tomato'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/tomato_icon.png');
	SetIconForGameObject(playField:GetObject('tree'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/tree_icon.png');
	SetIconForGameObject(playField:GetObject('turtle'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/turtle_icon.png');
	SetIconForGameObject(playField:GetObject('watch'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/watch_icon.png');
	SetIconForGameObject(playField:GetObject('watermelon'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Misc/watermelon_icon.png');

	SetIconForGameObject(playField:GetObject('Knife'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Knife_icon.png');
	SetIconForGameObject(playField:GetObject('Hammer'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Hammer_icon.png');
	SetIconForGameObject(playField:GetObject('TeethNecklace'),	'data/Texture/Scenes/11_AboriginalCamp/Items/TeethNecklace_icon.png');
	SetIconForGameObject(playField:GetObject('Spear'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Spear_icon.png');
	SetIconForGameObject(playField:GetObject('Statuette'),		'data/Texture/Scenes/11_AboriginalCamp/Items/Statuette_icon.png');
	SetIconForGameObject(playField:GetObject('Pot'),			'data/Texture/Scenes/11_AboriginalCamp/Items/Pot_icon.png');

if (restoringFromSave == false) then
	gameState.boxLockInitY = playField:GetObject('boxLock'):GetY();
	gameState.boxLockFallDistance = 70.0;

	gameState.knifeUsed = false;
	gameState.hammerUsed = false;
	gameState.teethNecklaceOnPlace = false;
	gameState.spearOnPlace = false;
	gameState.statuetteOnPlace = false;
	gameState.potUsed = false;

	gameState.chestOpened = false;
	gameState.beamMoved = false;
	gameState.lockIsFalling = false;
	gameState.beamIsMoving = false;
	gameState.spearFound = false;

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

	AssignActiveZonesGlow({function() return gameState.knifeUsed; end,			'actZoneWigwam',		'Knife_ghost'},
						  {function() return gameState.hammerUsed; end,			'actZoneBoxLock',		'Hammer_ghost'},
					      {function() return gameState.teethNecklaceOnPlace;end,'actZoneTeethNecklace',	'TeethNecklace_ghost'},
						  {function() return gameState.spearOnPlace; end,		'actZoneSpear',			'Spear_ghost'},
						  {function() return gameState.statuetteOnPlace; end,	'chestClosed',			'Statuette_ghost'},
						  {function() return gameState.potUsed; end,			'brushwood',			'Pot_ghost'});


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

	auxSceneInit(restoringFromSave);
	auxProcessToolObjectStateAnCursorType();
end

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

    StopSound('L11S10');
    StopSound('L11S11');
    StopSound('L11S12');
    StopSound('L11S13');
end

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

--		gameState.customCursors['actZoneBox'] = {'CursorZoom'};
--		gameState.customCursors['actZoneWigwam'] = {'CursorZoom'};

		auxStopAnimation('beamAnim', HGEANIM_FWD + HGEANIM_NOLOOP);

	    playField:IgnoreOnTestPoint('embersAnim');

		auxCreateAboriginalCampAnimations(playField:GetObject('RootBackground'));
		auxPlayAboriginalCampAnimation('EnvTop');
		auxPlayAboriginalCampAnimation('Fly1');
--		auxPlayAboriginalCampAnimation('Fly2');
		auxPlayAboriginalCampAnimation('Dust');

		gameState.nextAnimationDelay = 0;

		gameState.lockIsFalling = false;
		gameState.beamIsMoving = false;
	end

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

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

function auxProcessToolObjectStateAnCursorType()
    assert( gameState.knifeUsed ~= nil and
			gameState.hammerUsed ~= nil and
			gameState.teethNecklaceOnPlace ~= nil and
			gameState.spearOnPlace ~= nil and
			gameState.statuetteOnPlace ~= nil and
			gameState.potUsed ~= nil and
			gameState.chestOpened ~= nil and
			gameState.beamMoved ~= nil);

	if (gameState.knifeUsed == true) then
		RootZoomZone.HideObject('rope');
		gameState.lockedObjects['actZoneWigwam'] = nil;
	    gameState.customCursors['actZoneWigwam'] = {'CursorZoom'};
	else
		RootZoomZone.UnhideObject('rope');
		gameState.lockedObjects['actZoneWigwam'] = true;
	    gameState.customCursors['actZoneWigwam'] = {'CursorArms'};
	end

	if (gameState.lockIsFalling == false) then
		if (gameState.hammerUsed == true) then
			playField:GetObject('boxLock'):SetY(gameState.boxLockInitY + gameState.boxLockFallDistance);
			gameState.customCursors['actZoneBoxLock'] = nil;
			gameState.lockedObjects['actZoneBox'] = nil;
			gameState.customCursors['actZoneBox'] = {'CursorZoom'};
		else
			playField:GetObject('boxLock'):SetY(gameState.boxLockInitY);
			gameState.customCursors['actZoneBoxLock'] = {'CursorArms'};
			gameState.lockedObjects['actZoneBox'] = true;
			gameState.customCursors['actZoneBox'] = nil;
		end
		playField:GetObject('actZoneBoxLock'):SetVisible(not gameState.hammerUsed);
	end

	if (gameState.teethNecklaceOnPlace == true) then
		WigwamZoomZone.UnhideObject('TeethNecklace_onPlace');
		gameState.customCursors['actZoneTeethNecklace'] = nil;
	else
		WigwamZoomZone.HideObject('TeethNecklace_onPlace');
		gameState.customCursors['actZoneTeethNecklace'] = {'CursorArms'};
	end

	if (gameState.spearOnPlace == true) then
		WigwamZoomZone.UnhideObject('Spear_onPlace');
		gameState.customCursors['actZoneSpear'] = nil;
	else
		WigwamZoomZone.HideObject('Spear_onPlace');
		gameState.customCursors['actZoneSpear'] = {'CursorArms'};
	end

	if (gameState.statuetteOnPlace == true) then
		if (gameState.chestOpened == true) then
			BoxZoomZone.HideObject('Statuette_onPlace');
			BoxZoomZone.HideObject('chestClosed');
			BoxZoomZone.UnhideObject('chestOpened');
    		if (playField:HasObject('Spear') == true) then
			    BoxZoomZone.UnhideObject('Spear');
			end
		else
			BoxZoomZone.UnhideObject('Statuette_onPlace');
			BoxZoomZone.UnhideObject('chestClosed');
			BoxZoomZone.HideObject('chestOpened');
    		if (playField:HasObject('Spear') == true) then
			    BoxZoomZone.HideObject('Spear');
			end
		end
		gameState.customCursors['chestClosed'] = {'CursorArms'};
	else
		BoxZoomZone.HideObject('Statuette_onPlace');
		gameState.customCursors['chestClosed'] = {'CursorArms'};
	end

	if (gameState.potUsed == true) then
		RootZoomZone.HideObject('brushwood');
		gameState.customCursors['brushwood'] = nil;
		RootZoomZone.HideObject('embersAnim');
	else
		RootZoomZone.UnhideObject('brushwood');
		gameState.customCursors['brushwood'] = {'CursorArms'};
		RootZoomZone.UnhideObject('embersAnim');
	end

	if (gameState.beamIsMoving == false) then
		local anim = playField:GetObject('beamAnim'):GetAnimation();
		anim:Stop();
		if (gameState.beamMoved == true) then
			anim:SetFrame(anim:GetFrames() - 1);
			gameState.customCursors['beamAnim'] = nil;
		    playField:IgnoreOnTestPoint('beamAnim');
		else
			anim:SetFrame(0);
			gameState.customCursors['beamAnim'] = {'CursorArms'};
		end
	end

	-- zoom-zones blocking
	if (gameState.hammerUsed == true) then
		if (gameState.spearFound == true) then
			gameState.customCursors['actZoneBox'] = nil;
			gameState.lockedObjects['actZoneBox'] = true;
		else
			gameState.customCursors['actZoneBox'] = {'CursorZoom'};
			gameState.lockedObjects['actZoneBox'] = nil;
		end
	end
end

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxDisableSateFlag(flagName, additinalAction)
	assert(gameState[flagName] ~= nil);
	gameState[flagName] = false;
	if (additinalAction ~= nil) then
		additinalAction();
	end
end

function auxDropBoxLock()
	local duration = 0.18;
	gameState.lockIsFalling = true;
	gameState.hammerUsed = true;
	TimerDoString('auxDisableSateFlag(\'lockIsFalling\');', duration, playField:GetTimer());

	local objLock = playField:GetObject('boxLock');

	objLock:SetY(gameState.boxLockInitY);
	objLock:Move(0.0, gameState.boxLockFallDistance, duration);

	playField:GetObject('actZoneBoxLock'):SetVisible(false);
	gameState.customCursors['actZoneBoxLock'] = nil;
	gameState.lockedObjects['actZoneBox'] = nil;
	gameState.customCursors['actZoneBox'] = {'CursorZoom'};
end

function auxMoveBeam()
	local duration = auxGetAnimationDuration(playField:GetObject('beamAnim'):GetAnimation());
	gameState.beamIsMoving = true;
	gameState.beamMoved = true;
	TimerDoString('auxDisableSateFlag(\'beamIsMoving\');', duration, playField:GetTimer());

	playField:GetObject('beamAnim'):GetAnimation():Play();
    playField:IgnoreOnTestPoint('beamAnim');
	gameState.customCursors['beamAnim'] = nil;
end

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

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

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

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

--// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxTestLevelCompleteCondition()
	if (gameState.allToolsApplied == true and
		gameState.levelCompleted == false and
		playField:GetLevelScreen():HasUncompletedTask() == false) then

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

------------------------------------------------------------------------------
--
function OnDialogButtonPress(name, param)
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 == 'beamAnim' and gameState.beamMoved == false) then
				gameState.beamMoved = true;
				auxMoveBeam();
				auxProcessToolObjectStateAnCursorType();
                isWrongClick = false;
				PlaySound('L11S12');
			end
			if (objectName == 'chestClosed' and gameState.statuetteOnPlace == true and gameState.chestOpened == false) then
				gameState.chestOpened = true;
				auxProcessToolObjectStateAnCursorType();
                isWrongClick = false;
				PlaySound('L11S11');
			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 == 'brushwood' and gameState.potUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_EMBERS_TIP1'));
	elseif (objectName == 'chestClosed' and gameState.statuetteOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_CHEST_LOCKED_TIP1'));
	elseif (objectName == 'actZoneWigwam' and gameState.knifeUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_WIGWAM_ROPE_TIP1'));
	elseif (objectName == 'actZoneTeethNecklace' and gameState.teethNecklaceOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_NECKLACE_TIP1'));
	elseif (objectName == 'actZoneBoxLock' and gameState.hammerUsed == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_BOX_LOCK_TIP1'));
	elseif (objectName == 'chestOpened' and gameState.statuetteOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_CHESTLOCKED_TIP1'));
	elseif (objectName == 'actZoneSpear' and gameState.spearOnPlace == false) then
	    playField:GetLevelScreen():ShowTip(GetTextString('LEVEL11_SPEAR_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
	    assert(gameState.activeZone ~= nil);
	    if (gameState.activeZone == BoxZoomZone and objectName == 'Spear' and gameState.spearFound == false) then
			gameState.spearFound = true;
			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 or (toolName == 'Knife' and objName == gameState.toolMap[toolName]);
end

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

	-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	if (toolName == 'Knife' and objName == gameState.toolMap[toolName]) then
    	gameState.knifeUsed = true;
		toolApplied = true;
	end
	if (toolName == 'Hammer' and objName == gameState.toolMap[toolName]) then
    	gameState.hammerUsed = true;
		toolApplied = true;
		auxDropBoxLock();
	end
	if (toolName == 'TeethNecklace' and objName == gameState.toolMap[toolName]) then
    	gameState.teethNecklaceOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Spear' and objName == gameState.toolMap[toolName]) then
    	gameState.spearOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Statuette' and objName == gameState.toolMap[toolName]) then
    	gameState.statuetteOnPlace = true;
		toolApplied = true;
	end
	if (toolName == 'Pot' and objName == gameState.toolMap[toolName]) then
    	gameState.potUsed = true;
		toolApplied = true;
		PlaySound('L11S13');
	end
	if (not toolApplied) then
	    playField:GetLevelScreen():ShowTip(GetTextString('WRONG_ITEM_APPLIED_TIP1'),
										   GetTextString('WRONG_ITEM_APPLIED_TIP2'));
	end

    --// automatic zoom-zone hiding and blocking
	do
	    assert(gameState.activeZone ~= nil);
	    if (gameState.activeZone == WigwamZoomZone and 
			(toolName == 'TeethNecklace' or toolName == 'Spear') and toolApplied == true and
			gameState.teethNecklaceOnPlace == true and gameState.spearOnPlace == true) then
			CloseAndBlockActiveZone();
	    end
	end

	if (gameState.knifeUsed == true and
		gameState.hammerUsed == true and
		gameState.teethNecklaceOnPlace == true and
		gameState.spearOnPlace == true and
		gameState.statuetteOnPlace == true and
		gameState.potUsed == 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/11_AboriginalCamp/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,98,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/alarmClock.png',0,0,102,103,1,0)
	anim:SetHotSpot(51,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('alarmClock',anim,541,589,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/arrow.png',0,0,21,29,1,0)
	anim:SetHotSpot(10,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('arrow',anim,362,311,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/banana.png',0,0,59,38,1,0)
	anim:SetHotSpot(29,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('banana',anim,580,524,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/barrow.png',0,0,89,76,1,0)
	anim:SetHotSpot(44,38)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('barrow',anim,951,621,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/bat.png',0,0,73,45,1,0)
	anim:SetHotSpot(36,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bat',anim,229,54,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/bird.png',0,0,56,51,1,0)
	anim:SetHotSpot(28,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bird',anim,623,375,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/brick.png',0,0,55,60,1,0)
	anim:SetHotSpot(27,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('brick',anim,561,539,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/bundleOfKeys.png',0,0,47,67,1,0)
	anim:SetHotSpot(23,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bundleOfKeys',anim,305,153,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/butterfly.png',0,0,57,49,1,0)
	anim:SetHotSpot(28,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('butterfly',anim,437,40,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/cactus.png',0,0,81,78,1,0)
	anim:SetHotSpot(40,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cactus',anim,255,567,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/crab.png',0,0,51,33,1,0)
	anim:SetHotSpot(25,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('crab',anim,666,738,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/crossbow.png',0,0,198,159,1,0)
	anim:SetHotSpot(99,79)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('crossbow',anim,721,711,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/cushio.png',0,0,111,89,1,0)
	anim:SetHotSpot(55,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('cushio',anim,356,617,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/demijohn.png',0,0,183,207,1,0)
	anim:SetHotSpot(91,103)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('demijohn',anim,295,714,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/dragon.png',0,0,171,225,1,0)
	anim:SetHotSpot(85,112)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('dragon',anim,899,458,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/feather.png',0,0,98,208,1,0)
	anim:SetHotSpot(49,104)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('feather',anim,206,148,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/gloves.png',0,0,63,53,1,0)
	anim:SetHotSpot(31,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('gloves',anim,592,681,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/grapes.png',0,0,60,86,1,0)
	anim:SetHotSpot(30,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('grapes',anim,934,110,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/gromophone.png',0,0,152,111,1,0)
	anim:SetHotSpot(76,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('gromophone',anim,641,493,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/hammer.png',0,0,74,44,1,0)
	anim:SetHotSpot(37,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('hammer',anim,790,668,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/handSaw.png',0,0,117,40,1,0)
	anim:SetHotSpot(58,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('handSaw',anim,635,709,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/hat.png',0,0,126,66,1,0)
	anim:SetHotSpot(63,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('hat',anim,603,567,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/helmet.png',0,0,116,155,1,0)
	anim:SetHotSpot(58,77)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('helmet',anim,200,618,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/kite.png',0,0,104,201,1,0)
	anim:SetHotSpot(52,100)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('kite',anim,243,373,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/magnifyingGlass.png',0,0,53,41,1,0)
	anim:SetHotSpot(26,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('magnifyingGlass',anim,447,748,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/mask.png',0,0,72,139,1,0)
	anim:SetHotSpot(36,69)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('mask',anim,302,540,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/nest.png',0,0,94,70,1,0)
	anim:SetHotSpot(47,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('nest',anim,972,568,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/onion.png',0,0,32,32,1,0)
	anim:SetHotSpot(16,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('onion',anim,426,601,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/pineapple.png',0,0,112,125,1,0)
	anim:SetHotSpot(56,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('pineapple',anim,391,708,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/playingCards.png',0,0,97,40,1,0)
	anim:SetHotSpot(48,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('playingCards',anim,528,749,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/rose.png',0,0,60,85,1,0)
	anim:SetHotSpot(30,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('rose',anim,284,320,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/scroll.png',0,0,151,134,1,0)
	anim:SetHotSpot(75,67)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('scroll',anim,381,726,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/seashell.png',0,0,45,38,1,0)
	anim:SetHotSpot(22,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('seashell',anim,492,734,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/seaStar.png',0,0,78,71,1,0)
	anim:SetHotSpot(39,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('seaStar',anim,244,717,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/skin.png',0,0,99,122,1,0)
	anim:SetHotSpot(49,61)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('skin',anim,577,357,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/statuette.png',0,0,44,87,1,0)
	anim:SetHotSpot(22,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('statuette',anim,840,555,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/streetLamp.png',0,0,77,125,1,0)
	anim:SetHotSpot(38,62)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('streetLamp',anim,978,350,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/tomato.png',0,0,28,32,1,0)
	anim:SetHotSpot(14,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('tomato',anim,806,611,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/tree.png',0,0,135,129,1,0)
	anim:SetHotSpot(67,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('tree',anim,814,388,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/turtle.png',0,0,127,97,1,0)
	anim:SetHotSpot(63,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('turtle',anim,777,631,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/watch.png',0,0,54,40,1,0)
	anim:SetHotSpot(27,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('watch',anim,476,715,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Misc/watermelon.png',0,0,71,72,1,0)
	anim:SetHotSpot(35,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('watermelon',anim,488,578,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/boxLayer.png',0,0,389,282,1,0)
	anim:SetHotSpot(194,141)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('boxLayer',anim,830,516,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/boxLock.png',0,0,17,31,1,0)
	anim:SetHotSpot(8,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('boxLock',anim,774,502,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/brushwood.png',0,0,183,112,1,0)
	anim:SetHotSpot(91,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('brushwood',anim,652,620,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/bush.png',0,0,220,199,1,0)
	anim:SetHotSpot(136,136)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('bush',anim,945,710,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/LayerOverPot.png',0,0,122,94,1,0)
	anim:SetHotSpot(61,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerOverPot',anim,736,589,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/palmLeaf1.png',0,0,112,114,1,0)
	anim:SetHotSpot(56,57)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('palmLeaf1',anim,189,49,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/palmLeaf2.png',0,0,174,239,1,0)
	anim:SetHotSpot(87,119)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('palmLeaf2',anim,893,129,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/palmTrunk.png',0,0,116,234,1,0)
	anim:SetHotSpot(58,117)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('palmTrunk',anim,965,411,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/plateLayer.png',0,0,91,39,1,0)
	anim:SetHotSpot(45,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('plateLayer',anim,425,607,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/LayerBoxes.png',0,0,112,188,1,0)
	anim:SetHotSpot(56,94)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('LayerBoxes',anim,823,677,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/rope.png',0,0,110,266,1,0)
	anim:SetHotSpot(55,133)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('rope',anim,371,432,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/spear1.png',0,0,104,416,1,0)
	anim:SetHotSpot(52,208)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spear1',anim,570,355,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/spear2.png',0,0,120,350,1,0)
	anim:SetHotSpot(60,175)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spear2',anim,606,355,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/spear3.png',0,0,74,286,1,0)
	anim:SetHotSpot(37,143)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('spear3',anim,561,390,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/stone.png',0,0,132,119,1,0)
	anim:SetHotSpot(66,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('stone',anim,505,612,104,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/tambourine.png',0,0,118,190,1,0)
	anim:SetHotSpot(59,95)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('tambourine',anim,616,351,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/embersAnim.png',0,0,147,62,10,8)
	anim:SetHotSpot(73,31)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('embersAnim',anim,619,643,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Layers/parrotAnim.png',0,0,50,175,23,12)
	anim:SetHotSpot(150,350)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('parrotAnim',anim,747,502,101,0,0.8,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('actZoneBoxLock',anim,775,524,105,0,0.75,0.9)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Knife.png',0,0,64,86,1,0)
	anim:SetHotSpot(32,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Knife',anim,183,439,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Pot.png',0,0,79,71,1,0)
	anim:SetHotSpot(39,35)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pot',anim,733,573,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Statuette.png',0,0,75,65,1,0)
	anim:SetHotSpot(37,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Statuette',anim,638,630,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/TeethNecklace.png',0,0,60,94,1,0)
	anim:SetHotSpot(30,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('TeethNecklace',anim,944,151,103,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('actZoneBox',anim,833,488,104,7,2.6,0.45)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Zones/Box/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomBoxBackground',anim,629,359,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Zones/Box/Layers/chestOpened.png',0,0,251,267,1,0)
	anim:SetHotSpot(125,133)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('chestOpened',anim,644,361,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Zones/Box/Layers/chestClosed.png',0,0,214,209,1,0)
	anim:SetHotSpot(107,104)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('chestClosed',anim,624,400,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Spear.png',0,0,145,122,1,0)
	anim:SetHotSpot(72,61)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Spear',anim,623,427,203,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Statuette_onPlace.png',0,0,63,42,1,0)
	anim:SetHotSpot(31,21)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Statuette_onPlace',anim,618,362,205,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('actZoneWigwam',anim,370,457,101,0,0.9,2.2)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Zones/Wigwam/Layers/background.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('ZoomWigwamBackground',anim,574,407,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Zones/Wigwam/Layers/beamAnim.png',0,0,138,119,16,12)
	anim:SetHotSpot(69,60)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('beamAnim',anim,454,601,204,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Hammer.png',0,0,206,135,1,0)
	anim:SetHotSpot(103,67)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Hammer',anim,442,584,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Spear_onPlace.png',0,0,36,92,1,0)
	anim:SetHotSpot(18,46)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('Spear_onPlace',anim,646,205,201,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/TeethNecklace_onPlace.png',0,0,91,133,1,0)
	anim:SetHotSpot(45,66)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	play_field:CreateObject('TeethNecklace_onPlace',anim,516,248,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('actZoneSpear',anim,639,249,204,5,0.75,1.4)
	local anim = CreateAnimation('data/Texture/Scenes/Common/actZoneC.png',0,0,128,128,1,0)
	anim:SetHotSpot(64,64)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	play_field:CreateObject('actZoneTeethNecklace',anim,513,258,204,0,1,1.2)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Hammer_ghost.png',0,0,157,135,1,0)
	anim:SetHotSpot(78,78)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Hammer_ghost',anim,747,503,110,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Knife_ghost.png',0,0,75,96,1,0)
	anim:SetHotSpot(37,37)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Knife_ghost',anim,389,418,110,90,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Pot_ghost.png',0,0,86,86,1,0)
	anim:SetHotSpot(43,43)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Pot_ghost',anim,587,602,110,35,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Statuette_ghost.png',0,0,75,64,1,0)
	anim:SetHotSpot(37,32)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Statuette_ghost',anim,618,362,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/Spear_ghost.png',0,0,36,92,1,0)
	anim:SetHotSpot(18,46)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('Spear_ghost',anim,646,205,210,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_AboriginalCamp/Items/TeethNecklace_ghost.png',0,0,91,133,1,0)
	anim:SetHotSpot(45,66)
	anim:SetBlendMode(0)
	anim:SetColor('0xFFFFFFFF')
	play_field:CreateObject('TeethNecklace_ghost',anim,515,248,210,0,1,1)
end

function FreeData()
end
-- CLEAR_ON_SAVE_END
