From 5c5c218e4133e2c326d501458b2f42417ef9e715 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Wed, 21 Aug 2019 12:16:26 +0700 Subject: [PATCH] Correct tile size calculation. Fixed text in Zelda debug rom. See bug reported by AriaHiro64 in #1885 --- src/Textures.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Textures.cpp b/src/Textures.cpp index 078fa59d..4f17956e 100644 --- a/src/Textures.cpp +++ b/src/Textures.cpp @@ -629,11 +629,11 @@ void _calcTileSizes(u32 _t, TileSizes & _sizes, gDPTile * _pLoadTile) height = mask_height; } - _sizes.width = width; - _sizes.height = height; - _sizes.clampWidth = (pTile->clamps && gDP.otherMode.cycleType != G_CYC_COPY) ? tileWidth : width; _sizes.clampHeight = (pTile->clampt && gDP.otherMode.cycleType != G_CYC_COPY) ? tileHeight : height; + + _sizes.width = (pTile->clamps != 0 && info.loadType == LOADTYPE_TILE) ? _sizes.clampWidth : width; + _sizes.height = (pTile->clampt != 0 && info.loadType == LOADTYPE_TILE) ? _sizes.clampHeight : height; }