From cf3eab927bb417d02afc01a2fc7b657840fc6d48 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Tue, 23 Jun 2009 13:24:46 +0000 Subject: tinsel: added some comments to psx palette mapper svn-id: r41806 --- engines/tinsel/palette.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/tinsel') diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index c544bddbb1..8df9e9a375 100644 --- a/engines/tinsel/palette.cpp +++ b/engines/tinsel/palette.cpp @@ -99,6 +99,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) { bool colorFound = false; uint16 clutEntry = 0; + // Empty the table with color correspondences memset(mapperTable, 0, 16); for (int j = 1; j < 16; j++) { @@ -115,7 +116,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) { uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3); if (psxEquivalent == clutEntry) { - mapperTable[j] = i + 1; + mapperTable[j] = i + 1; // Add entry in the table for the found color colorFound = true; } } -- cgit v1.2.3