mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-20 12:46:07 +08:00
[saco] Implement SetupD3DFog(...)
This commit is contained in:
@ -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)
|
void CallRwRenderStateSet(int state, int option)
|
||||||
{
|
{
|
||||||
_asm push option
|
_asm push option
|
||||||
|
Reference in New Issue
Block a user