aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-09-27 20:31:19 +0000
committerMax Horn2003-09-27 20:31:19 +0000
commit6f978e9e30ac47a14e1e907b2a86b45d73ebd9cb (patch)
tree895c456d54c9b21a74ab2af64d40db89fbd79c50 /scumm
parent36816c0c8db583620032274245d3066dd9e73a33 (diff)
downloadscummvm-rg350-6f978e9e30ac47a14e1e907b2a86b45d73ebd9cb.tar.gz
scummvm-rg350-6f978e9e30ac47a14e1e907b2a86b45d73ebd9cb.tar.bz2
scummvm-rg350-6f978e9e30ac47a14e1e907b2a86b45d73ebd9cb.zip
some minor cleanup
svn-id: r10437
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp14
-rw-r--r--scumm/scummvm.cpp2
-rw-r--r--scumm/sound.cpp16
3 files changed, 10 insertions, 22 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index f2df497714..32259e37d3 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -933,15 +933,15 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
numzbuf = _numZBuffer;
assert(numzbuf <= ARRAYSIZE(zplane_list));
- if (_vm->_features & GF_OLD256) {
- zplane_list[1] = smap_ptr + READ_LE_UINT32(smap_ptr);
- if (0 == READ_LE_UINT32(zplane_list[1]))
- zplane_list[1] = 0;
- } else if (_vm->_features & GF_SMALL_HEADER) {
+ if (_vm->_features & GF_SMALL_HEADER) {
if (_vm->_features & GF_16COLOR)
zplane_list[1] = smap_ptr + READ_LE_UINT16(smap_ptr);
else
zplane_list[1] = smap_ptr + READ_LE_UINT32(smap_ptr);
+ if (_vm->_features & GF_OLD256) {
+ if (0 == READ_LE_UINT32(zplane_list[1]))
+ zplane_list[1] = 0;
+ }
for (i = 2; i < numzbuf; i++) {
zplane_list[i] = zplane_list[i-1] + READ_LE_UINT16(zplane_list[i-1]);
}
@@ -1198,7 +1198,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
}
} else {
for (i = 1; i < numzbuf; i++) {
- uint16 offs;
+ uint32 offs;
if (!zplane_list[i])
continue;
@@ -1210,7 +1210,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
else if (_vm->_features & GF_SMALL_HEADER)
offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 2);
else if (_vm->_version == 8)
- offs = (uint16) READ_LE_UINT32(zplane_list[i] + stripnr * 4 + 8);
+ offs = READ_LE_UINT32(zplane_list[i] + stripnr * 4 + 8);
else
offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 8);
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 17786a9351..fcdad80ae9 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1802,7 +1802,7 @@ void Scumm::processKbd() {
if (_version <= 2)
saveloadkey = 5; // F5
- else if ((_features & GF_OLD256) || (_gameId == GID_CMI) || (_features & GF_16COLOR)) /* FIXME: Support ingame screen ? */
+ else if ((_version <= 3) || (_gameId == GID_CMI)) /* FIXME: Support ingame screen ? */
saveloadkey = 319; // F5
else
saveloadkey = VAR(VAR_SAVELOADDIALOG_KEY);
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index df82552470..7a7a7ff89e 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -126,9 +126,8 @@ void Sound::addSoundToQueue(int sound) {
}
void Sound::addSoundToQueue2(int sound) {
- if (_soundQue2Pos < 10) {
- _soundQue2[_soundQue2Pos++] = sound;
- }
+ assert(_soundQue2Pos < ARRAYSIZE(_soundQue2));
+ _soundQue2[_soundQue2Pos++] = sound;
}
void Sound::processSoundQues() {
@@ -196,17 +195,6 @@ void Sound::playSound(int soundID) {
assert(_scumm->_musicEngine);
_scumm->_musicEngine->startSound(soundID);
}
-/*
- // XMIDI
- else if ((READ_UINT32(ptr) == MKID('MIDI')) && (_scumm->_features & GF_HUMONGOUS)) {
- // Pass XMIDI on to IMuse unprocessed.
- // IMuse can handle XMIDI resources now.
- }
- else if (READ_UINT32(ptr) == MKID('ADL ')) {
- // played as MIDI, just to make perhaps the later use
- // of WA possible (see "else if" with GF_OLD256 below)
- }
-*/
else if (READ_UINT32(ptr) == MKID('SOUN')) {
ptr += 24;
int track = ptr[0];