[saco] Implement LaunchMonitor()

* Adds `CGame::StartGame()` stub
This commit is contained in:
RD42 2024-02-05 21:30:36 +08:00
parent 4daffd4d83
commit fc358a2996
3 changed files with 30 additions and 1 deletions

View File

@ -76,6 +76,13 @@ void CGame::InitGame()
//-----------------------------------------------------------
void CGame::StartGame()
{
// TODO: CGame::StartGame() .text:100A08E0
}
//-----------------------------------------------------------
void CGame::sub_100A0060()
{
// No indication for __thiscall, maybe not part of CGame

View File

@ -36,6 +36,7 @@ public:
HWND GetMainWindowHwnd() { return *(HWND *)ADDR_HWND; };
void StartGame();
void InitGame();
CGame();

View File

@ -34,6 +34,27 @@ CFileSystem *pFileSystem=NULL;
void TheGraphicsLoop();
LONG WINAPI exc_handler(_EXCEPTION_POINTERS* exc_inf);
void sub_1009DD50();
// polls the game until it's able to run.
void LaunchMonitor(PVOID v)
{
if(pGame)
pGame->InitGame();
while(1) {
if(*(PDWORD)ADDR_ENTRY == 7) {
sub_1009DD50();
pGame->StartGame();
break;
}
else {
Sleep(5);
}
}
ExitThread(0);
}
//----------------------------------------------------
@ -70,7 +91,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
pGame = new CGame();
//_beginthread((int)sub_100C3A80, 0, 0);
_beginthread(LaunchMonitor,0,NULL);
}
}
else if(DLL_PROCESS_DETACH==fdwReason)