aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-05-10 20:21:12 +0000
committerJames Brown2002-05-10 20:21:12 +0000
commitecbf23da72e99bbc5b78da07a248de587ae5cb69 (patch)
treee80be2fd925525dc21b1f0172574d390d5180c14
parent939f9314fa5bd075835590e6dfd647aa88fbde16 (diff)
downloadscummvm-rg350-ecbf23da72e99bbc5b78da07a248de587ae5cb69.tar.gz
scummvm-rg350-ecbf23da72e99bbc5b78da07a248de587ae5cb69.tar.bz2
scummvm-rg350-ecbf23da72e99bbc5b78da07a248de587ae5cb69.zip
Impliment what we call 'random guesses' for Sam and Max iMUSE
svn-id: r4271
-rw-r--r--script_v2.cpp5
-rw-r--r--sound/imuse.cpp34
2 files changed, 29 insertions, 10 deletions
diff --git a/script_v2.cpp b/script_v2.cpp
index b48356bf9b..74ec51aff1 100644
--- a/script_v2.cpp
+++ b/script_v2.cpp
@@ -1652,9 +1652,10 @@ void Scumm::o6_isSoundRunning()
{
int snd = pop();
- // FIXME: This fixes wak-a-rat until we figure out why
- // iMUSE fails to locate certain sounds.
+ // FIXME: This fixes wak-a-rat until we correctly implement
+ // sam and max iMUSE
if (_gameId == GID_SAMNMAX && _currentRoom == 18 && snd == 23) {
+ stopSound(snd);
push(0);
return;
}
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 511c7a1a41..d480eabe92 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -1328,16 +1328,34 @@ int32 IMuseInternal::do_command(int a, int b, int c, int d, int e, int f, int g,
return start_sound(b) ? 0 : -1;
case 9:
return stop_sound(b);
-
case 10:
-
- return stop_all_sounds(); //FIXME
+ return stop_all_sounds(); //FIXME: Sam and Max unknown
case 11:
return stop_all_sounds();
case 13:
- return get_sound_status(b);
- case 14:
- return stop_sound(b); //FIXME should be something like fade off
+ return get_sound_status(b);
+ case 14: { // FIXME: Sam and Max command - Total guess
+ int i; // Seems to work as a volume fader
+ Player *player;
+
+ for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
+ if (player->_active && player->_id == (uint16)b) {
+ player->fade_vol(e, f);
+ return 0;
+ }
+ }
+ }
+ case 15: { // FIXME: Sam and Max command - Total guess
+ int i; // Something to do with position?
+ Player *player;
+ for (i = ARRAYSIZE(_players), player = _players; i != 0; i--, player++) {
+ if (player->_active && player->_id == (uint16)b) {
+ player->jump(player->_track_index+1, 0, 0);
+ return 0;
+ }
+ }
+ }
+
case 16:
return set_volchan(b, c);
case 17:
@@ -1345,9 +1363,9 @@ int32 IMuseInternal::do_command(int a, int b, int c, int d, int e, int f, int g,
case 18:
return set_volchan_entry(b, c);
case 19:
- return stop_sound(b); //FIXME
+ return stop_sound(b); //FIXME: Sam and Max unknown
case 20:
- return stop_sound(b); //FIXME
+ return stop_sound(b); //FIXME: Sam and Max unknown
case 2:
case 3:
return 0;