summaryrefslogtreecommitdiffstats
path: root/src/re3.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-31 11:44:43 +0200
committeraap <aap@papnet.eu>2019-05-31 11:44:43 +0200
commit84204471a51f4bd0a4f89619d2dbdb5b59e21be7 (patch)
tree580a74d286d3392733aed0efbf41c9f132f066c8 /src/re3.cpp
parentCCredits name cleanup (diff)
downloadre3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.tar
re3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.tar.gz
re3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.tar.bz2
re3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.tar.lz
re3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.tar.xz
re3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.tar.zst
re3-84204471a51f4bd0a4f89619d2dbdb5b59e21be7.zip
Diffstat (limited to 'src/re3.cpp')
-rw-r--r--src/re3.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/re3.cpp b/src/re3.cpp
index 0d235cc0..08d02d12 100644
--- a/src/re3.cpp
+++ b/src/re3.cpp
@@ -4,6 +4,7 @@
#include "patcher.h"
#include "Renderer.h"
#include "Credits.h"
+#include "Camera.h"
#include "debugmenu_public.h"
void **rwengine = *(void***)0x5A10E1;
@@ -71,10 +72,30 @@ open_script(const char *path, const char *mode)
int gDbgSurf;
+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;
+ }
+
+}
+
int (*RsEventHandler_orig)(int a, int b);
int
delayedPatches10(int a, int b)
{
+ DebugMenuInit();
+
if(DebugMenuLoad()){
DebugMenuAddVarBool8("Debug", "Show Ped Road Groups", (int8*)&gbShowPedRoadGroups, nil);
DebugMenuAddVarBool8("Debug", "Show Car Road Groups", (int8*)&gbShowCarRoadGroups, nil);
@@ -85,6 +106,8 @@ delayedPatches10(int a, int b)
DebugMenuAddVarBool8("Debug", "Don't render Objects", (int8*)&gbDontRenderObjects, nil);
DebugMenuAddVar("Debug", "Dbg Surface", &gDbgSurf, nil, 1, 0, 34, nil);
+ DebugMenuAddVar("Debug", "blur type", &TheCamera.m_BlurType, nil, 1, 0, 10, nil);
+
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
}