summaryrefslogtreecommitdiffstats
path: root/src/extras
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-24 09:41:18 +0100
committeraap <aap@papnet.eu>2020-12-24 09:41:18 +0100
commit450cd17d16a81930ce69f7b3cec097341f00cec4 (patch)
treebc5eb2a4aeb419614959e7e4cb6be8251ae8db38 /src/extras
parentMerge branch 'miami' of github.com:GTAmodding/re3 into miami (diff)
downloadre3-450cd17d16a81930ce69f7b3cec097341f00cec4.tar
re3-450cd17d16a81930ce69f7b3cec097341f00cec4.tar.gz
re3-450cd17d16a81930ce69f7b3cec097341f00cec4.tar.bz2
re3-450cd17d16a81930ce69f7b3cec097341f00cec4.tar.lz
re3-450cd17d16a81930ce69f7b3cec097341f00cec4.tar.xz
re3-450cd17d16a81930ce69f7b3cec097341f00cec4.tar.zst
re3-450cd17d16a81930ce69f7b3cec097341f00cec4.zip
Diffstat (limited to 'src/extras')
-rw-r--r--src/extras/screendroplets.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/extras/screendroplets.cpp b/src/extras/screendroplets.cpp
index 3f91a754..54866bea 100644
--- a/src/extras/screendroplets.cpp
+++ b/src/extras/screendroplets.cpp
@@ -79,8 +79,10 @@ ScreenDroplets::Initialise(void)
void
ScreenDroplets::InitDraw(void)
{
- if(CustomPipes::neoTxd)
- ms_maskTex = CustomPipes::neoTxd->find("dropmask");
+ if(CustomPipes::neoTxd == nil)
+ return;
+
+ ms_maskTex = CustomPipes::neoTxd->find("dropmask");
ms_screenTex = RwTextureCreate(nil);
RwTextureSetFilterMode(ms_screenTex, rwFILTERLINEAR);
@@ -136,6 +138,10 @@ ScreenDroplets::Shutdown(void)
void
ScreenDroplets::Process(void)
{
+ // no need to do anything if we can't render
+ if(CustomPipes::neoTxd == nil)
+ return;
+
ProcessCameraMovement();
SprayDrops();
ProcessMoving();
@@ -173,6 +179,9 @@ ScreenDroplets::Render(void)
{
ScreenDrop *drop;
+ if(CustomPipes::neoTxd == nil)
+ return;
+
DefinedState();
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(ms_maskTex));
RwRenderStateSet(rwRENDERSTATEFOGENABLE, FALSE);