diff options
author | Max Horn | 2006-09-18 22:22:35 +0000 |
---|---|---|
committer | Max Horn | 2006-09-18 22:22:35 +0000 |
commit | fd85c13d8f5a8c58e056fe51658a5b83da323053 (patch) | |
tree | 627f2be76d0735f96deb78567d4ce4edbc6c2587 /engines/scumm | |
parent | 60951b6f1a877a21eff7c9e555161127e9810928 (diff) | |
download | scummvm-rg350-fd85c13d8f5a8c58e056fe51658a5b83da323053.tar.gz scummvm-rg350-fd85c13d8f5a8c58e056fe51658a5b83da323053.tar.bz2 scummvm-rg350-fd85c13d8f5a8c58e056fe51658a5b83da323053.zip |
Cleaned up Gdi::roomChanged
svn-id: r23938
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() { |