Isolate MFC hooks from studio builds

This commit is contained in:
pizzaboxer 2022-01-28 13:21:32 +00:00
parent 1ccf69c1bd
commit b749d5d382
5 changed files with 10 additions and 9 deletions

View File

@ -1,7 +1,8 @@
#pragma once
#define MFC2010
#define ARBITERBUILD
#define MFC2011
#define PLAYERBUILD
// #define ARBITERBUILD
// when ARBITERBUILD is defined, the following changes occur:
// DataModel->getJobId is hooked

View File

@ -12,7 +12,7 @@ struct DataModel
};
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
// 2010 struct definitions:
// 0x47E010: CWorkspace->DoExecScript()
// 0x47EC10: CWorkspace->ExecUrlScript()

View File

@ -29,7 +29,7 @@ StandardOut__print_t StandardOut__print = (StandardOut__print_t)ADDRESS_STANDARD
Application__ParseArguments_t Application__ParseArguments = (Application__ParseArguments_t)ADDRESS_APPLICATION__PARSEARGUMENTS;
#endif
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
// CApp__CreateGame_t CApp__CreateGame = (CApp__CreateGame_t)ADDRESS_CAPP__CREATEGAME;
CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE;
CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam = (CRobloxCommandLineInfo__ParseParam_t)ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM;
@ -162,7 +162,7 @@ BOOL __fastcall Application__ParseArguments_hook(int _this, void*, int a2, const
#endif
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
/* INT __fastcall CApp__CreateGame_hook(CApp* _this, void*, int* a2, LPCWSTR a3)
{
printf("CApp::CreateGame called\n");

View File

@ -14,7 +14,7 @@ typedef void(__thiscall* StandardOut__print_t)(int _this, int type, std::string*
typedef BOOL(__thiscall* Application__ParseArguments_t)(int _this, int a2, const char* argv);
#endif
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
// typedef INT(__thiscall* CApp__CreateGame_t)(CApp* _this, int *a2, LPCWSTR a3);
typedef BOOL(__thiscall* CRobloxApp__InitInstance_t)(CRobloxApp* _this);
typedef void(__thiscall* CRobloxCommandLineInfo__ParseParam_t)(CRobloxCommandLineInfo* _this, const char* pszParam, BOOL bFlag, BOOL bLast);
@ -32,7 +32,7 @@ extern StandardOut__print_t StandardOut__print;
extern Application__ParseArguments_t Application__ParseArguments;
#endif
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
// extern CApp__CreateGame_t CApp__CreateGame;
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
@ -50,7 +50,7 @@ void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string*
BOOL __fastcall Application__ParseArguments_hook(int _this, void*, int a2, const char* argv);
#endif
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
// INT __fastcall CApp__CreateGame_hook(CApp* _this, void*, int *a2, LPCWSTR a3);
BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this);
void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast);

View File

@ -15,7 +15,7 @@ ADD_PATCH(StandardOut__print, StandardOut__print_hook)
ADD_PATCH(Application__ParseArguments, Application__ParseArguments_hook)
#endif
#endif
#if defined(MFC2010) || defined(MFC2011)
#if (defined(MFC2010) || defined(MFC2011)) && (defined(PLAYERBUILD) || defined(ARBITERBUILD))
// ADD_PATCH(CApp__CreateGame, CApp__CreateGame_hook)
ADD_PATCH(CRobloxApp__InitInstance, CRobloxApp__InitInstance_hook)
ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam_hook)