From 165871788451b50bcf4f55c69add95e729579f90 Mon Sep 17 00:00:00 2001 From: Silent Date: Sun, 22 Jun 2014 18:02:00 +0200 Subject: [PATCH] Twopass disabled for indoor cutscenes --- SilentPatch/dllmain.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SilentPatch/dllmain.cpp b/SilentPatch/dllmain.cpp index c151b42..2990078 100644 --- a/SilentPatch/dllmain.cpp +++ b/SilentPatch/dllmain.cpp @@ -52,7 +52,7 @@ WRAPPER RwRaster* RwRasterSetFromImage(RwRaster* raster, RwImage* image) { WRAPA WRAPPER RwBool RwImageDestroy(RwImage* image) { WRAPARG(image); EAXJMP(0x802740); } WRAPPER RwImage* RwImageFindRasterFormat(RwImage* ipImage, RwInt32 nRasterType, RwInt32* npWidth, RwInt32* npHeight, RwInt32* npDepth, RwInt32* npFormat) { WRAPARG(ipImage); WRAPARG(nRasterType); WRAPARG(npWidth); WRAPARG(npHeight); WRAPARG(npDepth); WRAPARG(npFormat); EAXJMP(0x8042C0); } - +WRAPPER bool CanSeeOutSideFromCurrArea() { EAXJMP(0x53C4A0); } #ifndef SA_STEAM_TEST @@ -200,6 +200,7 @@ static const float fRefZVal = 1.0f; static const float* const pRefFal = &fRefZVal; static RwInt32& clumpPluginOffset = **(RwInt32**)0x732202; +static bool& CCutsceneMgr__ms_running = **(bool**)0x53F92D; #ifndef SA_STEAM_TEST void** rwengine = *(void***)0x58FFC0; @@ -297,6 +298,10 @@ RpAtomic* OnePassAlphaRender(RpAtomic* atomic) RpAtomic* TwoPassAlphaRender(RpAtomic* atomic) { + // For cutscenes, fall back to one-pass render + if ( CCutsceneMgr__ms_running && !CanSeeOutSideFromCurrArea() ) + return OnePassAlphaRender(atomic); + int nPushedAlpha, nAlphaFunction; int nZWrite; int nAlphaBlending;