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:
parent
f5ca94b1ef
commit
2edc1bb8e0
15
Textures.cpp
15
Textures.cpp
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user