From c01899123c3f4c3840ee5504103861d8ee777072 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Tue, 2 Apr 2024 22:24:25 +0800 Subject: [PATCH] [saco] Implement CUnkClass14 constructor * Implement `CUnkClass14::RestoreDeviceObjects()` * Update `DoInitStuff()` --- saco/main.cpp | 3 ++- saco/main.h | 1 + saco/saco.vcproj | 6 ++++++ saco/unkclass14.cpp | 17 +++++++++++++++++ saco/unkclass14.h | 15 +++++++++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 saco/unkclass14.cpp create mode 100644 saco/unkclass14.h diff --git a/saco/main.cpp b/saco/main.cpp index d5ae2ef..208a089 100644 --- a/saco/main.cpp +++ b/saco/main.cpp @@ -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 diff --git a/saco/main.h b/saco/main.h index 071bde3..d2667e5 100644 --- a/saco/main.h +++ b/saco/main.h @@ -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); diff --git a/saco/saco.vcproj b/saco/saco.vcproj index ecd19d6..210cf31 100644 --- a/saco/saco.vcproj +++ b/saco/saco.vcproj @@ -579,6 +579,12 @@ + + + + diff --git a/saco/unkclass14.cpp b/saco/unkclass14.cpp new file mode 100644 index 0000000..4ff02e7 --- /dev/null +++ b/saco/unkclass14.cpp @@ -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); +} \ No newline at end of file diff --git a/saco/unkclass14.h b/saco/unkclass14.h new file mode 100644 index 0000000..5adec7d --- /dev/null +++ b/saco/unkclass14.h @@ -0,0 +1,15 @@ + +#pragma once + +class CUnkClass14 +{ +private: + IDirect3DDevice9 *m_pD3DDevice; + ID3DXSprite *m_pD3DSprite1; + ID3DXSprite *m_pD3DSprite2; + +public: + CUnkClass14(IDirect3DDevice9 *pD3DDevice); + + void RestoreDeviceObjects(); +};