[Scummvm-cvs-logs] scummvm master -> 064ab0fd628f660d8565512dfbffb0c11a82f046
sev-
sev at scummvm.org
Sat Aug 27 19:27:32 CEST 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cd45d63e06 SCUMM: Added some comments about special colors in Indy4 Amiga.
064ab0fd62 Merge pull request #77 from lordhoto/indy4amiga
Commit: cd45d63e064c5f45e911256de75c3efef156337d
https://github.com/scummvm/scummvm/commit/cd45d63e064c5f45e911256de75c3efef156337d
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-08-27T08:41:12-07:00
Commit Message:
SCUMM: Added some comments about special colors in Indy4 Amiga.
Changed paths:
engines/scumm/palette.cpp
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index 4d53b2e..9977436 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -382,6 +382,9 @@ void ScummEngine::setAmigaPaletteFromPtr(const byte *ptr) {
_amigaFirstUsedColor = 80;
for (; _amigaFirstUsedColor < 256; ++_amigaFirstUsedColor) {
+ // We look for the first used color here. If all color components are
+ // >= 252 the color seems to be unused. Check remapPaletteColor for
+ // the same behavior.
if (ptr[_amigaFirstUsedColor * 3 + 0] <= 251
|| ptr[_amigaFirstUsedColor * 3 + 1] <= 251
|| ptr[_amigaFirstUsedColor * 3 + 2] <= 251)
@@ -408,6 +411,10 @@ void ScummEngine::setAmigaPaletteFromPtr(const byte *ptr) {
_roomPalette[i] = idx;
_verbPalette[i] = idx + 32;
} else {
+ // In all my tests it seems the colors 0 and 32 in
+ // _amigaPalette are in fact black. Thus 17 is probably black.
+ // For the room map the color 17 is 33 (17+16), for the verb
+ // map it is 65 (17+32).
_roomPalette[i] = 0;
_verbPalette[i] = 32;
}
@@ -418,6 +425,8 @@ void ScummEngine::setAmigaPaletteFromPtr(const byte *ptr) {
}
void ScummEngine::mapRoomPalette(int idx) {
+ // For Color 33 (which is in fact 17+16) see the special case in
+ // setAmigaPaletteFromPtr.
if (idx >= 16 && idx < 48 && idx != 33)
_roomPalette[idx] = idx - 16;
else
@@ -462,6 +471,8 @@ void ScummEngine::mapVerbPalette(int idx) {
// 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.
+ // For Color 65 (which is in fact 17+32) see the special case in
+ // setAmigaPaletteFromPtr.
if (idx >= 48 && idx < 80 && idx != 65)
_verbPalette[idx] = idx - 16;
else
@@ -910,6 +921,8 @@ void ScummEngine::darkenPalette(int redScale, int greenScale, int blueScale, int
}
for (int i = startColor; i <= endColor; ++i) {
+ // Colors 33 (17+16) and 65 (17+32) will never get changed. For
+ // more information about these check setAmigaPaletteFromPtr.
if (i >= 16 && i < 48 && i != 33) {
remappedRoomColors = true;
_amigaPalette[(i - 16) * 3 + 0] = _currentPalette[i * 3 + 0] >> 4;
@@ -1204,6 +1217,8 @@ void ScummEngine::setPalColor(int idx, int r, int g, int b) {
}
if (_game.platform == Common::kPlatformAmiga && _game.id == GID_INDY4) {
+ // Colors 33 (17+16) and 65 (17+32) will never get changed. For
+ // more information about these check setAmigaPaletteFromPtr.
if (idx < 16 || idx >= _amigaFirstUsedColor) {
mapRoomPalette(idx);
mapVerbPalette(idx);
Commit: 064ab0fd628f660d8565512dfbffb0c11a82f046
https://github.com/scummvm/scummvm/commit/064ab0fd628f660d8565512dfbffb0c11a82f046
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2011-08-27T10:23:19-07:00
Commit Message:
Merge pull request #77 from lordhoto/indy4amiga
SCUMM: Implement proper Indy4 Amiga palette handling.
Changed paths:
engines/scumm/charset.cpp
engines/scumm/charset.h
engines/scumm/costume.cpp
engines/scumm/cursor.cpp
engines/scumm/gfx.cpp
engines/scumm/palette.cpp
engines/scumm/room.cpp
engines/scumm/saveload.cpp
engines/scumm/saveload.h
engines/scumm/scumm.cpp
engines/scumm/scumm.h
More information about the Scummvm-git-logs
mailing list