1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Always use mask size first when calculate texture size.

Fixed court texture in Mario Tennis.
This commit is contained in:
Sergey Lipskiy 2015-03-14 20:07:48 +06:00
parent f5ca94b1ef
commit 2edc1bb8e0

View File

@ -557,10 +557,17 @@ void _calcTileSizes(u32 _t, TileSizes & _sizes, gDPTile * _pLoadTile)
gDPLoadTileInfo &info = gDP.loadInfo[pTile->tmem];
if (info.loadType == LOADTYPE_TILE) {
width = min(info.width, info.texWidth);
if (info.size > pTile->size)
width <<= info.size - pTile->size;
height = info.height;
if (pTile->masks && ((maskWidth * maskHeight) <= maxTexels))
width = maskWidth; // Use mask width if set and valid
else {
width = min(info.width, info.texWidth);
if (info.size > pTile->size)
width <<= info.size - pTile->size;
}
if (pTile->maskt && ((maskWidth * maskHeight) <= maxTexels))
height = maskHeight;
else
height = info.height;
} else {
if (pTile->masks && ((maskWidth * maskHeight) <= maxTexels))
width = maskWidth; // Use mask width if set and valid