aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2005-05-11 13:02:40 +0000
committerMax Horn2005-05-11 13:02:40 +0000
commit90b91f12b2db9f86afa40fafc61cc6e112630936 (patch)
treed6d6e91950a069946d8940a8407f2ce221536cc1 /scumm
parent58562a0b7097e0c644406b69966b10441c16ee55 (diff)
downloadscummvm-rg350-90b91f12b2db9f86afa40fafc61cc6e112630936.tar.gz
scummvm-rg350-90b91f12b2db9f86afa40fafc61cc6e112630936.tar.bz2
scummvm-rg350-90b91f12b2db9f86afa40fafc61cc6e112630936.zip
Made Gdi::_transparentColor protected
svn-id: r18049
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp4
-rw-r--r--scumm/gfx.h4
-rw-r--r--scumm/room.cpp14
3 files changed, 12 insertions, 10 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 741361a988..46a0f8281b 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -223,7 +223,7 @@ void Gdi::init() {
}
}
-void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs) {
+void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) {
if (_vm->_version == 1) {
if (_vm->_platform == Common::kPlatformNES) {
decodeNESGfx(roomptr);
@@ -241,6 +241,8 @@ void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs) {
} else if (_vm->_version == 2) {
_roomStrips = generateStripTable(roomptr + IM00_offs, _vm->_roomWidth, _vm->_roomHeight, _roomStrips);
}
+
+ _transparentColor = transparentColor;
}
diff --git a/scumm/gfx.h b/scumm/gfx.h
index 627791f02f..0f498b53c9 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -196,7 +196,6 @@ class Gdi {
ScummEngine *_vm;
public:
- byte _transparentColor;
int _numZBuffer;
int _imgBufOffs[8];
int32 _numStrips;
@@ -206,6 +205,7 @@ public:
protected:
byte *_roomPalette;
+ byte _transparentColor;
byte _decomp_shr, _decomp_mask;
uint32 _vertStripNextInc;
@@ -270,7 +270,7 @@ protected:
public:
void init();
- void roomChanged(byte *roomptr, uint32 IM00_offs);
+ void roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor);
void drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int width, const int height,
int stripnr, int numstrip, byte flag);
diff --git a/scumm/room.cpp b/scumm/room.cpp
index 721d0e750c..3f05bfdf63 100644
--- a/scumm/room.cpp
+++ b/scumm/room.cpp
@@ -262,7 +262,6 @@ void ScummEngine::loadRoomSubBlocks() {
} else {
_IM00_offs = findResource(MKID('IM00'), findResource(MKID('RMIM'), roomptr)) - roomptr;
}
- gdi.roomChanged(roomptr, _IM00_offs);
//
// Look for an exit script
@@ -391,14 +390,15 @@ void ScummEngine::loadRoomSubBlocks() {
}
// Transparent color
+ byte trans;
if (_version == 8)
- gdi._transparentColor = (byte)READ_LE_UINT32(&(rmhd->v8.transparency));
+ trans = (byte)READ_LE_UINT32(&(rmhd->v8.transparency));
else {
ptr = findResourceData(MKID('TRNS'), roomptr);
if (ptr)
- gdi._transparentColor = ptr[0];
+ trans = ptr[0];
else
- gdi._transparentColor = 255;
+ trans = 255;
}
// Actor Palette in HE 70 games
@@ -412,6 +412,8 @@ void ScummEngine::loadRoomSubBlocks() {
_HEV7ActorPalette[i] = i;
}
}
+
+ gdi.roomChanged(roomptr, _IM00_offs, trans);
}
/**
@@ -579,7 +581,6 @@ void ScummEngine_v3old::loadRoomSubBlocks() {
} else {
_IM00_offs = READ_LE_UINT16(roomptr + 0x0A);
}
- gdi.roomChanged(roomptr, _IM00_offs);
//
// Look for an exit script
@@ -664,8 +665,7 @@ void ScummEngine_v3old::loadRoomSubBlocks() {
}
}
- // Transparent color
- gdi._transparentColor = 255;
+ gdi.roomChanged(roomptr, _IM00_offs, 255);
}
void ScummEngine_v3old::initRoomSubBlocks() {