summaryrefslogtreecommitdiffstats
path: root/src/render/Clouds.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-02-18 12:21:52 +0100
committeraap <aap@papnet.eu>2021-02-18 12:21:52 +0100
commit996772faf2b7ed17269af194c6d9dcbdb37732fe (patch)
treecfb4d76317a169f665bf1f500e36d4aa2c0e54ec /src/render/Clouds.cpp
parentMerge branch 'miami' of github.com:GTAmodding/re3 into miami (diff)
downloadre3-996772faf2b7ed17269af194c6d9dcbdb37732fe.tar
re3-996772faf2b7ed17269af194c6d9dcbdb37732fe.tar.gz
re3-996772faf2b7ed17269af194c6d9dcbdb37732fe.tar.bz2
re3-996772faf2b7ed17269af194c6d9dcbdb37732fe.tar.lz
re3-996772faf2b7ed17269af194c6d9dcbdb37732fe.tar.xz
re3-996772faf2b7ed17269af194c6d9dcbdb37732fe.tar.zst
re3-996772faf2b7ed17269af194c6d9dcbdb37732fe.zip
Diffstat (limited to 'src/render/Clouds.cpp')
-rw-r--r--src/render/Clouds.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp
index e3a8c86e..9cd32c5f 100644
--- a/src/render/Clouds.cpp
+++ b/src/render/Clouds.cpp
@@ -1,5 +1,6 @@
#include "common.h"
+#include "main.h"
#include "Sprite.h"
#include "Sprite2d.h"
#include "General.h"
@@ -119,6 +120,8 @@ CClouds::Render(void)
if(!CGame::CanSeeOutSideFromCurrArea())
return;
+ PUSH_RENDERGROUP("CClouds::Render");
+
CCoronas::SunBlockedByClouds = false;
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
@@ -301,6 +304,8 @@ CClouds::Render(void)
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
+
+ POP_RENDERGROUP();
}
bool
@@ -313,6 +318,8 @@ void
CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
int16 botred, int16 botgreen, int16 botblue, int16 alpha)
{
+ PUSH_RENDERGROUP("CClouds::RenderBackground");
+
CVector right = CrossProduct(TheCamera.GetUp(), TheCamera.GetForward());
right.Normalise();
float c = right.Magnitude2D();
@@ -415,6 +422,8 @@ CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
ms_colourBottom.g = fogg;
ms_colourBottom.b = fogb;
}
+
+ POP_RENDERGROUP();
}
void
@@ -423,6 +432,8 @@ CClouds::RenderHorizon(void)
if(UseDarkBackground())
return;
+ PUSH_RENDERGROUP("CClouds::RenderHorizon");
+
ms_colourBottom.a = 230;
ms_colourTop.a = 80;
@@ -457,4 +468,6 @@ CClouds::RenderHorizon(void)
CSprite2d::DrawAnyRect(0.0f, topleft, SCREEN_WIDTH, topright, 0.0f, botleft, SCREEN_WIDTH, botright,
ms_colourBkGrd, ms_colourBkGrd, ms_colourBkGrd, ms_colourBkGrd);
+
+ POP_RENDERGROUP();
}