[saco] Implement CUnkClass14 constructor

* Implement `CUnkClass14::RestoreDeviceObjects()`
* Update `DoInitStuff()`
This commit is contained in:
RD42 2024-04-02 22:24:25 +08:00
parent aac4f57110
commit c01899123c
5 changed files with 41 additions and 1 deletions

View File

@ -22,9 +22,9 @@ CSpawnScreen *pSpawnScreen=0;
CNetGame *pNetGame=0;
//DWORD dword_1026EB98=0;
CFontRender *pDefaultFont=0;
//DWORD dword_1026EBA4=0;
//DWORD dword_1026EBA8=0;
CUnkClass13 *pUnkClass13=0;
CUnkClass14 *pUnkClass14=0;
BOOL bGameInited=FALSE;
@ -365,6 +365,7 @@ void DoInitStuff()
pUnkClass11 = new CUnkClass11();
pUnkClass12 = new CUnkClass12();
pUnkClass13 = new CUnkClass13(pD3DDevice);
pUnkClass14 = new CUnkClass14(pD3DDevice);
// TODO: DoInitStuff

View File

@ -75,6 +75,7 @@ typedef struct _GAME_SETTINGS {
#include "unkclass11.h"
#include "unkclass12.h"
#include "unkclass13.h"
#include "unkclass14.h"
void SetStringFromCommandLine(char *szCmdLine, char *szString);
void SetStringFromQuotedCommandLine(char *szCmdLine, char *szString);

View File

@ -579,6 +579,12 @@
<File
RelativePath=".\unkclass13.h">
</File>
<File
RelativePath=".\unkclass14.cpp">
</File>
<File
RelativePath=".\unkclass14.h">
</File>
<File
RelativePath=".\unkclass2.cpp">
</File>

17
saco/unkclass14.cpp Normal file
View File

@ -0,0 +1,17 @@
#include "main.h"
CUnkClass14::CUnkClass14(IDirect3DDevice9 *pD3DDevice)
{
m_pD3DDevice = pD3DDevice;
m_pD3DSprite1 = NULL;
m_pD3DSprite2 = NULL;
RestoreDeviceObjects();
}
void CUnkClass14::RestoreDeviceObjects()
{
D3DXCreateSprite(m_pD3DDevice, &m_pD3DSprite1);
D3DXCreateSprite(m_pD3DDevice, &m_pD3DSprite2);
}

15
saco/unkclass14.h Normal file
View File

@ -0,0 +1,15 @@
#pragma once
class CUnkClass14
{
private:
IDirect3DDevice9 *m_pD3DDevice;
ID3DXSprite *m_pD3DSprite1;
ID3DXSprite *m_pD3DSprite2;
public:
CUnkClass14(IDirect3DDevice9 *pD3DDevice);
void RestoreDeviceObjects();
};