Skip to content

Commit

Permalink
Fix tile size calculation in TextureCache::_loadHiresTexture.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonetz committed Jun 30, 2024
1 parent acf4fb7 commit f119c32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,8 @@ bool TextureCache::_loadHiresTexture(u32 _tile, CachedTexture *_pTexture, u64 &
height--;
} else {
const gDPTile * pTile = gSP.textureTile[_tile];
int tile_width = pTile->lrs - pTile->uls + 1;
int tile_height = pTile->lrt - pTile->ult + 1;
int tile_width = ((pTile->lrs - pTile->uls) & 0x03FF) + 1;
int tile_height = ((pTile->lrt - pTile->ult) & 0x03FF) + 1;

int mask_width = (pTile->masks == 0) ? (tile_width) : (1 << pTile->masks);
int mask_height = (pTile->maskt == 0) ? (tile_height) : (1 << pTile->maskt);
Expand Down

0 comments on commit f119c32

Please sign in to comment.