mirror of
https://github.com/halpz/re3.git
synced 2025-05-13 05:16:39 +03:00
more high level functions
This commit is contained in:
parent
f50cf32b87
commit
84204471a5
28 changed files with 415 additions and 24 deletions
23
src/re3.cpp
23
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue