mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 17:57:14 +00:00
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:
parent
ed698cb635
commit
33f9cb35a3
@ -1346,11 +1346,12 @@ void Gdi::drawStripC64Background(byte *dst, int stripnr, int height) {
|
||||
height >>= 3;
|
||||
for (int y = 0; y < height; y++) {
|
||||
_C64Colors[3] = (_C64ColorMap[y + stripnr * height] & 7);
|
||||
// Check for room color change in V1 zak
|
||||
if (_vm->_roomPalette[0] == 255) {
|
||||
_vm->_roomPalette[0] = 0;
|
||||
_C64Colors[2] = _vm->_roomPalette[2];
|
||||
_C64Colors[1] = _vm->_roomPalette[1];
|
||||
}
|
||||
|
||||
charIdx = _C64PicMap[y + stripnr * height] * 8;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
byte c = _C64CharMap[charIdx + i];
|
||||
|
@ -1334,6 +1334,7 @@ void Scumm_v2::o2_roomOps() {
|
||||
break;
|
||||
case 2: /* room color */
|
||||
if (_version == 1) {
|
||||
// V1 zak needs to know when room color is changed
|
||||
_roomPalette[0] = 255;
|
||||
_roomPalette[1] = a;
|
||||
_roomPalette[2] = b;
|
||||
|
@ -1946,6 +1946,10 @@ void Scumm::initRoomSubBlocks() {
|
||||
if (!roomptr || !roomResPtr)
|
||||
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)
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user