diff options
author | Travis Howell | 2002-12-22 08:08:53 +0000 |
---|---|---|
committer | Travis Howell | 2002-12-22 08:08:53 +0000 |
commit | 987a823ffea77338ad47c83419a0518d6970d504 (patch) | |
tree | f151836be784d1cbb8ac0e76cc5cf573c76857f5 /simon/items.cpp | |
parent | 352748878a79b31dc4ef0d0c9cac1924d83faf0e (diff) | |
download | scummvm-rg350-987a823ffea77338ad47c83419a0518d6970d504.tar.gz scummvm-rg350-987a823ffea77338ad47c83419a0518d6970d504.tar.bz2 scummvm-rg350-987a823ffea77338ad47c83419a0518d6970d504.zip |
First attempt at proper simon 2 midi support
Thanks to olki's previous work
svn-id: r6056
Diffstat (limited to 'simon/items.cpp')
-rw-r--r-- | simon/items.cpp | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 2086c37f8b..c9903d6e68 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -753,7 +753,9 @@ int SimonState::runScript() case 134:{ if (_debugMode) warning("stopMidiMusic: not implemented"); - /* dummy proc */ + _vc70_var2 = 0xFFFF; + _midi_unk1 = 0xFFFF; + _vc72_var1 = 0xFFFF; } break; @@ -1472,25 +1474,37 @@ void SimonState::o_unk_132_helper_2(FillOrCopyStruct *fcs, int x) void SimonState::o_unk_127() { + uint a = getVarOrWord(); + uint b = getVarOrWord(); if (_game & GAME_SIMON2) { - uint a = getVarOrWord(); - uint b = getVarOrWord(); uint c = getVarOrByte(); if (_debugMode) warning("o_unk_127(%d,%d,%d) not implemented properly", a, b, c); - if (a != _last_music_played) { - _last_music_played = a; - playMusic(a - 1); + if (_midi_unk1 == a) { + if (b == _vc72_var1 || b == 999) { + return; + } + if (_vc72_var1 != 0xFFFF || _vc72_var1 != 999) { + _vc70_var2 = c; + _vc70_var1 = 0xffff; + _vc72_var3 = 0xffff; + _midi_unk2 = 0xffff; + midi.initialize(); + midi.play(); + _vc72_var1 = b; + } else { + _vc72_var3 = b; + _vc72_var2 = c; + } + } else if (b == 999) { + _midi_unk2 = a; } } else { - uint a = getVarOrWord(); - /*uint b = */ getVarOrWord(); - if (a != _last_music_played) { _last_music_played = a; - playMusic(a); + playMusic(0, a); } } } |