mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 12:19:00 +00:00
fixed fog color for librw
This commit is contained in:
parent
ff4af35292
commit
f027c3afed
1 changed files with 9 additions and 1 deletions
|
@ -450,6 +450,7 @@ RwBool RwIm3DRenderPrimitive(RwPrimitiveType primType);
|
||||||
RwBool RwRenderStateSet(RwRenderState state, void *value)
|
RwBool RwRenderStateSet(RwRenderState state, void *value)
|
||||||
{
|
{
|
||||||
uint32 uival = (uintptr)value;
|
uint32 uival = (uintptr)value;
|
||||||
|
uint32 fog;
|
||||||
switch(state){
|
switch(state){
|
||||||
case rwRENDERSTATETEXTURERASTER: SetRenderState(TEXTURERASTER, uival); return true;
|
case rwRENDERSTATETEXTURERASTER: SetRenderState(TEXTURERASTER, uival); return true;
|
||||||
case rwRENDERSTATETEXTUREADDRESS: SetRenderState(TEXTUREADDRESS, uival); return true;
|
case rwRENDERSTATETEXTUREADDRESS: SetRenderState(TEXTUREADDRESS, uival); return true;
|
||||||
|
@ -465,7 +466,14 @@ RwBool RwRenderStateSet(RwRenderState state, void *value)
|
||||||
case rwRENDERSTATEVERTEXALPHAENABLE: SetRenderState(VERTEXALPHA, uival); return true;
|
case rwRENDERSTATEVERTEXALPHAENABLE: SetRenderState(VERTEXALPHA, uival); return true;
|
||||||
case rwRENDERSTATEBORDERCOLOR: return true;
|
case rwRENDERSTATEBORDERCOLOR: return true;
|
||||||
case rwRENDERSTATEFOGENABLE: SetRenderState(FOGENABLE, uival); return true;
|
case rwRENDERSTATEFOGENABLE: SetRenderState(FOGENABLE, uival); return true;
|
||||||
case rwRENDERSTATEFOGCOLOR: SetRenderState(FOGCOLOR, uival); return true;
|
case rwRENDERSTATEFOGCOLOR:
|
||||||
|
// have to swap R and B here
|
||||||
|
fog = (uival>>16)&0xFF;
|
||||||
|
fog |= (uival&0xFF)<<16;
|
||||||
|
fog |= uival&0xFF00;
|
||||||
|
fog |= uival&0xFF000000;
|
||||||
|
SetRenderState(FOGCOLOR, fog);
|
||||||
|
return true;
|
||||||
case rwRENDERSTATEFOGTYPE: return true;
|
case rwRENDERSTATEFOGTYPE: return true;
|
||||||
case rwRENDERSTATEFOGDENSITY: return true;
|
case rwRENDERSTATEFOGDENSITY: return true;
|
||||||
case rwRENDERSTATEFOGTABLE: return true;
|
case rwRENDERSTATEFOGTABLE: return true;
|
||||||
|
|
Loading…
Reference in a new issue