1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 10:35:54 +00:00

make screen droplets not crash without neo.txd

This commit is contained in:
aap 2020-12-24 09:41:18 +01:00
parent aefaa17a84
commit 450cd17d16

View file

@ -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);