From 8f60936d7c5a76765486e2fb9cec7ce64aabb73a Mon Sep 17 00:00:00 2001 From: James Brown Date: Wed, 14 Aug 2002 09:47:21 +0000 Subject: Two patches by Torbj�rn Andersson. 594922: Fix loom masking 594921: Loom sound fixes svn-id: r4739 --- costume.cpp | 2 +- script_v1.cpp | 11 +++++++++-- sound.cpp | 2 +- 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) -- cgit v1.2.3