From 506f263c131f43289cfdea7fd8bcb9760b45c220 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sun, 19 Dec 2021 20:53:09 +0700 Subject: [PATCH] Correct imageW/imageH calculation in ObjCoordinates again. fixes #2617 RE2 bottom of the screen is being cut off --- src/uCodes/S2DEX.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/uCodes/S2DEX.cpp b/src/uCodes/S2DEX.cpp index e5e28ae8..54f04e60 100644 --- a/src/uCodes/S2DEX.cpp +++ b/src/uCodes/S2DEX.cpp @@ -476,10 +476,8 @@ struct ObjCoordinates f32 frameW = _FIXED2FLOAT(_pObjScaleBg->frameW, 2); f32 frameH = _FIXED2FLOAT(_pObjScaleBg->frameH, 2); - //f32 imageW = (f32)(_pObjScaleBg->imageW >> 2); - //f32 imageH = (f32)(_pObjScaleBg->imageH >> 2); - f32 imageW = (f32)gSP.bgImage.width; - f32 imageH = (f32)gSP.bgImage.height; + f32 imageW = (f32)((_pObjScaleBg->imageW >> 2) & 0xFFFFFFFE); + f32 imageH = (f32)((_pObjScaleBg->imageH >> 2) & 0xFFFFFFFE); if (u32(imageW) == 512 && (config.generalEmulation.hacks & hack_RE2) != 0u) { const f32 width = f32(*REG.VI_WIDTH);