clean up debug menu

This commit is contained in:
aap 2021-02-13 14:22:34 +01:00
parent 3db0e827e5
commit 65f9917b65
3 changed files with 53 additions and 66 deletions

View File

@ -1053,7 +1053,7 @@ DisplayGameDebugText()
#ifndef FINAL #ifndef FINAL
{ {
SETTWEAKPATH("GameDebugText"); SETTWEAKPATH("Debug");
TWEAKBOOL(bDisplayPosn); TWEAKBOOL(bDisplayPosn);
TWEAKBOOL(bDisplayCheatStr); TWEAKBOOL(bDisplayCheatStr);
} }

View File

@ -694,18 +694,6 @@ SwitchCarCollision(void)
FindPlayerVehicle()->bUsesCollision = !FindPlayerVehicle()->bUsesCollision; FindPlayerVehicle()->bUsesCollision = !FindPlayerVehicle()->bUsesCollision;
} }
static int engineStatus;
static void
SetEngineStatus(void)
{
CVehicle *veh = FindPlayerVehicle();
if(veh == nil)
return;
if(!veh->IsCar())
return;
((CAutomobile*)veh)->Damage.SetEngineStatus(engineStatus);
}
static void static void
ToggleComedy(void) ToggleComedy(void)
{ {
@ -928,13 +916,22 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Spawn", "Spawn Skimmer", [](){ SpawnCar(MI_SKIMMER); }); DebugMenuAddCmd("Spawn", "Spawn Skimmer", [](){ SpawnCar(MI_SKIMMER); });
DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil); DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil);
#ifdef PROPER_SCALING
DebugMenuAddVarBool8("Render", "Proper Scaling", &CDraw::ms_bProperScaling, nil);
#endif
#ifdef FIX_RADAR
DebugMenuAddVarBool8("Render", "Fix Radar", &CDraw::ms_bFixRadar, nil);
#endif
#ifdef FIX_SPRITES
DebugMenuAddVarBool8("Render", "Fix Sprites", &CDraw::ms_bFixSprites, nil);
#endif
DebugMenuAddVarBool8("Render", "Backface Culling", &gBackfaceCulling, nil); DebugMenuAddVarBool8("Render", "Backface Culling", &gBackfaceCulling, nil);
DebugMenuAddVarBool8("Render", "PS2 Alpha test Emu", &gPS2alphaTest, nil); DebugMenuAddVarBool8("Render", "PS2 Alpha test Emu", &gPS2alphaTest, nil);
DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil); DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil);
DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil); DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil);
DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil); DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil);
#ifdef NEW_RENDERER #ifdef NEW_RENDERER
DebugMenuAddVarBool8("Render", "new renderer", &gbNewRenderer, nil); DebugMenuAddVarBool8("Render", "New Renderer", &gbNewRenderer, nil);
extern bool gbRenderRoads; extern bool gbRenderRoads;
extern bool gbRenderEverythingBarRoads; extern bool gbRenderEverythingBarRoads;
extern bool gbRenderFadingInUnderwaterEntities; extern bool gbRenderFadingInUnderwaterEntities;
@ -945,16 +942,16 @@ extern bool gbRenderVehicles;
extern bool gbRenderWorld0; extern bool gbRenderWorld0;
extern bool gbRenderWorld1; extern bool gbRenderWorld1;
extern bool gbRenderWorld2; extern bool gbRenderWorld2;
DebugMenuAddVarBool8("Render", "gbRenderRoads", &gbRenderRoads, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderRoads", &gbRenderRoads, nil);
DebugMenuAddVarBool8("Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil);
DebugMenuAddVarBool8("Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil);
DebugMenuAddVarBool8("Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil);
DebugMenuAddVarBool8("Render", "gbRenderWater", &gbRenderWater, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderWater", &gbRenderWater, nil);
DebugMenuAddVarBool8("Render", "gbRenderBoats", &gbRenderBoats, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderBoats", &gbRenderBoats, nil);
DebugMenuAddVarBool8("Render", "gbRenderVehicles", &gbRenderVehicles, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderVehicles", &gbRenderVehicles, nil);
DebugMenuAddVarBool8("Render", "gbRenderWorld0", &gbRenderWorld0, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderWorld0", &gbRenderWorld0, nil);
DebugMenuAddVarBool8("Render", "gbRenderWorld1", &gbRenderWorld1, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderWorld1", &gbRenderWorld1, nil);
DebugMenuAddVarBool8("Render", "gbRenderWorld2", &gbRenderWorld2, nil); DebugMenuAddVarBool8("Debug Render", "gbRenderWorld2", &gbRenderWorld2, nil);
#endif #endif
#ifdef EXTENDED_COLOURFILTER #ifdef EXTENDED_COLOURFILTER
@ -983,31 +980,26 @@ extern bool gbRenderWorld2;
DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil); DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil);
DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f); DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f);
#endif #endif
DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil); DebugMenuAddVarBool8("Debug Render", "Show Ped Paths", &gbShowPedPaths, nil);
DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil); DebugMenuAddVarBool8("Debug Render", "Show Car Paths", &gbShowCarPaths, nil);
DebugMenuAddVarBool8("Render", "Show Car Path Links", &gbShowCarPathsLinks, nil); DebugMenuAddVarBool8("Debug Render", "Show Car Path Links", &gbShowCarPathsLinks, nil);
DebugMenuAddVarBool8("Render", "Show Collision Lines", &gbShowCollisionLines, nil); DebugMenuAddVarBool8("Debug Render", "Show Collision Lines", &gbShowCollisionLines, nil);
DebugMenuAddVarBool8("Render", "Show Collision Polys", &gbShowCollisionPolys, nil); DebugMenuAddVarBool8("Debug Render", "Show Collision Polys", &gbShowCollisionPolys, nil);
DebugMenuAddVarBool8("Render", "Don't render Buildings", &gbDontRenderBuildings, nil); DebugMenuAddVarBool8("Debug Render", "Don't render Buildings", &gbDontRenderBuildings, nil);
DebugMenuAddVarBool8("Render", "Don't render Big Buildings", &gbDontRenderBigBuildings, nil); DebugMenuAddVarBool8("Debug Render", "Don't render Big Buildings", &gbDontRenderBigBuildings, nil);
DebugMenuAddVarBool8("Render", "Don't render Peds", &gbDontRenderPeds, nil); DebugMenuAddVarBool8("Debug Render", "Don't render Peds", &gbDontRenderPeds, nil);
DebugMenuAddVarBool8("Render", "Don't render Vehicles", &gbDontRenderVehicles, nil); DebugMenuAddVarBool8("Debug Render", "Don't render Vehicles", &gbDontRenderVehicles, nil);
DebugMenuAddVarBool8("Render", "Don't render Objects", &gbDontRenderObjects, nil); DebugMenuAddVarBool8("Debug Render", "Don't render Objects", &gbDontRenderObjects, nil);
DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil); DebugMenuAddVarBool8("Debug Render", "Don't Render Water", &gbDontRenderWater, nil);
#ifdef PROPER_SCALING
DebugMenuAddVarBool8("Draw", "Proper Scaling", &CDraw::ms_bProperScaling, nil);
#endif
#ifdef FIX_RADAR
DebugMenuAddVarBool8("Draw", "Fix Radar", &CDraw::ms_bFixRadar, nil);
#endif
#ifdef FIX_SPRITES
DebugMenuAddVarBool8("Draw", "Fix Sprites", &CDraw::ms_bFixSprites, nil);
#endif
#ifdef DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT
extern bool gDrawVersionText; extern bool gDrawVersionText;
DebugMenuAddVarBool8("Debug", "Version Text", &gDrawVersionText, nil); DebugMenuAddVarBool8("Debug", "Version Text", &gDrawVersionText, nil);
#endif
DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil);
#ifdef TIMEBARS
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil);
#endif #endif
#ifndef FINAL #ifndef FINAL
DebugMenuAddVarBool8("Debug", "Print Memory Usage", &gbPrintMemoryUsage, nil); DebugMenuAddVarBool8("Debug", "Print Memory Usage", &gbPrintMemoryUsage, nil);
@ -1020,28 +1012,23 @@ extern bool gbRenderWorld2;
#ifdef GTA_SCENE_EDIT #ifdef GTA_SCENE_EDIT
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil); DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
#endif #endif
#ifdef MAP_ENHANCEMENTS //DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint); //DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
#endif
DebugMenuAddCmd("Debug", "Switch car collision", SwitchCarCollision);
DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil);
DebugMenuAddCmd("Debug", "Set Engine Status", SetEngineStatus);
DebugMenuAddCmd("Debug", "Fix Car", FixCar);
DebugMenuAddCmd("Debug", "Toggle Comedy Controls", ToggleComedy);
DebugMenuAddCmd("Debug", "Place Car on Road", PlaceOnRoad);
DebugMenuAddVarBool8("Debug", "Script Heli On", &CHeli::ScriptHeliOn, nil);
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
#ifdef RELOADABLES #ifdef RELOADABLES
DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD); // maybe put it back if we have more to reload
// DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD);
#endif #endif
DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil);
#ifdef TIMEBARS #ifdef MAP_ENHANCEMENTS
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil); DebugMenuAddCmd("Game", "Teleport to map waypoint", TeleportToWaypoint);
#endif #endif
DebugMenuAddCmd("Game", "Fix Car", FixCar);
DebugMenuAddCmd("Game", "Place Car on Road", PlaceOnRoad);
DebugMenuAddCmd("Game", "Switch car collision", SwitchCarCollision);
DebugMenuAddCmd("Game", "Toggle Comedy Controls", ToggleComedy);
#ifdef MISSION_SWITCHER #ifdef MISSION_SWITCHER
DebugMenuEntry *missionEntry; DebugMenuEntry *missionEntry;
static const char* missions[] = { static const char* missions[] = {
@ -1065,9 +1052,9 @@ extern bool gbRenderWorld2;
"PIZZA BOY", "RC Raider Pickup", "RC Bandit Race", "RC Baron Race", "Checkpoint Charlie" "PIZZA BOY", "RC Raider Pickup", "RC Bandit Race", "RC Baron Race", "Checkpoint Charlie"
}; };
missionEntry = DebugMenuAddVar("Debug", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions); missionEntry = DebugMenuAddVar("Game", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions);
DebugMenuEntrySetWrap(missionEntry, true); DebugMenuEntrySetWrap(missionEntry, true);
DebugMenuAddCmd("Debug", "Start selected mission ", SwitchToMission); DebugMenuAddCmd("Game", "Start selected mission ", SwitchToMission);
#endif #endif
extern bool PrintDebugCode; extern bool PrintDebugCode;
extern int16 DebugCamMode; extern int16 DebugCamMode;

View File

@ -28,8 +28,8 @@
#include "VarConsole.h" #include "VarConsole.h"
#ifdef DEBUGMENU #ifdef DEBUGMENU
SETTWEAKPATH("Shadows"); //SETTWEAKPATH("Shadows");
TWEAKBOOL(gbPrintShite); //TWEAKBOOL(gbPrintShite);
#endif #endif
RwImVertexIndex ShadowIndexList[24]; RwImVertexIndex ShadowIndexList[24];