Merge pull request #607 from rollschuh2282/master

Added toggles for the TimeBars and the "DebugStuffInRelease" to the Debug Menu
This commit is contained in:
aap 2020-06-01 10:44:45 +02:00 committed by GitHub
commit f69313237e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 2 deletions

View File

@ -186,7 +186,7 @@ enum Config {
# define NO_CDCHECK
# define CHATTYSPLASH // print what the game is loading
# define DEBUGMENU
//# define TIMEBARS // print debug timers
# define TIMEBARS // print debug timers
#endif
#define FIX_BUGS // fixes bugs that we've came across during reversing, TODO: use this more
@ -228,7 +228,7 @@ enum Config {
#define CUSTOM_FRONTEND_OPTIONS
// Script
#define USE_DEBUG_SCRIPT_LOADER // makes game load main_freeroam.scm by default
#define USE_DEBUG_SCRIPT_LOADER // Loads main.scm by default. Hold R for main_freeroam.scm and D for main_d.scm
#define USE_MEASUREMENTS_IN_METERS // makes game use meters instead of feet in script
#define USE_PRECISE_MEASUREMENT_CONVERTION // makes game convert feet to meeters more precisely
#define MISSION_REPLAY // mobile feature

View File

@ -73,6 +73,10 @@ float FramesPerSecond = 30.0f;
bool gbPrintShite = false;
bool gbModelViewer;
//Custom Timebars Toggle
#ifdef TIMEBARS
bool gbShowTimebars;
#endif
int32 frameCount;
@ -1096,8 +1100,12 @@ Idle(void *arg)
#endif
CCredits::Render();
#ifdef TIMEBARS
//Custom Timebars toggle
if (gbShowTimebars)
tbDisplay();
#endif
DoRWStuffEndOfFrame();

View File

@ -14,6 +14,10 @@ extern wchar gUString[256];
extern wchar gUString2[256];
extern bool gbPrintShite;
extern bool gbModelViewer;
//Custom Timebars Toggle
#ifdef TIMEBARS
extern bool gbShowTimebars;
#endif
class CSprite2d;

View File

@ -28,6 +28,8 @@
#include "debugmenu.h"
#include "Frontend.h"
#include "Text.h"
#include "WaterLevel.h"
#include "main.h"
#ifndef _WIN32
#include "assert.h"
@ -459,6 +461,7 @@ DebugMenuPopulate(void)
DebugMenuAddVarBool8("Render", "Don't render Peds", &gbDontRenderPeds, nil);
DebugMenuAddVarBool8("Render", "Don't render Vehicles", &gbDontRenderVehicles, nil);
DebugMenuAddVarBool8("Render", "Don't render Objects", &gbDontRenderObjects, nil);
DebugMenuAddVarBool8("Render", "Don´t Render Water", &gbDontRenderWater, nil);
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
#ifdef MENU_MAP
@ -488,6 +491,9 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil);
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil);
extern bool PrintDebugCode;
extern int16 DebugCamMode;
DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil);

View File

@ -35,6 +35,8 @@ bool CWaterLevel::WavesCalculatedThisFrame;
RpAtomic *CWaterLevel::ms_pWavyAtomic;
RpGeometry *CWaterLevel::apGeomArray[8];
int16 CWaterLevel::nGeomUsed;
//"Custom" Don´t Render Water Toggle
bool gbDontRenderWater;
//RwTexture *gpWaterTex;
//RwRaster *gpWaterRaster;
@ -332,6 +334,11 @@ SectorRadius(float fSize)
void
CWaterLevel::RenderWater()
{
//"Custom" Don´t Render Water Toggle
#ifndef MASTER
if (gbDontRenderWater)
return;
#endif
bool bUseCamEndX = false;
bool bUseCamStartY = false;

View File

@ -65,6 +65,8 @@
#define MAX_BOAT_WAKES 8
extern RwRaster* gpWaterRaster;
//"Custom" Don´t Render Water Toggle
extern bool gbDontRenderWater;
class CWaterLevel
{