[saco] Add CGame class

This commit is contained in:
RD42 2023-10-23 23:04:28 +08:00
parent f157a5f8f0
commit a80d3607f4
5 changed files with 92 additions and 12 deletions

24
saco/game/game.cpp Normal file
View File

@ -0,0 +1,24 @@
#include "../main.h"
int unnamed_10150340[210];
CGame::CGame()
{
// TODO: CGame::CGame()
m_pGameAudio = new CAudio();
m_pGameCamera = new CCamera();
field_8 = 0;
field_4D = 0;
field_29 = 0;
field_31 = 0;
field_61 = 0;
field_65 = 0;
field_69 = 0;
field_6D = 0;
memset(unnamed_10150340, 0, sizeof(unnamed_10150340));
memset(field_6E, 0, sizeof(field_6E));
field_55 = 0;
field_59 = 1;
field_5D = 90;
}

36
saco/game/game.h Normal file
View File

@ -0,0 +1,36 @@
#pragma once
#include "audio.h"
#include "camera.h"
//-----------------------------------------------------------
class CGame // size: 322
{
private:
CAudio *m_pGameAudio;
CCamera *m_pGameCamera;
int field_8;
char gapC[29];
int field_29;
char gap2D[4];
int field_31;
char gap35[24];
int field_4D;
char gap51[4];
int field_55;
int field_59;
int field_5D;
int field_61;
int field_65;
int field_69;
char field_6D;
char field_6E[212];
public:
CGame();
};
//-----------------------------------------------------------

View File

@ -4,6 +4,8 @@
GAME_SETTINGS tSettings;
HANDLE hInstance=0;
CGame *pGame=0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if(DLL_PROCESS_ATTACH==fdwReason)
@ -45,18 +47,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
AddFontResourceA("gtaweap3.ttf");
AddFontResourceA("sampaux3.ttf");
/*sub_10062CA0();
sub_10062970();
v9 = operator new(0x142u);
v13 = v9;
v16 = 1;
if ( v9 )
v10 = sub_1009FF80(v9);
else
v10 = 0;
dword_1026EBAC = v10;
_beginthread((int)sub_100C3A80, 0, 0);
*/
//sub_10062CA0();
//sub_10062970();
pGame = new CGame();
//_beginthread((int)sub_100C3A80, 0, 0);
}
}
else if(DLL_PROCESS_DETACH==fdwReason)

View File

@ -16,6 +16,8 @@ typedef struct _GAME_SETTINGS {
CHAR szDebugScript[MAX_SETTINGS_STRING+1];
} GAME_SETTINGS;
#include "game/game.h"
void SetStringFromCommandLine(char *szCmdLine, char *szString);
void SetStringFromQuotedCommandLine(char *szCmdLine, char *szString);
void InitSettings();

View File

@ -110,6 +110,28 @@
<References>
</References>
<Files>
<Filter
Name="game"
Filter="">
<File
RelativePath=".\game\audio.cpp">
</File>
<File
RelativePath=".\game\audio.h">
</File>
<File
RelativePath=".\game\camera.cpp">
</File>
<File
RelativePath=".\game\camera.h">
</File>
<File
RelativePath=".\game\game.cpp">
</File>
<File
RelativePath=".\game\game.h">
</File>
</Filter>
<File
RelativePath=".\exceptbox.rc">
</File>