aboutsummaryrefslogtreecommitdiff
path: root/simon/simon.cpp
diff options
context:
space:
mode:
authorTravis Howell2002-12-22 08:08:53 +0000
committerTravis Howell2002-12-22 08:08:53 +0000
commit987a823ffea77338ad47c83419a0518d6970d504 (patch)
treef151836be784d1cbb8ac0e76cc5cf573c76857f5 /simon/simon.cpp
parent352748878a79b31dc4ef0d0c9cac1924d83faf0e (diff)
downloadscummvm-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/simon.cpp')
-rw-r--r--simon/simon.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 38a9c10cb6..3d0efd2fb2 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -4412,15 +4412,12 @@ void SimonState::dx_update_screen_and_palette()
}
}
- if (!_fast_mode || !(rand() & 7)) {
-
if (_mouse_pos_changed) {
_mouse_pos_changed = false;
_system->set_mouse_pos(_sdl_mouse_x, _sdl_mouse_y);
}
_system->copy_rect(_sdl_buf_attached, 320, 0, 0, 320, 200);
_system->update_screen();
- }
memcpy(_sdl_buf_attached, _sdl_buf, 320 * 200);
@@ -4504,7 +4501,7 @@ void SimonState::go()
} else {
_vk_t_toggle = true;
}
-
+
while (1) {
hitarea_stuff();
handle_verb_clicked(_verb_hitarea);
@@ -4807,21 +4804,26 @@ bool SimonState::load_game(uint slot)
return true;
}
-void SimonState::playMusic(uint music)
-{
- /* TODO */
- /* Simon 2 dos / talkie music requires xmi midi format support */
- if (_game & GAME_WIN) {
- midi.shutdown();
- _game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
- midi.read_all_songs(_game_file, music);
-
- midi.initialize();
- midi.play();
- } else if (!(_game & GAME_SIMON2) && !(_game & GAME_DEMO)){
+void SimonState::playMusic(uint music_unk, uint music)
+{
+ if (_game & GAME_SIMON2) { // Simon 2 music
+ if (_game & GAME_WIN) {
+ midi.shutdown();
+ _game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music - 1], SEEK_SET);
+ midi.read_all_songs(_game_file, music);
+ _midi_unk1 = music;
+ } else
+ warning ("XMI music not supported");
+ _vc72_var1 = music_unk;
+ _vc70_var1 = 0xFFFF;
+ _vc72_var3 = 0xFFFF;
+ _midi_unk2 = 0xFFFF;
+ } else if (!(_game & GAME_DEMO)){ // Simon 1 music
midi.shutdown();
-
- if (_game & GAME_TALKIE) {
+ if (_game & GAME_WIN) {
+ _game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
+ midi.read_all_songs(_game_file, music);
+ } else if (_game & GAME_TALKIE) {
_game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
midi.read_all_songs_old(_game_file, music);
} else {
@@ -4836,7 +4838,6 @@ void SimonState::playMusic(uint music)
midi.read_all_songs_old(f, music);
delete f;
}
-
midi.initialize();
midi.play();
}