mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Render debug info in tactical
Functionality for rendering pathfinding and cover values in tactical was behind defunct #ifdefs. It's now compiled always, but only enabled if cheat level is BEDUG_CHEAT_LEVEL. Unified rendering the debug info into one function, instead of several nearly identical ones. Ctrl + Shift + Z cycles through the different debug modes. Now it should be fairly easy to add more info modes like these two in the future.
This commit is contained in:
@@ -1700,6 +1700,24 @@ void ItemCreationCallBack( UINT8 ubResult )
|
||||
memset(gszMsgBoxInputString,0,sizeof(gszMsgBoxInputString));
|
||||
}
|
||||
|
||||
static void CycleThroughTileDebugInfo()
|
||||
{
|
||||
const STR16 modeStrings[] =
|
||||
{
|
||||
L"Pathfinding",
|
||||
L"Threat values",
|
||||
L"Cover values",
|
||||
L"Off",
|
||||
};
|
||||
|
||||
gRenderDebugInfoMode += 1;
|
||||
if (gRenderDebugInfoMode > DEBUG_OFF)
|
||||
{
|
||||
gRenderDebugInfoMode = 0;
|
||||
}
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, modeStrings[gRenderDebugInfoMode]);
|
||||
}
|
||||
|
||||
extern BOOLEAN gfDisableRegionActive;
|
||||
extern BOOLEAN gfUserTurnRegionActive;
|
||||
|
||||
@@ -4763,6 +4781,13 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
if (fCtrl)
|
||||
{
|
||||
if (DEBUG_CHEAT_LEVEL())
|
||||
{
|
||||
CycleThroughTileDebugInfo();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user