[saco] Implement SetupD3DFog(...)

This commit is contained in:
RD42 2024-02-19 21:16:42 +08:00
parent 1f9d252063
commit c486b3b26e

View File

@ -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