mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[saco] Implement/match CNewPlayerTags::Begin()
This commit is contained in:
parent
a79dde901d
commit
af70f9d32c
@ -16,6 +16,31 @@ CNewPlayerTags::~CNewPlayerTags()
|
|||||||
SAFE_DELETE(m_pSprite);
|
SAFE_DELETE(m_pSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CNewPlayerTags::Begin()
|
||||||
|
{
|
||||||
|
if (!m_pStates) {
|
||||||
|
RestoreDeviceObjects();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_pStates)
|
||||||
|
m_pStates->Capture();
|
||||||
|
|
||||||
|
if(m_pSprite)
|
||||||
|
m_pSprite->Begin(D3DXSPRITE_DONOTSAVESTATE);
|
||||||
|
|
||||||
|
m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
|
||||||
|
m_pDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||||
|
m_pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||||
|
m_pDevice->SetRenderState(D3DRS_ALPHATESTENABLE, 0);
|
||||||
|
m_pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
|
||||||
|
m_pDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
|
||||||
|
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||||
|
m_pDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE);
|
||||||
|
m_pDevice->SetVertexShader(NULL);
|
||||||
|
m_pDevice->SetPixelShader(NULL);
|
||||||
|
m_pDevice->SetRenderState(D3DRS_ZENABLE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void CNewPlayerTags::DeleteDeviceObjects()
|
void CNewPlayerTags::DeleteDeviceObjects()
|
||||||
{
|
{
|
||||||
SAFE_RELEASE(m_pStates);
|
SAFE_RELEASE(m_pStates);
|
||||||
|
@ -12,6 +12,7 @@ public:
|
|||||||
CNewPlayerTags(IDirect3DDevice9* pDevice);
|
CNewPlayerTags(IDirect3DDevice9* pDevice);
|
||||||
~CNewPlayerTags();
|
~CNewPlayerTags();
|
||||||
|
|
||||||
|
void Begin();
|
||||||
void DeleteDeviceObjects();
|
void DeleteDeviceObjects();
|
||||||
void RestoreDeviceObjects();
|
void RestoreDeviceObjects();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user