mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement SetupD3DFog(...)
This commit is contained in:
parent
1f9d252063
commit
c486b3b26e
@ -198,6 +198,29 @@ void SetupDirectories()
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
DWORD dwFogEnabled = 0;
|
||||
DWORD dwFogColor = 0x00FF00FF;
|
||||
BOOL gDisableAllFog = FALSE;
|
||||
|
||||
void SetupD3DFog(BOOL bEnable)
|
||||
{
|
||||
float fFogStart = 500.0f;
|
||||
float fFogEnd = 700.0f;
|
||||
|
||||
if(gDisableAllFog) bEnable = FALSE;
|
||||
|
||||
if(pD3DDevice) {
|
||||
pD3DDevice->SetRenderState(D3DRS_FOGENABLE, bEnable);
|
||||
//pD3DDevice->SetRenderState(D3DRS_FOGCOLOR, dwFogColor);
|
||||
pD3DDevice->SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_NONE);
|
||||
pD3DDevice->SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);
|
||||
//pD3DDevice->SetRenderState(D3DRS_FOGSTART, *(DWORD*)(&fFogStart));
|
||||
//pD3DDevice->SetRenderState(D3DRS_FOGEND, *(DWORD*)(&fFogEnd));
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CallRwRenderStateSet(int state, int option)
|
||||
{
|
||||
_asm push option
|
||||
|
Loading…
Reference in New Issue
Block a user