diff options
author | Travis Howell | 2002-11-04 02:23:52 +0000 |
---|---|---|
committer | Travis Howell | 2002-11-04 02:23:52 +0000 |
commit | 4748ffd33ce32824ca573fa45d3ea473b19f9dd0 (patch) | |
tree | 2b7e7820b7ed51d06fd982630ad5c75c553e4361 /simon/simon.cpp | |
parent | 6b423db3194c4e5ce5637bb13d0516e0e646bf7a (diff) | |
download | scummvm-rg350-4748ffd33ce32824ca573fa45d3ea473b19f9dd0.tar.gz scummvm-rg350-4748ffd33ce32824ca573fa45d3ea473b19f9dd0.tar.bz2 scummvm-rg350-4748ffd33ce32824ca573fa45d3ea473b19f9dd0.zip |
Fix simon 2 win sound effects
Enable sound effects in simon 2 dos non-talkie
Clean up sound code a bit
svn-id: r5398
Diffstat (limited to 'simon/simon.cpp')
-rw-r--r-- | simon/simon.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index 4e86831a6b..99b89f9454 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -3273,7 +3273,7 @@ void SimonState::showmessage_helper_2() void SimonState::readSfxFile(const char *filename) { - if (!(_game & GAME_SIMON2)) { + if (!(_game & GAME_SIMON2)) { /* simon 1 win talkie */ File in; uint32 size; @@ -3300,7 +3300,7 @@ void SimonState::readSfxFile(const char *filename) in.read(_sfx_heap, size); in.close(); - } else if (!gss->voc_filename) { + } else if (_voice_type == FORMAT_WAV) { /* simon 2 win talkie */ int res; uint32 offs; int size; @@ -3321,7 +3321,7 @@ void SimonState::readSfxFile(const char *filename) resfile_read(_sfx_heap, offs, size); - } else { + } else { /* simon 2 dos */ int num_per_set[] = {0, 188, 223, 217, 209, 179, 187, 189, 116, 174, 203, 173, 176, 38, 205, 134, 213, 212, 167, 141}; @@ -4877,9 +4877,8 @@ void SimonState::playVoice(uint voice) void SimonState::playSound(uint sound) { - if (_game & GAME_WIN) { // XXX: redundant - if (_effects_offsets && (_game & GAME_SIMON2)) { /* VOC sound simon2dos talkie */ + if (_effects_offsets && (_game & GAME_SIMON2)) { /* VOC sound simon 2 dos */ VocHeader voc_hdr; VocBlockHeader voc_block_hdr; @@ -4906,7 +4905,7 @@ void SimonState::playSound(uint sound) _mixer->playRaw(&_effects_sound, buffer, size, samples_per_sec, SoundMixer::FLAG_UNSIGNED); - } else if (_effects_offsets) { /* VOC sound file */ + } else if (_effects_offsets) { /* VOC sound simon 1 dos takie */ #ifdef USE_MAD if (_effects_type == FORMAT_MP3) { @@ -4946,14 +4945,7 @@ void SimonState::playSound(uint sound) #ifdef USE_MAD } #endif - } else { - /* FIXME: not properly implemented */ - /* Simon 2 dos talkie sfx aren't supported */ - /* Simon 2 dos sfx isn't supported */ - const char *s2 = gss->voc_filename; - File music_file; - music_file.open(s2, _gameDataPath); - if (music_file.isOpen() == false) { + } else if (_game & GAME_WIN) { /* ? sound simon 1/2 win talkie */ byte *p; @@ -4982,9 +4974,7 @@ void SimonState::playSound(uint sound) _mixer->playRaw(&_playing_sound, p + 8, READ_LE_UINT32(p + 4), 22050, SoundMixer::FLAG_UNSIGNED); - } - } - } else { + } else { /* ? sound simon 1 dos */ warning("playSound(%d)", sound); } } |