aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-04-12 02:38:40 +0000
committerMax Horn2003-04-12 02:38:40 +0000
commitb89a2ca142898f725319cd0ad447349802de04ce (patch)
tree5e71c06c659120c2c8110d931f5e3e7ffd85ef38
parent9750a2407c9832550d76798576aeceea9c541c9d (diff)
downloadscummvm-rg350-b89a2ca142898f725319cd0ad447349802de04ce.tar.gz
scummvm-rg350-b89a2ca142898f725319cd0ad447349802de04ce.tar.bz2
scummvm-rg350-b89a2ca142898f725319cd0ad447349802de04ce.zip
doh... best way to check for 16 color games is to check for 16 color games, isn't it? :-)
svn-id: r6978
-rw-r--r--scumm/gfx.cpp9
-rw-r--r--scumm/scummvm.cpp4
2 files changed, 8 insertions, 5 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 5d3e29a68e..3bfc442d29 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -842,6 +842,9 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h,
bool lightsOn;
bool useOrDecompress;
+printf("drawBitmap (%d, %d, %d)\n", x, y, h);
+hexdump(ptr, 0x40);
+
// Check whether lights are turned on or not
lightsOn = (_vm->_features & GF_AFTER_V6) || (vs->number != 0) || (_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_screen);
@@ -858,7 +861,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h,
numzbuf = _disable_zbuffer ? 0 : _numZBuffer;
assert(numzbuf <= (int)ARRAYSIZE(zplane_list));
- if (_vm->_gameId == GID_MONKEY_EGA) {
+ if (_vm->_features & GF_16COLOR) {
byte *ptr_z = smap_ptr;
for (i = 0; i < numzbuf; i++) {
int off = READ_LE_UINT16(ptr_z);
@@ -947,7 +950,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h,
_mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x);
if (_vm->_features & GF_SMALL_HEADER) {
- if (_vm->_gameId == GID_MONKEY_EGA) {
+ if (_vm->_features & GF_16COLOR) {
useOrDecompress = decompressBitmap(bgbak_ptr, smap_ptr + READ_LE_UINT16(smap_ptr + stripnr * 2 + 2), h);
} else {
useOrDecompress = decompressBitmap(bgbak_ptr, smap_ptr + READ_LE_UINT32(smap_ptr + stripnr * 4 + 4), h);
@@ -1111,7 +1114,7 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
bool Gdi::decompressBitmap(byte *bgbak_ptr, byte *smap_ptr, int numLinesToProcess) {
assert(numLinesToProcess);
- if ((_vm->_gameId == GID_MONKEY_EGA) || (_vm->_gameId == GID_LOOM)) {
+ if (_vm->_features & GF_16COLOR) {
decodeStripEGA(bgbak_ptr, smap_ptr, numLinesToProcess);
return false;
}
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index af84661d01..ddf5d613ba 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -316,7 +316,7 @@ void Scumm::scummInit() {
initScreens(0, 16, _realWidth, 144);
}
- if (((_features & GF_AFTER_V2) || (_features & GF_AFTER_V3) || (_gameId == GID_MONKEY_EGA)) && !(_features & GF_OLD256)) {
+ if (_features & GF_16COLOR) {
byte pal16[16 * 4] = {
0, 0, 0, 0, 0, 0, 168, 0, 0, 168, 0, 0, 0, 168, 168, 0,
168, 0, 0, 0, 168, 0, 168, 0, 168, 84, 0, 0, 168, 168, 168, 0,
@@ -547,7 +547,7 @@ int Scumm::scummLoop(int delta) {
}
} else if (_features & GF_AUDIOTRACKS) {
_vars[VAR_MI1_TIMER] = _sound->readCDTimer();
- } else if ((_features & GF_OLD256) || (_gameId == GID_MONKEY_EGA)) {
+ } else if ((_features & GF_OLD256) || (_features & GF_16COLOR)) {
if(tempMusic == 3) {
tempMusic = 0;