aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFabio Battaglia2009-06-23 13:24:46 +0000
committerFabio Battaglia2009-06-23 13:24:46 +0000
commitcf3eab927bb417d02afc01a2fc7b657840fc6d48 (patch)
treeac76065b770c71cd3eb70b28adf912b4ca5f1835 /engines
parent65891626a209f894b5a3d0ebdafaec8dfc3fd011 (diff)
downloadscummvm-rg350-cf3eab927bb417d02afc01a2fc7b657840fc6d48.tar.gz
scummvm-rg350-cf3eab927bb417d02afc01a2fc7b657840fc6d48.tar.bz2
scummvm-rg350-cf3eab927bb417d02afc01a2fc7b657840fc6d48.zip
tinsel: added some comments to psx palette mapper
svn-id: r41806
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/palette.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}
}