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

Fix bug introduced by 85a8635952

This commit is contained in:
Logan McNaughton 2020-04-04 08:13:00 -06:00 committed by Sergey Lipskiy
parent a96853d559
commit c168f53d12
2 changed files with 5 additions and 5 deletions

View File

@ -1262,9 +1262,9 @@ u64 _calculateCRC(u32 _t, const TextureParams & _params, u32 _bytes)
if (gDP.otherMode.textureLUT != G_TT_NONE || gSP.textureTile[_t]->format == G_IM_FMT_CI) {
if (gSP.textureTile[_t]->size == G_IM_SIZ_4b)
crc = CRC_Calculate( crc, &gDP.paletteCRC16[gSP.textureTile[_t]->palette], 4 );
crc = CRC_Calculate( crc, &gDP.paletteCRC16[gSP.textureTile[_t]->palette], sizeof(u64) );
else if (gSP.textureTile[_t]->size == G_IM_SIZ_8b)
crc = CRC_Calculate( crc, &gDP.paletteCRC256, 4 );
crc = CRC_Calculate( crc, &gDP.paletteCRC256, sizeof(u64) );
}
if (config.generalEmulation.enableLOD != 0 && gSP.texture.level > 1 && _t > 0)
@ -1356,9 +1356,9 @@ void TextureCache::_updateBackground()
if (gDP.otherMode.textureLUT != G_TT_NONE || gSP.bgImage.format == G_IM_FMT_CI) {
if (gSP.bgImage.size == G_IM_SIZ_4b)
crc = CRC_Calculate( crc, &gDP.paletteCRC16[gSP.bgImage.palette], 4 );
crc = CRC_Calculate( crc, &gDP.paletteCRC16[gSP.bgImage.palette], sizeof(u64) );
else if (gSP.bgImage.size == G_IM_SIZ_8b)
crc = CRC_Calculate( crc, &gDP.paletteCRC256, 4 );
crc = CRC_Calculate( crc, &gDP.paletteCRC256, sizeof(u64) );
}
u32 params[4] = {gSP.bgImage.width, gSP.bgImage.height, gSP.bgImage.format, gSP.bgImage.size};

View File

@ -712,7 +712,7 @@ void gDPLoadTLUT( u32 tile, u32 uls, u32 ult, u32 lrs, u32 lrt )
pal = (pal + 1) & 0x0F;
}
gDP.paletteCRC256 = CRC_Calculate(UINT64_MAX, gDP.paletteCRC16, 64);
gDP.paletteCRC256 = CRC_Calculate(UINT64_MAX, gDP.paletteCRC16, sizeof(u64) * 16);
if (TFH.isInited()) {
const u16 start = gDP.tiles[tile].tmem - 256; // starting location in the palettes