function OnWarpEnter() 
	SetMarker("cs\\Warp_0015.wp" , 0 , 0) 
	
	SetMarker("cs\\Warp_0011.wp" , 0 , 0) 


	StartAnimationPart("cia1",0,30,-1,false)

	if not CoffreW221 then
		AnimationSetToStart("zya1")
	else
		AnimationSetToEnd("zya1")
	end
	
--------------------------------------------------------------------------- balcon
		if not balcony_open then
			AnimationSetToStart("cxa1")
			AnimationSetToStart("cya1")
		else
			AnimationSetToEnd("cxa1")
			AnimationSetToEnd("cya1")
		end
	
--------------------------------------------------------------------------- Puzzle des planètes
	
	if PuzzlePlanetSolved then
		PutObject("zwa1",false)
	end

--------------------------------------------------------------------------- Machine révolution
	if not OpenMachineW21 then
		AnimationSetToStart("zma1",false)
	elseif OpenMachineW21 then
		AnimationSetToEnd("zma1",false)
	end

---------------------------------------------------------------------------
--DAY1
	if ETAT_DAY == "D1" then 
		AnimationSetToStart("cpa1")
		AnimationSetToStart("cba1")
		PutObject("bwa1", false)
		SetMarker("bwa1", 4, 0)
		if not O_cesar_cloth_017 then
			PutObject("cca1", false)
		end
		if not O_boots_017 then
			PutObject("caa1", false)
		end	
	end 

--DAY2
	if ETAT_DAY == "D2" then 
		-- porte
		PutObject("bwa1")
		SetMarker("bwa1", 4, 0)
		if not DESK_COVER_MOVED then
			-- couvercle coffre
			AnimationSetToStart("cpa1",false)
			StartAnimationPart("cba1",1,2,-1,false)
		else
			StartAnimationPart("cba1", 2, 3,-1,false)
			if not COFFRET_OPENED  then
				-- couvercle coffre
				AnimationSetToStart("cpa1",false)
				if not NOTE_TAKEN_0017_D3 then
					PutObject("cja1",true)
				end
			else
				-- couvercle coffre
				StartAnimationPart("cpa1",14,15,-1,false)
			end
		end		
	end 

--DAY3
	if ETAT_DAY == "D3" then 
		if not DESK_COVER_MOVED then
			-- couvercle coffre
			AnimationSetToStart("cpa1",false)
			StartAnimationPart("cba1",1,2,-1,false)
		else
			StartAnimationPart("cba1", 2, 3,-1,false)
			if not COFFRET_OPENED  then
				-- couvercle coffre
				AnimationSetToStart("cpa1",false)
				if not NOTE_TAKEN_0017_D3 then
					PutObject("cja1",true)
				end
			else
				-- couvercle coffre
				StartAnimationPart("cpa1",14,15,-1,false)
			end
		end
		SetMarker("cs\\Warp_0021.wp" , 0 , 0) 
	end 

--DAY4
	if ETAT_DAY == "D4" then 
		Observatory_Open = true
		-- drap sur le coffre de César
		AnimationSetToStart("cba1")
		SetMarker("cs\\Warp_0021.wp" , 0 , 0) 
		if not DESK_COVER_MOVED then
			-- couvercle coffre
			AnimationSetToStart("cpa1",false)
			StartAnimationPart("cba1",0,1,-1,false)
		else
			StartAnimationPart("cba1", 29, 30,-1,false)
			if not COFFRET_OPENED  then
				-- couvercle coffre
				AnimationSetToStart("cpa1",false)
				if not NOTE_TAKEN_0017_D3 then
					PutObject("cja1",true)
				end
			else
				-- couvercle coffre
				StartAnimationPart("cpa1",14,15,-1,false)
			end
		end
	end 

--DAY5
	if ETAT_DAY == "D5" then 
		Observatory_Open = true
		-- drap sur le coffre de César
		AnimationSetToStart("cba1")
		SetMarker("cs\\Warp_0021.wp" , 0 , 0) 
		if not DESK_COVER_MOVED then
			-- couvercle coffre
			AnimationSetToStart("cpa1",false)
			StartAnimationPart("cba1",0,1,-1,false)
		else
			StartAnimationPart("cba1", 29, 30,-1,false)
			if not COFFRET_OPENED  then
				-- couvercle coffre
				AnimationSetToStart("cpa1",false)
				if not NOTE_TAKEN_0017_D3 then
					PutObject("cja1",true)
				end
			else
				-- couvercle coffre
				StartAnimationPart("cpa1",14,15,-1,false)
			end
		end
	end 
end

function OnWarpLeave()
end

function OnDialogFinished(dialogName)

	if dialogName == "Ma1962" then
		SetMarker("bwa1",4,0)
	end
end


function OnWarpObjectHit(objectName)

	if objectName == "3D\\cs\\Warp_0015.wp" then 
		ChangeWarp(objectName)
	end

	if objectName == "3D\\cs\\Warp_0021.wp" then
		ChangeWarp(objectName)
	end

	if objectName == "3D\\cs\\Warp_0011.wp" then 
		ChangeWarp(objectName)
	end

--DAY1
	if ETAT_DAY == "D1" then 
		-- porte
		if objectName == "bwa1" then
			SetMarker("bwa1", -1, 0)
			DrawText("Ma1962","Ma1962.ogg",0)

		elseif objectName == "caa1" then

		elseif objectName == "cca1" then

		elseif objectName == "cqa1" then

		elseif objectName == "cqan" then

		elseif objectName == "zwa1" then

		-- ouverture de la porte
		elseif objectName == "bwn1" then

		-- drap sur le coffre de César
		elseif objectName == "cba1" then

		elseif objectName == "cban" then

		elseif objectName == "cia1" then

		-- couvercle du coffre de César
		elseif objectName == "cpa1" then

		elseif objectName == "cpan" then

		-- volet de l'observatoire
		elseif objectName == "cxa1" then

		elseif objectName == "cxan" then

		elseif objectName == "cya1" then

		elseif objectName == "cyan" then

		-- Nostradamus
		elseif objectName == "czan" then

		-- barre du bas du puzzle
		elseif objectName == "vaan" then

		elseif objectName == "vlan" then

		elseif objectName == "vzan" then

		elseif objectName == "vza1" then

		elseif objectName == "waan" then

		elseif objectName == "wnan" then

		elseif objectName == "xaan" then

		elseif objectName == "yaan" then

		elseif objectName == "zma1" then

		elseif objectName == "zman" then

		elseif objectName == "zna1" then

		elseif objectName == "zya1" then

		elseif objectName == "zyan" then

		end
	end 

--DAY2
	if ETAT_DAY == "D2" then 
		-- porte
		if objectName == "bwa1" then
			SetMarker("bwa1", -1, 0)
			DrawText("Ma1962","Ma1962.ogg",0)
		end
	end 

--DAY3
	if ETAT_DAY == "D3" then 

	end 

--DAY4
	if ETAT_DAY == "D4" then 

	end 

--DAY5
	if ETAT_DAY == "D5" then 

	end 
end
