mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 20:26:14 +08:00
[saco] Implement CUnkClass2 constructor
* Implement `CUnkClass2::sub_1006E930()`
This commit is contained in:
@ -33,6 +33,7 @@ IDirect3DDevice9 *pD3DDevice = NULL;
|
|||||||
|
|
||||||
HANDLE hInstance=0;
|
HANDLE hInstance=0;
|
||||||
CUnkClass1 *pUnkClass1=NULL;
|
CUnkClass1 *pUnkClass1=NULL;
|
||||||
|
CUnkClass2 *pUnkClass2=NULL;
|
||||||
|
|
||||||
bool bShowDebugLabels = false;
|
bool bShowDebugLabels = false;
|
||||||
|
|
||||||
@ -338,6 +339,7 @@ void DoInitStuff()
|
|||||||
pDeathWindow = new CDeathWindow(pD3DDevice);
|
pDeathWindow = new CDeathWindow(pD3DDevice);
|
||||||
pSpawnScreen = new CSpawnScreen(pD3DDevice);
|
pSpawnScreen = new CSpawnScreen(pD3DDevice);
|
||||||
pUnkClass1 = new CUnkClass1(pD3DDevice);
|
pUnkClass1 = new CUnkClass1(pD3DDevice);
|
||||||
|
pUnkClass2 = new CUnkClass2(pD3DDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ typedef struct _GAME_SETTINGS {
|
|||||||
#include "archive/ArchiveFS.h"
|
#include "archive/ArchiveFS.h"
|
||||||
|
|
||||||
#include "unkclass1.h"
|
#include "unkclass1.h"
|
||||||
|
#include "unkclass2.h"
|
||||||
void SetStringFromCommandLine(char *szCmdLine, char *szString);
|
void SetStringFromCommandLine(char *szCmdLine, char *szString);
|
||||||
void SetStringFromQuotedCommandLine(char *szCmdLine, char *szString);
|
void SetStringFromQuotedCommandLine(char *szCmdLine, char *szString);
|
||||||
void InitSettings();
|
void InitSettings();
|
||||||
|
@ -555,6 +555,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\unkclass1.h">
|
RelativePath=".\unkclass1.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\unkclass2.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\unkclass2.h">
|
||||||
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\audiostream.cpp">
|
RelativePath=".\audiostream.cpp">
|
||||||
|
45
saco/unkclass2.cpp
Normal file
45
saco/unkclass2.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
extern CGame* pGame;
|
||||||
|
|
||||||
|
CUnkClass2::CUnkClass2(IDirect3DDevice9 *pD3DDevice)
|
||||||
|
{
|
||||||
|
m_pD3DDevice = pD3DDevice;
|
||||||
|
field_34 = 0;
|
||||||
|
field_38 = 0;
|
||||||
|
field_3C = 0;
|
||||||
|
field_40 = 0;
|
||||||
|
field_4 = 0;
|
||||||
|
|
||||||
|
if(pGame && pGame->GetScreenWidth() > 800)
|
||||||
|
{
|
||||||
|
field_14 = 800.0f;
|
||||||
|
field_18 = 600.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
field_14 = 640.0f;
|
||||||
|
field_18 = 480.0f;
|
||||||
|
}
|
||||||
|
field_1C = 60.0f;
|
||||||
|
field_20 = 0;
|
||||||
|
field_24 = 0.085f;
|
||||||
|
field_28 = 0.265625f;
|
||||||
|
field_2C = 0.437500f;
|
||||||
|
|
||||||
|
sub_1006E930();
|
||||||
|
|
||||||
|
field_0 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CUnkClass2::sub_1006E930()
|
||||||
|
{
|
||||||
|
RECT rect;
|
||||||
|
|
||||||
|
GetClientRect(pGame->GetMainWindowHwnd(),&rect);
|
||||||
|
|
||||||
|
field_10 = 1.0f;
|
||||||
|
field_8 = rect.right * 0.5f - field_14 * 0.5f;
|
||||||
|
field_C = rect.bottom * 0.5f - field_18 * 0.5f;
|
||||||
|
}
|
29
saco/unkclass2.h
Normal file
29
saco/unkclass2.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CUnkClass2
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
int field_0;
|
||||||
|
int field_4;
|
||||||
|
float field_8;
|
||||||
|
float field_C;
|
||||||
|
float field_10;
|
||||||
|
float field_14;
|
||||||
|
float field_18;
|
||||||
|
float field_1C;
|
||||||
|
int field_20;
|
||||||
|
float field_24;
|
||||||
|
float field_28;
|
||||||
|
float field_2C;
|
||||||
|
IDirect3DDevice9 *m_pD3DDevice;
|
||||||
|
int field_34;
|
||||||
|
int field_38;
|
||||||
|
int field_3C;
|
||||||
|
int field_40;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CUnkClass2(IDirect3DDevice9 *pD3DDevice);
|
||||||
|
|
||||||
|
void sub_1006E930();
|
||||||
|
};
|
Reference in New Issue
Block a user