diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/Clock.cpp | 13 | ||||
-rw-r--r-- | src/core/Game.cpp | 21 | ||||
-rw-r--r-- | src/core/Game.h | 5 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 17 | ||||
-rw-r--r-- | src/core/common.h | 4 | ||||
-rw-r--r-- | src/core/main.cpp | 14 | ||||
-rw-r--r-- | src/core/re3.cpp | 2 |
7 files changed, 72 insertions, 4 deletions
diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp index 6c54ac63..b391e508 100644 --- a/src/core/Clock.cpp +++ b/src/core/Clock.cpp @@ -4,6 +4,7 @@ #include "Pad.h" #include "Clock.h" #include "Stats.h" +#include "VarConsole.h" // --MIAMI: File done @@ -20,6 +21,10 @@ uint32 CClock::ms_nMillisecondsPerGameMinute; uint32 CClock::ms_nLastClockTick; bool CClock::ms_bClockHasBeenStored; +#ifndef MASTER +bool gbFreezeTime; +#endif + void CClock::Initialise(uint32 scale) { @@ -31,6 +36,10 @@ CClock::Initialise(uint32 scale) ms_nLastClockTick = CTimer::GetTimeInMilliseconds(); ms_bClockHasBeenStored = false; debug("CClock ready\n"); +#ifndef MASTER + VarConsole.Add("Time (hour of day)", &ms_nGameClockHours, 1, 0, 23, true); + VarConsole.Add("Freeze time", &gbFreezeTime, true); +#endif } void @@ -50,6 +59,10 @@ CClock::Update(void) } } +#ifndef MASTER + else if (gbFreezeTime) + ms_nLastClockTick = CTimer::GetTimeInMilliseconds(); +#endif else if(CTimer::GetTimeInMilliseconds() - ms_nLastClockTick > ms_nMillisecondsPerGameMinute || gbFastTime) { ms_nGameClockMinutes++; diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 348ac26d..8405c2ec 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -96,6 +96,7 @@ #include "postfx.h" #include "custompipes.h" #include "screendroplets.h" +#include "VarConsole.h" #ifdef USE_TEXTURE_POOL #include "TexturePools.h" #endif @@ -113,6 +114,10 @@ char CGame::aDatFile[32]; bool CGame::russianGame = false; bool CGame::japaneseGame = false; #endif +#ifndef MASTER +CVector CGame::PlayerCoords; +bool8 CGame::VarUpdatePlayerCoords; +#endif int gameTxdSlot; @@ -557,6 +562,16 @@ bool CGame::Initialise(const char* datFile) #ifdef USE_TEXTURE_POOL _TexturePoolsUnknown(true); #endif + +#ifndef MASTER + PlayerCoords = FindPlayerCoors(); + VarConsole.Add("X PLAYER COORD", &PlayerCoords.x, 10.0f, -10000.0f, 10000.0f, true); + VarConsole.Add("Y PLAYER COORD", &PlayerCoords.y, 10.0f, -10000.0f, 10000.0f, true); + VarConsole.Add("Z PLAYER COORD", &PlayerCoords.z, 10.0f, -10000.0f, 10000.0f, true); + VarConsole.Add("UPDATE PLAYER COORD", &VarUpdatePlayerCoords, true); +#endif + + DMAudio.SetStartingTrackPositions(true); DMAudio.ChangeMusicMode(MUSICMODE_GAME); return true; @@ -837,6 +852,12 @@ void CGame::Process(void) CWindModifiers::Number = 0; if (!CTimer::GetIsPaused()) { +#ifndef MASTER + if (VarUpdatePlayerCoords) { + FindPlayerPed()->Teleport(PlayerCoords); + VarUpdatePlayerCoords = false; + } +#endif CSprite2d::SetRecipNearClip(); CSprite2d::InitPerFrame(); CFont::InitPerFrame(); diff --git a/src/core/Game.h b/src/core/Game.h index ee9ca943..4052eb00 100644 --- a/src/core/Game.h +++ b/src/core/Game.h @@ -48,6 +48,11 @@ public: static bool playingIntro; static char aDatFile[32]; +#ifndef MASTER + static CVector PlayerCoords; + static bool8 VarUpdatePlayerCoords; +#endif + static bool InitialiseOnceBeforeRW(void); static bool InitialiseRenderWare(void); static void ShutdownRenderWare(void); diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 2fd8bf1c..77789aaf 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -36,6 +36,7 @@ #include "MemoryHeap.h" #include "Font.h" #include "Frontend.h" +#include "VarConsole.h" //--MIAMI: file done (possibly bugs) @@ -82,6 +83,12 @@ CEntity *pIslandLODbeachEntity; int32 islandLODmainland; int32 islandLODbeach; +#ifndef MASTER +bool gbPrintStats; +bool gbPrintVehiclesInMemory; // TODO +bool gbPrintStreamingBuffer; // TODO +#endif + bool CStreamingInfo::GetCdPosnAndSize(uint32 &posn, uint32 &size) { @@ -237,8 +244,14 @@ CStreaming::Init2(void) pIslandLODbeachEntity = nil; islandLODmainland = -1; islandLODbeach = -1; - CModelInfo::GetModelInfo("IslandLODmainland", &islandLODmainland); - CModelInfo::GetModelInfo("IslandLODbeach", &islandLODbeach); + CModelInfo::GetModelInfo("IslandLODmainland", &islandLODmainland); + CModelInfo::GetModelInfo("IslandLODbeach", &islandLODbeach); + +#ifndef MASTER + VarConsole.Add("Streaming Debug", &gbPrintStats, true); + VarConsole.Add("Streaming Vehicle Debug", &gbPrintVehiclesInMemory, true); + VarConsole.Add("Printf Streaming Buffer contents", &gbPrintStreamingBuffer, true); +#endif } void diff --git a/src/core/common.h b/src/core/common.h index 155b5dba..3fb2e963 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -79,6 +79,10 @@ typedef int64_t int64; // hardcode ucs-2 typedef uint16_t wchar; +typedef uint8 bool8; +typedef uint16 bool16; +typedef uint32 bool32; + #if defined(_MSC_VER) typedef ptrdiff_t ssize_t; #endif diff --git a/src/core/main.cpp b/src/core/main.cpp index 85e04540..9e48aaf4 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -72,6 +72,7 @@ #include "postfx.h" #include "custompipes.h" #include "screendroplets.h" +#include "VarConsole.h" GlobalScene Scene; @@ -133,6 +134,9 @@ bool gbNewRenderer; #define CLEARMODE (rwCAMERACLEARZ) #endif +bool bDisplayNumPfAtomicsRendered = false; +bool bDisplayPosn = false; + void ValidateVersion() { @@ -473,6 +477,11 @@ Initialise3D(void *param) { PUSH_MEMID(MEMID_RENDER); +#ifndef MASTER + VarConsole.Add("Display number of atomics rendered", &bDisplayNumPfAtomicsRendered, true); + VarConsole.Add("Display posn and framerate", &bDisplayPosn, true); +#endif + if (RsRwInitialize(param)) { POP_MEMID(); @@ -1008,7 +1017,6 @@ return; void DisplayGameDebugText() { - static bool bDisplayPosn = false; static bool bDisplayCheatStr = false; // custom #ifndef FINAL @@ -1382,6 +1390,10 @@ RenderMenus(void) { FrontEndMenuManager.DrawFrontEnd(); } +#ifndef MASTER + else + VarConsole.Check(); +#endif } void diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 5e3d8922..5523e13c 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -647,7 +647,7 @@ extern bool gbRenderWorld2; #endif DebugMenuAddVar("Render", "Drunkness", &CMBlur::Drunkness, nil, 0.05f, 0, 1.0f); #ifndef MASTER - DebugMenuAddVarBool8("Render", "Occlusion debug", &bDisplayOccDebugStuff, nil); + DebugMenuAddVarBool8("Render", "Occlusion debug", &bDispayOccDebugStuff, nil); #endif #ifdef EXTENDED_PIPELINES static const char *vehpipenames[] = { "MatFX", "Neo" }; |