From: ptitSeb Date: Mon, 3 Mar 2014 13:57:48 +0000 (+0100) Subject: GLES1RICE: Update from upstream X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=327629a4e62171779835fed1f4da9a4b78a4d221;p=mupen64plus-pandora.git GLES1RICE: Update from upstream --- diff --git a/source/rice_gles/src/Render.cpp b/source/rice_gles/src/Render.cpp old mode 100644 new mode 100755 index d90633f..8359ee4 --- a/source/rice_gles/src/Render.cpp +++ b/source/rice_gles/src/Render.cpp @@ -202,6 +202,20 @@ void CRender::SetWorldView(const Matrix & mat, bool bPush, bool bReplace) { // Load projection matrix gRSP.modelviewMtxs[gRSP.modelViewMtxTop] = mat; + + // Hack needed to show heart in OOT & MM + // It renders at Z cordinate = 0.0f that gets clipped away + // So we translate them a bit along Z to make them stick + if( options.enableHackForGames == HACK_FOR_ZELDA || options.enableHackForGames == HACK_FOR_ZELDA_MM) + { + if(gRSP.modelviewMtxs[gRSP.modelViewMtxTop]._43 == 0.0f + && gRSP.modelviewMtxs[gRSP.modelViewMtxTop]._42 != 0.0f + && gRSP.modelviewMtxs[gRSP.modelViewMtxTop]._42 <= 94.5f + && gRSP.modelviewMtxs[gRSP.modelViewMtxTop]._42 >= -94.5f) + { + gRSP.modelviewMtxs[gRSP.modelViewMtxTop]._43 -= 10.1f; + } + } } else // Multiply projection matrix {