diff options
author | Johannes Schickel | 2011-08-26 18:35:13 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-08-26 18:35:13 +0200 |
commit | b4a17c702db5ff0af20ee72dca677c6eeccd4621 (patch) | |
tree | fa435d7d0819670b260993ffa6e35b3f98d2bfac | |
parent | e791f904ed1e3090ca176f8b42e784602d18df08 (diff) | |
download | scummvm-rg350-b4a17c702db5ff0af20ee72dca677c6eeccd4621.tar.gz scummvm-rg350-b4a17c702db5ff0af20ee72dca677c6eeccd4621.tar.bz2 scummvm-rg350-b4a17c702db5ff0af20ee72dca677c6eeccd4621.zip |
SCUMM: Add some comments to our Indy4 Amiga verb palette handling.
We handle the verb palette map a bit different, since we use one 64 color
palette instead of two 32 color palettes for different screen areas.
-rw-r--r-- | engines/scumm/palette.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index 75db90842d..4d53b2ec74 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -400,6 +400,10 @@ void ScummEngine::setAmigaPaletteFromPtr(const byte *ptr) { mapVerbPalette(i); } else { int idx = (i - 16) & 31; + // We adjust our verb palette map from [0, 31] to [32, 63], since unlike + // the original we set up the verb palette at colors [32, 63]. + // The original instead used two different palettes for the verb virtual + // screen and all the rest. if (idx != 17) { _roomPalette[i] = idx; _verbPalette[i] = idx + 32; @@ -454,6 +458,10 @@ int ScummEngine::remapRoomPaletteColor(int r, int g, int b) { } void ScummEngine::mapVerbPalette(int idx) { + // We adjust our verb palette map from [0, 31] to [32, 63], since unlike + // the original we set up the verb palette at colors [32, 63]. + // The original instead used two different palettes for the verb virtual + // screen and all the rest. if (idx >= 48 && idx < 80 && idx != 65) _verbPalette[idx] = idx - 16; else @@ -1220,6 +1228,8 @@ void ScummEngine::setPalColor(int idx, int r, int g, int b) { if (i >= 16 && i < _amigaFirstUsedColor) continue; + // We do - 16 instead of - 48 like the original, since our + // verb palette map is using [32, 63] instead of [0, 31]. if (idx - 16 == _verbPalette[i]) mapVerbPalette(i); } |