[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.45,2.46 scummvm.cpp,2.85,2.86
Max Horn
fingolfin at users.sourceforge.net
Fri Apr 11 19:39:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv19202
Modified Files:
gfx.cpp scummvm.cpp
Log Message:
doh... best way to check for 16 color games is to check for 16 color games, isn't it? :-)
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.45
retrieving revision 2.46
diff -u -d -r2.45 -r2.46
--- gfx.cpp 10 Apr 2003 19:29:59 -0000 2.45
+++ gfx.cpp 12 Apr 2003 02:38:40 -0000 2.46
@@ -842,6 +842,9 @@
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 @@
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 @@
_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 @@
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;
}
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.85
retrieving revision 2.86
diff -u -d -r2.85 -r2.86
--- scummvm.cpp 12 Apr 2003 02:09:00 -0000 2.85
+++ scummvm.cpp 12 Apr 2003 02:38:40 -0000 2.86
@@ -316,7 +316,7 @@
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 @@
}
} 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;
More information about the Scummvm-git-logs
mailing list