1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Fix TMEM address mask for tlut_en case. Thanks angrylion for the hint.

Fixed texture mapping for 3D objects in Mischief Makers.
This commit is contained in:
Sergey Lipskiy 2016-02-08 23:15:00 +06:00
parent 1d1f4bdbb4
commit 232800a823

View File

@ -971,13 +971,14 @@ void TextureCache::_getTextureDestData(CachedTexture& tmptex,
}
} else {
j = 0;
const u32 tMemMask = gDP.otherMode.textureLUT == G_TT_NONE ? 0x1FF : 0xFF;
for (y = 0; y < tmptex.realHeight; ++y) {
ty = min(y, clampTClamp) & maskTMask;
if (y & mirrorTBit)
ty ^= maskTMask;
pSrc = &TMEM[(tmptex.tMem + *pLine * ty) & 0x1FF];
pSrc = &TMEM[(tmptex.tMem + *pLine * ty) & tMemMask];
i = (ty & 1) << 1;
for (x = 0; x < tmptex.realWidth; ++x) {