mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 23:01:42 +00:00
Cleaned up Gdi::roomChanged
svn-id: r23938
This commit is contained in:
parent
60951b6f1a
commit
fd85c13d8f
@ -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 -
|
||||
|
@ -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
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user