From 01d8ca6fb06a8261602900cab63c61e5a1b143c9 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 18 Dec 2013 09:04:41 +0100 Subject: [PATCH] RICE: OOT Fix from mupen64plus-ae team --- source/gles2rice/src/Render.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) mode change 100644 => 100755 source/gles2rice/src/Render.cpp diff --git a/source/gles2rice/src/Render.cpp b/source/gles2rice/src/Render.cpp old mode 100644 new mode 100755 index d90633f..068fb30 --- a/source/gles2rice/src/Render.cpp +++ b/source/gles2rice/src/Render.cpp @@ -214,6 +214,20 @@ void CRender::SetWorldView(const Matrix & mat, bool bPush, bool bReplace) { // Load projection matrix gRSP.modelviewMtxs[gRSP.modelViewMtxTop] = mat; + + //GSI: 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 { -- 2.39.5