Texture Handler:

- Fix a bug where 4x4 formatted textures were being read incorrectly. (Regression from r5569.)
This commit is contained in:
rogerman 2016-11-02 09:37:59 +00:00
parent df60214b26
commit b0e649c9bb
1 changed files with 2 additions and 10 deletions
desmume/src

View File

@ -469,17 +469,9 @@ TexCacheItem::TexCacheItem(const u32 texAttributes, const u32 palAttributes)
isPalZeroTransparent = false;
}
paletteAddress = (packFormat == TEXMODE_I2) ? palAttributes << 3 : palAttributes << 4;
paletteSize = paletteSizeList[packFormat] * sizeof(u16);
if (paletteSize > 0)
{
paletteAddress = (packFormat == TEXMODE_I2) ? palAttributes << 3 : palAttributes << 4;
paletteColorTable = (u16 *)malloc_alignedCacheLine(paletteSize);
}
else
{
paletteAddress = 0;
paletteColorTable = NULL;
}
paletteColorTable = (paletteSize > 0) ? (u16 *)malloc_alignedCacheLine(paletteSize) : NULL;
unpackFormat = TexFormat_None;
unpackSize = 0;