diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-04 13:58:12 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-04 13:58:12 +0200 |
commit | 20ffccbe2a4d021c5c40f32ac1af43ba470e302a (patch) | |
tree | 1ce414638dbbd09f2da139479dc67be793471eba /src | |
parent | fixed spawn bug (diff) | |
parent | fixed fog color for librw (diff) | |
download | re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.tar re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.tar.gz re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.tar.bz2 re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.tar.lz re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.tar.xz re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.tar.zst re3-20ffccbe2a4d021c5c40f32ac1af43ba470e302a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/fakerw/fake.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 9cee41c7..76d7865c 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -450,6 +450,7 @@ RwBool RwIm3DRenderPrimitive(RwPrimitiveType primType); RwBool RwRenderStateSet(RwRenderState state, void *value) { uint32 uival = (uintptr)value; + uint32 fog; switch(state){ case rwRENDERSTATETEXTURERASTER: SetRenderState(TEXTURERASTER, 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 rwRENDERSTATEBORDERCOLOR: 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 rwRENDERSTATEFOGDENSITY: return true; case rwRENDERSTATEFOGTABLE: return true; |