summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-10-12 12:28:06 +0200
committerRoman Masanin <36927roma@gmail.com>2020-10-12 12:28:06 +0200
commite6a1ea9d4ff72f31e1726a344b3810b4c3e8d747 (patch)
tree8eec245a7f58ed3a6a991a03426c0f8af48e8aa6 /src
parentfinal step (diff)
downloadre3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.tar
re3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.tar.gz
re3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.tar.bz2
re3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.tar.lz
re3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.tar.xz
re3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.tar.zst
re3-e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747.zip
Diffstat (limited to 'src')
-rw-r--r--src/render/SpecialFX.cpp30
-rw-r--r--src/render/SpecialFX.h3
2 files changed, 30 insertions, 3 deletions
diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp
index dcf795f5..8403e173 100644
--- a/src/render/SpecialFX.cpp
+++ b/src/render/SpecialFX.cpp
@@ -988,6 +988,9 @@ CBrightLights::Render(void)
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
+ TempBufferVerticesStored = 0;
+ TempBufferIndicesStored = 0;
+
for(i = 0; i < NumBrightLights; i++){
if(TempBufferIndicesStored > TEMPBUFFERINDEXSIZE-40 || TempBufferVerticesStored > TEMPBUFFERVERTSIZE-40)
RenderOutGeometryBuffer();
@@ -1024,6 +1027,13 @@ CBrightLights::Render(void)
g = aBrightLights[i].m_green;
b = aBrightLights[i].m_blue;
break;
+ default:
+#ifdef FIX_BUGS //just to make sure that color never will be undefined
+ r = 0;
+ g = 0;
+ b = 0;
+#endif
+ break;
}
if(aBrightLights[i].m_camDist < BRIGHTLIGHTS_FADE_DIST)
@@ -1087,6 +1097,22 @@ CBrightLights::Render(void)
TempBufferIndicesStored += 12*3;
break;
+ case BRIGHTLIGHT_FRONT_BIG:
+ case BRIGHTLIGHT_REAR_BIG:
+ for (j = 0; j < 8; j++) {
+ pos = BigCarHeadLightsSide[j] * aBrightLights[i].m_side +
+ BigCarHeadLightsUp[j] * aBrightLights[i].m_up +
+ BigCarHeadLightsFront[j] * aBrightLights[i].m_front +
+ aBrightLights[i].m_pos;
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + j], r, g, b, a);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + j], pos.x, pos.y, pos.z);
+ }
+ for (j = 0; j < 12 * 3; j++)
+ TempBufferRenderIndexList[TempBufferIndicesStored + j] = CubeIndices[j] + TempBufferVerticesStored;
+ TempBufferVerticesStored += 8;
+ TempBufferIndicesStored += 12 * 3;
+ break;
+
case BRIGHTLIGHT_FRONT_TALL:
case BRIGHTLIGHT_REAR_TALL:
for(j = 0; j < 8; j++){
@@ -1105,8 +1131,8 @@ CBrightLights::Render(void)
case BRIGHTLIGHT_SIREN:
for(j = 0; j < 6; j++){
- pos = SirenLightsSide[j]*aBrightLights[i].m_side +
- SirenLightsUp[j]*aBrightLights[i].m_up +
+ pos = SirenLightsSide[j]*TheCamera.GetRight() +
+ SirenLightsUp[j]* TheCamera.GetUp() +
aBrightLights[i].m_pos;
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored+j], r, g, b, a);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored+j], pos.x, pos.y, pos.z);
diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h
index 897d8b92..bf3197dc 100644
--- a/src/render/SpecialFX.h
+++ b/src/render/SpecialFX.h
@@ -165,6 +165,7 @@ public:
uint8 m_blue;
};
+//done
class CBrightLights
{
static int NumBrightLights;
@@ -173,7 +174,7 @@ public:
static void Init(void); //done
static void RegisterOne(CVector pos, CVector up, CVector side, CVector front,
uint8 type, uint8 red = 0, uint8 green = 0, uint8 blue = 0); //done
- static void Render(void); //looks similad but needs recheck !!!!!!!!!!!!!!!!!
+ static void Render(void); //done
static void RenderOutGeometryBuffer(void); //done
};