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:
Asdow
2024-02-21 23:24:14 +02:00
parent ab2c5fc10d
commit de91c7a9fd
9 changed files with 301 additions and 322 deletions
+25
View File
@@ -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;
}