[saco] Implement/match CNewPlayerTags::RestoreDeviceObjects()

* Update CNewPlayerTags constructor
This commit is contained in:
RD42 2024-07-27 22:34:17 +08:00
parent bf5db25fea
commit efbb695cae
2 changed files with 13 additions and 2 deletions

View File

@ -4,8 +4,18 @@
CNewPlayerTags::CNewPlayerTags(IDirect3DDevice9* pDevice)
{
m_pDevice = pDevice;
field_4 = 0;
m_pStates = NULL;
m_pSprite = NULL;
D3DXCreateSprite(pDevice, &m_pSprite);
}
void CNewPlayerTags::RestoreDeviceObjects()
{
if(m_pSprite)
m_pSprite->OnResetDevice();
if(!m_pStates)
m_pDevice->CreateStateBlock(D3DSBT_ALL, &m_pStates);
}

View File

@ -5,10 +5,11 @@ class CNewPlayerTags
{
private:
IDirect3DDevice9* m_pDevice;
int field_4;
IDirect3DStateBlock9* m_pStates;
ID3DXSprite* m_pSprite;
public:
CNewPlayerTags(IDirect3DDevice9* pDevice);
void RestoreDeviceObjects();
};