From 7aeb1018ea19c29389fcc2839033d136453893ec Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sun, 11 Mar 2018 14:34:42 +0700 Subject: [PATCH] Fix texture size calculation and texture load. Fixed Missing Ground Textures in Super Smash Bros. #1716 --- src/Textures.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Textures.cpp b/src/Textures.cpp index 21021cb2..667e6239 100644 --- a/src/Textures.cpp +++ b/src/Textures.cpp @@ -644,11 +644,6 @@ void _calcTileSizes(u32 _t, TileSizes & _sizes, gDPTile * _pLoadTile) _sizes.clampWidth = (pTile->clamps && gDP.otherMode.cycleType != G_CYC_COPY) ? tileWidth : width; _sizes.clampHeight = (pTile->clampt && gDP.otherMode.cycleType != G_CYC_COPY) ? tileHeight : height; - if (_sizes.clampWidth > 256) - pTile->clamps = 0; - if (_sizes.clampHeight > 256) - pTile->clampt = 0; - // Make sure masking is valid if (maskWidth > width) { pTile->masks = powof(width); @@ -1000,7 +995,8 @@ void TextureCache::_getTextureDestData(CachedTexture& tmptex, { u16 mirrorSBit, maskSMask, clampSClamp; u16 mirrorTBit, maskTMask, clampTClamp; - u16 x, y, i, j, tx, ty; + u16 x, y, tx, ty; + u32 i, j; u64 *pSrc; if (tmptex.maskS > 0) { clampSClamp = tmptex.clampS ? tmptex.clampWidth - 1 : (tmptex.mirrorS ? (tmptex.width << 1) - 1 : tmptex.width - 1);