From 1df96cebeba36fc538a8814dee06c10ab21c83ec Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sat, 6 Oct 2018 23:50:23 +0700 Subject: [PATCH] Enable clearDepthBuffer for Pokemon Snap. Fixed Pokemon Snap Oak's check does not work #777 again Note: this game is a mistery. I don't understand, why clearing of depth buffer via drawRecs breaks Oak's check. Actually, the problem causes rendering to color buffer corresponding to that depth buffer. Need to investigate, why. --- src/gDP.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gDP.cpp b/src/gDP.cpp index 1b4e75c4..1c174fc2 100644 --- a/src/gDP.cpp +++ b/src/gDP.cpp @@ -716,7 +716,8 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry ) } else if (gDP.fillColor.color == DepthClearColor && gDP.otherMode.cycleType == G_CYC_FILL) { depthBuffer = dbFound; depthBufferList().saveBuffer(gDP.colorImage.address); - if (config.generalEmulation.enableFragmentDepthWrite == 0) { + if (config.generalEmulation.enableFragmentDepthWrite == 0 || + (config.generalEmulation.hacks & hack_Snap) != 0) { frameBufferList().fillRDRAM(ulx, uly, lrx, lry); drawer.clearDepthBuffer(ulx, uly, lrx, lry); depthBuffer = dbCleared;