summaryrefslogtreecommitdiffstats
path: root/src/render/Clouds.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 684f5d74..957844a5 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"
@@ -123,6 +124,8 @@ CClouds::Render(void)
RwV3d screenpos;
RwV3d worldpos;
+ PUSH_RENDERGROUP("CClouds::Render");
+
CCoronas::SunBlockedByClouds = false;
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
@@ -310,6 +313,8 @@ CClouds::Render(void)
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
+
+ POP_RENDERGROUP();
}
bool
@@ -322,6 +327,8 @@ void
CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
int16 botred, int16 botgreen, int16 botblue, int16 alpha)
{
+ PUSH_RENDERGROUP("CClouds::RenderBackground");
+
CVector left = TheCamera.GetRight();
float c = left.Magnitude2D();
if(c > 1.0f)
@@ -422,6 +429,8 @@ CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
ms_colourBottom.g = (topgreen + 2 * botgreen) / 3;
ms_colourBottom.b = (topblue + 2 * botblue) / 3;
}
+
+ POP_RENDERGROUP();
}
void
@@ -436,6 +445,8 @@ CClouds::RenderHorizon(void)
if(ms_horizonZ > SCREEN_HEIGHT)
return;
+ PUSH_RENDERGROUP("CClouds::RenderHorizon");
+
float z1 = Min(ms_horizonZ + SMALLSTRIPHEIGHT, SCREEN_HEIGHT);
CSprite2d::DrawRectXLU(CRect(0, ms_horizonZ, SCREEN_WIDTH, z1),
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
@@ -450,4 +461,6 @@ CClouds::RenderHorizon(void)
z2 = Min(z2, SCREEN_HEIGHT);
CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2),
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
+
+ POP_RENDERGROUP();
}