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


	if ETAT_DAY == "D4" then 
	     if not FIRST_ENGRAVED then
		SetMarker("FIRST_ENGRAVED",4,0)
	     else
		   PutObject("jpe1",false)
             end
	    if not SECOND_ENGRAVED then
		SetMarker("SECOND_ENGRAVED",4,0)
	   else
		PutObject("jse1",false)
	   end
	   if not SHIELD_PICKED then
		StartAnimationPart("jje1",81,82,-1,false)
		SetMarker("jje1",2,0)
           end
	   if not SWORD_PICKED then
		StartAnimationPart("jie1",81,82,-1,false)
		SetMarker("jie1",2,0)
	   end
	   
	end 

end

function OnWarpLeave()
end

function OnWarpObjectHit(objectName)

	if objectName == "3D\\cs\\Warp_0081.wp" then 
		if HOLE_FALLEN then
			if not SHIELD_PICKED then
				PlayMovie("Videos/DeadEndCesarEboulement.ogv", "Videos/DeadEndCesarEboulement.ogg")
			elseif not SWORD_PICKED and SHIELD_PICKED then
				DrawText("Ma0220","Ma0220.ogg",0) -- Pas encore !
			else
				ChangeWarp(objectName)
			end
		else
			ChangeWarp(objectName)
		end
	end


	if ETAT_DAY == "D4" then 
		if objectName=="3D\\FIRST_ENGRAVED" then
			if Selected("C_petite_pierre") or Selected("C_petite_tombe") and LookAtTomb then
				RemoveFromBag()
				PutObject("jpe1")
				PlaySound("Sounds/SFX/N_EcraserArgile.ogg",1)
			       FIRST_ENGRAVED = true
				SetMarker("FIRST_ENGRAVED",-1,0)
			       if FIRST_ENGRAVED  and SECOND_ENGRAVED then
					PlayMovie("Videos/CesarRunes.ogv", "Videos/CesarRunes.ogg")
			      end
			elseif Selected("C_petite_pierre") or Selected("C_petite_tombe") and not Tombe then
				DrawText("Ma0214","Ma0214.ogg",0) -- Ce n'est pas une mauvaise idée mais il manque quelque chose
			else 
				DrawText("Ma2962","Ma2962.ogg",0) -- Intéressant !
			end
		end
		if objectName=="3D\\SECOND_ENGRAVED" then
			if Selected("A_pierre_nostradamus") then
				RemoveFromBag()
				PutObject("jse1")
				PlaySound("Sounds/SFX/N_EcraserArgile.ogg",1)
			       SECOND_ENGRAVED = true
				SetMarker("SECOND_ENGRAVED",-1,0)
			       if FIRST_ENGRAVED  and SECOND_ENGRAVED then
					PlayMovie("Videos/CesarRunes.ogv", "Videos/CesarRunes.ogg")
			      end
			else 
				DrawText("Ma2962","Ma2962.ogg",0) -- Intéressant !
			end
		end
		if objectName == "jpe1" then

		elseif objectName == "jse1" then

		elseif objectName == "jie1" then
			if not SWORD_PICKED then
				SetMarker("jie1",-1,0)
				AddToBag("C_epee_tordue")
				RemoveObject("jie1")
				SWORD_PICKED = true
			end

		elseif objectName == "jje1" then
			if not SHIELD_PICKED then
				SetMarker("jje1",-1,0)
				AddToBag("E_bouclier")
				RemoveObject("jje1")
				SHIELD_PICKED = true
			end
		end
	end 

end

function OnMovieFinished(name)

	if (name == "Videos/CesarRunes.ogv") then
		LookAt(355,1)
		DrawText("Ma2779","Ma2779.ogg",0) -- La galerie menace de s'effondrer, je ferais mieux de ne pas rester !
		PlayMusic("Sounds/Musiques/M_Eboulement.ogg")
--		PlayMovie("Videos/Eboulement.ogv", "Videos/Eboulement.ogg")
		HOLE_FALLEN = true
		SetDiaryPage(15, "Page15_02")
	end

	if (name == "Videos/DeadEndCesarEboulement.ogv") then
		LookAt(355,1)
		DrawText("Ma2779","Ma2779.ogg",0) -- La galerie menace de s'effondrer, je ferais mieux de ne pas rester !
		PlayMusic("Sounds/Musiques/M_Eboulement.ogg")
		HOLE_FALLEN = true
	end

end
