Change zak room color remapping, so it work correctly after load/save in room with remapped colors.

svn-id: r9905
This commit is contained in:
Travis Howell 2003-08-29 06:46:12 +00:00
parent ed698cb635
commit 33f9cb35a3
3 changed files with 7 additions and 1 deletions

View file

@ -1346,11 +1346,12 @@ void Gdi::drawStripC64Background(byte *dst, int stripnr, int height) {
height >>= 3; height >>= 3;
for (int y = 0; y < height; y++) { for (int y = 0; y < height; y++) {
_C64Colors[3] = (_C64ColorMap[y + stripnr * height] & 7); _C64Colors[3] = (_C64ColorMap[y + stripnr * height] & 7);
// Check for room color change in V1 zak
if (_vm->_roomPalette[0] == 255) { if (_vm->_roomPalette[0] == 255) {
_vm->_roomPalette[0] = 0;
_C64Colors[2] = _vm->_roomPalette[2]; _C64Colors[2] = _vm->_roomPalette[2];
_C64Colors[1] = _vm->_roomPalette[1]; _C64Colors[1] = _vm->_roomPalette[1];
} }
charIdx = _C64PicMap[y + stripnr * height] * 8; charIdx = _C64PicMap[y + stripnr * height] * 8;
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
byte c = _C64CharMap[charIdx + i]; byte c = _C64CharMap[charIdx + i];

View file

@ -1334,6 +1334,7 @@ void Scumm_v2::o2_roomOps() {
break; break;
case 2: /* room color */ case 2: /* room color */
if (_version == 1) { if (_version == 1) {
// V1 zak needs to know when room color is changed
_roomPalette[0] = 255; _roomPalette[0] = 255;
_roomPalette[1] = a; _roomPalette[1] = a;
_roomPalette[2] = b; _roomPalette[2] = b;

View file

@ -1946,6 +1946,10 @@ void Scumm::initRoomSubBlocks() {
if (!roomptr || !roomResPtr) if (!roomptr || !roomResPtr)
error("Room %d: data not found (" __FILE__ ":%d)", _roomResource, __LINE__); error("Room %d: data not found (" __FILE__ ":%d)", _roomResource, __LINE__);
// Reset room color for V1 zak
if (_version == 1)
_roomPalette[0] = 0;
// //
// Determine the room dimensions (width/height) // Determine the room dimensions (width/height)
// //