Added psychedelic lights mode to debug modes

Right behind the other debug display modes - so it's
4 x Ctrl-F7 in debug mode now. Not sure it will become useful,
but it's sort of pretty, so why not.
issue1247
Peter Wortmann 2012-09-20 12:33:38 +01:00
parent bcdf854e59
commit a2820598b2
3 changed files with 9 additions and 3 deletions

View File

@ -182,6 +182,7 @@ void C4GraphicsSystem::Default()
ShowPathfinder=false;
ShowNetstatus=false;
ShowSolidMask=false;
ShowLights=false;
ShowHelp=false;
FlashMessageText[0]=0;
FlashMessageTime=0; FlashMessageX=FlashMessageY=0;
@ -304,6 +305,7 @@ void C4GraphicsSystem::DeactivateDebugOutput()
ShowCommand=false;
ShowEntrance=false;
ShowPathfinder=false; // allow pathfinder! - why this??
ShowLights=false;
ShowSolidMask=false;
ShowNetstatus=false;
}
@ -422,14 +424,16 @@ bool C4GraphicsSystem::ToggleShowVertices()
bool C4GraphicsSystem::ToggleShowAction()
{
if (!Game.DebugMode && !Console.Active) { FlashMessage(LoadResStr("IDS_MSG_NODEBUGMODE")); return false; }
if (!(ShowAction || ShowCommand || ShowPathfinder))
if (!(ShowAction || ShowCommand || ShowPathfinder || ShowLights))
{ ShowAction = true; FlashMessage("Actions"); }
else if (ShowAction)
{ ShowAction = false; ShowCommand = true; FlashMessage("Commands"); }
else if (ShowCommand)
{ ShowCommand = false; ShowPathfinder = true; FlashMessage("Pathfinder"); }
else if (ShowPathfinder)
{ ShowPathfinder = false; FlashMessageOnOff("Actions/Commands/Pathfinder", false); }
{ ShowPathfinder = false; ShowLights = true; FlashMessage("Lights"); }
else if (ShowLights)
{ ShowLights = false; FlashMessageOnOff("Actions/Commands/Pathfinder/Lights", false); }
return true;
}

View File

@ -45,6 +45,7 @@ public:
bool ShowPathfinder;
bool ShowNetstatus;
bool ShowSolidMask;
bool ShowLights;
C4Video Video;
C4LoaderScreen *pLoaderScreen;
void Default();

View File

@ -264,7 +264,8 @@ void C4Viewport::Draw(C4TargetFacet &cgo0, bool fDrawOverlay)
// Draw overlay
if (!Game.C4S.Head.Film || !Game.C4S.Head.Replay) Game.DrawCursors(cgo, Player);
//pFoW->Render(&cgo);
// Lights overlay
if (::GraphicsSystem.ShowLights && pFoW) pFoW->Render(&cgo);
if (fDrawOverlay)
{