summaryrefslogtreecommitdiffstats
path: root/src/render/Clouds.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-06 12:27:21 +0200
committeraap <aap@papnet.eu>2019-07-06 12:27:21 +0200
commit2b592605ab043be56b5bbbf1ac06f223400dd2ef (patch)
tree8abe75af453b4726fd858643c92eb160ed113610 /src/render/Clouds.cpp
parentMerge pull request #113 from erorcun/erorcun (diff)
downloadre3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar
re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.gz
re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.bz2
re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.lz
re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.xz
re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.zst
re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.zip
Diffstat (limited to '')
-rw-r--r--src/render/Clouds.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp
index bf572841..d582bff8 100644
--- a/src/render/Clouds.cpp
+++ b/src/render/Clouds.cpp
@@ -41,6 +41,16 @@ CClouds::Init(void)
}
void
+CClouds::Shutdown(void)
+{
+ RwTextureDestroy(gpCloudTex[0]);
+ RwTextureDestroy(gpCloudTex[1]);
+ RwTextureDestroy(gpCloudTex[2]);
+ RwTextureDestroy(gpCloudTex[3]);
+ RwTextureDestroy(gpCloudTex[4]);
+}
+
+void
CClouds::Update(void)
{
float s = sin(TheCamera.Orientation - 0.85f);
@@ -48,7 +58,6 @@ CClouds::Update(void)
IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep() + 0.3f) * 60.0f;
}
-
void
CClouds::Render(void)
{
@@ -424,6 +433,7 @@ CClouds::RenderHorizon(void)
STARTPATCHES
InjectHook(0x4F6C10, CClouds::Init, PATCH_JUMP);
+ InjectHook(0x4F6CA0, CClouds::Shutdown, PATCH_JUMP);
InjectHook(0x4F6CE0, CClouds::Update, PATCH_JUMP);
InjectHook(0x4F6D90, CClouds::Render, PATCH_JUMP);
InjectHook(0x4F7F00, CClouds::RenderBackground, PATCH_JUMP);