summaryrefslogtreecommitdiffstats
path: root/src/core/re3.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-25 11:25:40 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-25 11:25:40 +0200
commit2be2899034a5eb0001b3fb89ea29c7c5480f1fbc (patch)
tree7b1586badbaea9a7d455efc6648e6ecada82f47e /src/core/re3.cpp
parentlibrw update (diff)
parentMerge pull request #490 from aap/debugmenu (diff)
downloadre3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.tar
re3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.tar.gz
re3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.tar.bz2
re3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.tar.lz
re3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.tar.xz
re3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.tar.zst
re3-2be2899034a5eb0001b3fb89ea29c7c5480f1fbc.zip
Diffstat (limited to 'src/core/re3.cpp')
-rw-r--r--src/core/re3.cpp40
1 files changed, 4 insertions, 36 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 4cec5773..d4d2c208 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -17,7 +17,6 @@
#include "Heli.h"
#include "Automobile.h"
#include "Ped.h"
-#include "debugmenu_public.h"
#include "Particle.h"
#include "Console.h"
#include "Debug.h"
@@ -26,6 +25,7 @@
#include "Pad.h"
#include "PlayerPed.h"
#include "Radar.h"
+#include "debugmenu.h"
#include <list>
@@ -33,8 +33,6 @@
extern "C" int vsprintf(char* const _Buffer, char const* const _Format, va_list _ArgList);
#endif
-DebugMenuAPI gDebugMenuAPI;
-
#ifdef USE_PS2_RAND
unsigned __int64 myrand_seed = 1;
@@ -62,24 +60,6 @@ mysrand(unsigned int seed)
myrand_seed = seed;
}
-void (*DebugMenuProcess)(void);
-void (*DebugMenuRender)(void);
-static void stub(void) { }
-
-void
-DebugMenuInit(void)
-{
- if(DebugMenuLoad()){
- DebugMenuProcess = (void(*)(void))GetProcAddress(gDebugMenuAPI.module, "DebugMenuProcess");
- DebugMenuRender = (void(*)(void))GetProcAddress(gDebugMenuAPI.module, "DebugMenuRender");
- }
- if(DebugMenuProcess == nil || DebugMenuRender == nil){
- DebugMenuProcess = stub;
- DebugMenuRender = stub;
- }
-
-}
-
void WeaponCheat();
void HealthCheat();
void TankCheat();
@@ -269,7 +249,7 @@ TWEAKSWITCH(CWeather::NewWeatherType, 0, 3, wt, NULL);
void
DebugMenuPopulate(void)
{
- if(DebugMenuLoad()){
+ if(1){
static const char *weathers[] = {
"Sunny", "Cloudy", "Rainy", "Foggy"
};
@@ -284,7 +264,7 @@ DebugMenuPopulate(void)
e = DebugMenuAddVar("Time & Weather", "New Weather", (int16*)&CWeather::NewWeatherType, nil, 1, 0, 3, weathers);
DebugMenuEntrySetWrap(e, true);
DebugMenuAddVar("Time & Weather", "Wind", (float*)&CWeather::Wind, nil, 0.1f, 0.0f, 1.0f);
- DebugMenuAddVar("Time & Weather", "Time scale", (float*)0x8F2C20, nil, 0.1f, 0.0f, 10.0f);
+ DebugMenuAddVar("Time & Weather", "Time scale", (float*)&CTimer::GetTimeScale(), nil, 0.1f, 0.0f, 10.0f);
DebugMenuAddCmd("Cheats", "Weapons", WeaponCheat);
DebugMenuAddCmd("Cheats", "Money", MoneyCheat);
@@ -357,7 +337,7 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Catalina Fly By", CHeli::StartCatalinaFlyBy);
DebugMenuAddCmd("Debug", "Catalina Take Off", CHeli::CatalinaTakeOff);
DebugMenuAddCmd("Debug", "Catalina Fly Away", CHeli::MakeCatalinaHeliFlyAway);
- DebugMenuAddVarBool8("Debug", "Script Heli On", (int8*)0x95CD43, nil);
+ DebugMenuAddVarBool8("Debug", "Script Heli On", (int8*)&CHeli::ScriptHeliOn, nil);
DebugMenuAddVarBool8("Debug", "Show Ped Paths", (int8*)&gbShowPedPaths, nil);
DebugMenuAddVarBool8("Debug", "Show Car Paths", (int8*)&gbShowCarPaths, nil);
@@ -397,18 +377,6 @@ DebugMenuPopulate(void)
}
}
-/*
-int (*RsEventHandler_orig)(int a, int b);
-int
-delayedPatches10(int a, int b)
-{
- DebugMenuInit();
- DebugMenuPopulate();
-
- return RsEventHandler_orig(a, b);
-}
-*/
-
const int re3_buffsize = 1024;
static char re3_buff[re3_buffsize];