diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/gfx.cpp | 19 | ||||
-rw-r--r-- | engines/scumm/gfx.h | 9 | ||||
-rw-r--r-- | engines/scumm/room.cpp | 5 |
3 files changed, 15 insertions, 18 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index e2ed7ec447..5a952e73f0 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -201,7 +201,7 @@ Gdi::Gdi(ScummEngine *vm) : _vm(vm) { _paletteMod = 0; _roomPalette = vm->_roomPalette; - _transparentColor = 0; + _transparentColor = 255; _decomp_shr = 0; _decomp_mask = 0; _vertStripNextInc = 0; @@ -248,16 +248,14 @@ void Gdi::init() { } } -void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) { - _transparentColor = transparentColor; +void Gdi::roomChanged(byte *roomptr) { } -void GdiNES::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) { +void GdiNES::roomChanged(byte *roomptr) { decodeNESGfx(roomptr); - _transparentColor = transparentColor; } -void GdiV1::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) { +void GdiV1::roomChanged(byte *roomptr) { for (int i = 0; i < 4; i++){ _C64.colors[i] = roomptr[6 + i]; } @@ -267,14 +265,11 @@ void GdiV1::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 16), _C64.maskMap, roomptr[4] * roomptr[5]); decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 18) + 2, _C64.maskChar, READ_LE_UINT16(roomptr + READ_LE_UINT16(roomptr + 18))); _objectMode = true; - - _transparentColor = transparentColor; } -void GdiV2::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) { - _roomStrips = generateStripTable(roomptr + IM00_offs, _vm->_roomWidth, _vm->_roomHeight, _roomStrips); - - _transparentColor = transparentColor; +void GdiV2::roomChanged(byte *roomptr) { + _roomStrips = generateStripTable(roomptr + READ_LE_UINT16(roomptr + 0x0A), + _vm->_roomWidth, _vm->_roomHeight, _roomStrips); } #pragma mark - diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index b565998c47..9206d8d4e7 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -253,7 +253,8 @@ public: virtual ~Gdi(); virtual void init(); - virtual void roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor); + virtual void roomChanged(byte *roomptr); + void setTransparentColor(byte transparentColor) { _transparentColor = transparentColor; } void drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int width, const int height, int stripnr, int numstrip, byte flag); @@ -308,7 +309,7 @@ protected: public: GdiNES(ScummEngine *vm); - virtual void roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor); + virtual void roomChanged(byte *roomptr); }; class GdiV1 : public Gdi { @@ -342,7 +343,7 @@ protected: public: GdiV1(ScummEngine *vm); - virtual void roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor); + virtual void roomChanged(byte *roomptr); }; class GdiV2 : public Gdi { @@ -369,7 +370,7 @@ public: GdiV2(ScummEngine *vm); ~GdiV2(); - virtual void roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor); + virtual void roomChanged(byte *roomptr); }; } // End of namespace Scumm diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp index ee8671322c..78858423f9 100644 --- a/engines/scumm/room.cpp +++ b/engines/scumm/room.cpp @@ -438,7 +438,8 @@ void ScummEngine::setupRoomSubBlocks() { putClass(182, kObjectClassUntouchable, 0); } - _gdi->roomChanged(roomptr, _IM00_offs, trans); + _gdi->roomChanged(roomptr); + _gdi->setTransparentColor(trans); } /** @@ -692,7 +693,7 @@ void ScummEngine_v3old::setupRoomSubBlocks() { } } - _gdi->roomChanged(roomptr, _IM00_offs, 255); + _gdi->roomChanged(roomptr); } void ScummEngine_v3old::resetRoomSubBlocks() { |