function OnDressChanged()
	RemoveObject("gpc1")
	RemoveObject("gqc1")
	RemoveObject("grc1")	
	if DRESS_MADELEINE then
		-- reflet Madeleine
		StartAnimationPart("gpc1",102,103,-1,false)
	elseif DRESS_CESAR then
		-- reflet César
		StartAnimationPart("gqc1",102,103,-1,false)
	elseif DRESS_MONK then
		-- reflet Madeleine en moine
		StartAnimationPart("grc1",102,103,-1,false)
	end
end

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

	if DRESS_MADELEINE then
		-- reflet Madeleine
		StartAnimationPart("gpc1",102,103,-1,false)
	elseif DRESS_CESAR then
		-- reflet César
		StartAnimationPart("gqc1",102,103,-1,false)
	elseif DRESS_MONK then
		-- reflet Madeleine en moine
		StartAnimationPart("grc1",102,103,-1,false)
	end

	if not GUARD_QUEEN_ROOM_D5 then
		StartAnimationPart("fxc1",10,40,-1,false) -- garde
		PutObject("ubc1") -- reflet du garde
	end
end

function ShowDialog()

	if not Brief then PushAnswer("Ce1748") end
	if not Victimes then PushAnswer("Ce1753") end
	if not Incidents then PushAnswer("Ce1756") end

	if Incidents then
		if not Cocher then PushAnswer("Ce1761") end
		if not Bibliothecaire then PushAnswer("Ce1766") end
	end

	PushAnswer("3411")
	StartAnimationPart("gac1",0,30,-1,true)
end

function OnDialogFinished(dialogName)
end

function OnAnswered(textId)
	if textId == "Ce1748" then
		StartAnimationPart("gac1",40,60,-1,true)
		DrawText("Sc1749", "Sc1749.ogg", 4)
		DrawText("Sc1750", "Sc1750.ogg", 4)
		DrawText("Sc1751", "Sc1751.ogg", 4)
		DrawText("Sc1752", "Sc1752.ogg", 4)
		Brief = true -- pour dire qu'on a questionner sur le Brief
	elseif textId == "Ce1753" then 
		StartAnimationPart("gac1",40,60,-1,true)
		DrawText("Sc1754", "Sc1754.ogg", 4)
		DrawText("Sc1755", "Sc1755.ogg", 4)	
		Victimes = true -- pour dire qu'on a questionner sur les Victimes
	elseif textId == "Ce1756" then 
		StartAnimationPart("gac1",40,60,-1,true)
		DrawText("Sc1757", "Sc1757.ogg", 4)
		DrawText("Ce1758", "Ce1758.ogg", 1)
		DrawText("Sc1759", "Sc1759.ogg", 4)
		DrawText("Sc1760", "Sc1760.ogg", 4)
		Incidents = true -- pour dire qu'on a questionner sur les incidents
	elseif textId == "Ce1761" then 
		StartAnimationPart("gac1",40,60,-1,true)
		DrawText("Sc1762", "Sc1762.ogg", 4)
		DrawText("Ce1763", "Ce1763.ogg", 1)
		DrawText("Sc1764", "Sc1764.ogg", 4)
		DrawText("Ce1765", "Ce1765.ogg", 1)
		Cocher = true -- pour dire qu'on a questionner sur les incidents
	elseif textId == "Ce1766" then 
		StartAnimationPart("gac1",40,60,-1,true)
		DrawText("Sc1767", "Sc1767.ogg", 4)
		DrawText("Sc1768", "Sc1768.ogg", 4)
		DrawText("Ce1765", "Ce1765.ogg", 1)
		Bibliothecaire = true -- pour dire qu'on a questionner sur les incidents
	elseif textId == "3411" then -- prendre congé
		SetMarker("gac1",4,0)
	end
end

function OnWarpLeave()
end

function OnWarpObjectHit(objectName)

	if objectName == "3D\\cs\\Warp_0067.wp" then 
		if GUARD_CAPTURED_NOSTRADMUS and not TALK_QUEEN_D5 and not DRESS_MONK then
			if DRESS_CESAR then
				PlayMovie("Videos/CaptureCesar.ogv", "Videos/BD_Arrest.ogg")
			else
				PlayMovie("Videos/CaptureMadeleine.ogv", "Videos/BD_Arrest.ogg")
			end
		else
			ChangeWarp(objectName)
		end
	end

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

function OnMovieFinished(name)
	if (name == "Videos/CaptureCesar.ogv") or (name == "Videos/CaptureMadeleine.ogv") then
		ChangeWarp("3D\\cs\\Warp_0062.wp")
	end
end
