aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-08-14 09:47:21 +0000
committerJames Brown2002-08-14 09:47:21 +0000
commit8f60936d7c5a76765486e2fb9cec7ce64aabb73a (patch)
tree6f9e587c79a6d57dbc7b72d20c48ee293cf7c85f
parentbc4b4452d32743b18c524ec98b41df6ed3e43a8d (diff)
downloadscummvm-rg350-8f60936d7c5a76765486e2fb9cec7ce64aabb73a.tar.gz
scummvm-rg350-8f60936d7c5a76765486e2fb9cec7ce64aabb73a.tar.bz2
scummvm-rg350-8f60936d7c5a76765486e2fb9cec7ce64aabb73a.zip
Two patches by Torbj�rn Andersson.
594922: Fix loom masking 594921: Loom sound fixes svn-id: r4739
-rw-r--r--costume.cpp2
-rw-r--r--script_v1.cpp11
-rw-r--r--sound.cpp2
3 files changed, 11 insertions, 4 deletions
diff --git a/costume.cpp b/costume.cpp
index c9e3e948b0..621c941377 100644
--- a/costume.cpp
+++ b/costume.cpp
@@ -291,7 +291,7 @@ byte CostumeRenderer::mainRoutine(Actor *a, int slot, int frame)
masking = 0;
if (_vm->_features & GF_SMALL_HEADER)
- masking = _zbuf;
+ masking = (_zbuf != 0);
else
masking =
_vm->isMaskActiveAt(_left, _top, _right, _bottom,
diff --git a/script_v1.cpp b/script_v1.cpp
index 6788418497..740ac0ec34 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -2712,10 +2712,17 @@ void Scumm::decodeParseString()
delay = (int)((getVarOrDirectWord(0x40) & 0xffff) * 7.5);
if (_gameId == GID_LOOM256) {
_vars[VAR_MI1_TIMER] = 0;
+ if (offset == 0 && delay == 0) {
#ifdef COMPRESSED_SOUND_FILE
- if (playMP3CDTrack(1, 0, offset, delay) == -1)
+ if (stopMP3CD() == -1)
#endif
- _system->play_cdrom(1, 0, offset, delay);
+ _system->stop_cdrom();
+ } else {
+#ifdef COMPRESSED_SOUND_FILE
+ if (playMP3CDTrack(1, 0, offset, delay) == -1)
+#endif
+ _system->play_cdrom(1, 0, offset, delay);
+ }
} else {
warning("parseString: 8");
}
diff --git a/sound.cpp b/sound.cpp
index df8416eb38..0d40b168c7 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -510,7 +510,7 @@ void Scumm::stopSound(int a)
IMuse *se;
int i;
- if (a == current_cd_sound) {
+ if (a != 0 && a == current_cd_sound) {
current_cd_sound = 0;
#ifdef COMPRESSED_SOUND_FILE
if (stopMP3CD() == -1)