function OnWarpEnter() 
	SetMarker("cs\\Warp_0070.wp" , 0 , 0) 
	--SetMarker("cs\\Warp_0069.wp" , 0 , 0) 
	SetMarker("cs\\Warp_0067.wp" , 0 , 0) 

--DAY2
	if ETAT_DAY == "D2" then 
		-- porte
		AnimationSetToStart("gdc1")
		if Ph_Key_051 and O_SmallPacket_058 and not Talked_068 then
			Talked_068=true
			DrawText("Ma2726","Ma2726.ogg",0) -- Je me demande, si je ferai mieux d'aller voir Chavigny sous les traits de César ou sous ma propre identité.
		end
		if O_quatrain_063 and not Talked_Anime55 then
			StartAnimationPart("gac1",0,30,-1,false)
		end
	end

--DAY3 
	if ETAT_DAY == "D3" then 
		-- porte
		AnimationSetToStart("gdc1",false)
		if DEAD_GUARD_PASSAGE_0072_D3 then
			if DEAD_GUARD_COVERED then
				StartAnimationPart("hic1",3,4,-1,false)
			else
				AnimationSetToStart("hic1",false)
			end
			if PHILIP_DEAD_GUARD_0072_D3 then
				StartAnimationPart("hhc1",0,20,-1,false)
			end
		end	
	end

--DAY4 
	if ETAT_DAY == "D4" then 
		if TALK_TO_QUEEN_D4 and not TOOK_MAP_FRAGMENT_D4 then
			LookAt(123,31)
			DrawText("Ma2635","Ma2635.ogg",0) -- Quelqu'un a dû le perdre récemment, je ne l'avais pas remarqué.
			DrawText("Ma2636","Ma2636.ogg",0) -- C'est peut-être Chavigny, sa porte a l'air ouverte.
			PutObject("gec1")
			SetMarker("gec1",2,0)
		end

		if not  HOLE_FALLEN then
			-- porte
			AnimationSetToStart("gdc1",false)
		else
			if not OPENED_DOOR_68_D4 then
				-- porte
			       StartAnimationPart("gdc1",1,2,-1,false)
				-- porte
			       SetMarker("gdc1",4,0)
			else
				-- porte
				AnimationSetToEnd("gdc1",false)
				SetMarker("cs\\Warp_0069.wp" , 0 , 0) 
				AnimationSetToStart("gkc1")
				AnimationSetToStart("gfc1")
			end
		end
	end

--DAY5 
	if ETAT_DAY == "D5" then 
		-- porte
		AnimationSetToEnd("gdc1",false)
		SetMarker("cs\\Warp_0069.wp" , 0 , 0)
		if SawDustW69 then
			AnimationSetToEnd("gkc1")
		else
			AnimationSetToStart("gkc1")
		end
		OPENED_DOOR_68_D4 = true
	end 
end

function OnWarpLeave()
end

function OnAnimationFinished(objectName)
	-- porte
	if objectName=="gdc1" then
		-- porte
		AnimationSetToEnd("gdc1",false)
		OPENED_DOOR_68_D4 = true
		AnimationSetToStart("gkc1")
		AnimationSetToStart("gfc1")
		SetMarker("cs\\Warp_0069.wp" , 0 , 0) 
	end
end


function OnWarpObjectHit(objectName)

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

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

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


--DAY2
	if ETAT_DAY == "D2" then 

		-- fragment de plan
		if objectName == "gec1" then

		-- scribe w66
		elseif objectName == "gac1" then

		-- porte
		elseif objectName == "gdc1" then

		-- coffre
		elseif objectName == "gkc1" then

		-- Jean-Aimé  w72
		elseif objectName == "hhc1" then

		-- cadavre garde
		elseif objectName == "hic1" then

		end
	end 

--DAY3
	if ETAT_DAY == "D3" then 

	end 

--DAY4
	if ETAT_DAY == "D4" then 
		-- fragment de plan
		if objectName == "gec1" then
			if not TOOK_MAP_FRAGMENT_D4 then
				-- fragment de plan
				SetMarker("gec1",-1,0)
				AddToBag("C_morceau_plan")
				TOOK_MAP_FRAGMENT_D4 = true
				-- fragment de plan
				RemoveObject("gec1")
				CAN_ENTER_QUEEN_ROOM_D4 = false
				NotExpectedW63 = true
			end

		-- porte
		elseif objectName == "gdc1" then
			if HOLE_FALLEN then
				if not OPENED_DOOR_68_D4 then
					-- porte
					StartAnimationPart("gdc1",1,25,1,false)
					-- porte
					SetMarker("gdc1",-1,0)
					PlaySound("Sounds/SFX/E_ArmoireOuverture.ogg",1)
				end
			end
		end
	end 

--DAY5
	if ETAT_DAY == "D5" then 

	end 
end
