diff options
author | Travis Howell | 2003-10-26 05:31:36 +0000 |
---|---|---|
committer | Travis Howell | 2003-10-26 05:31:36 +0000 |
commit | c7e723ceb4842b5e164e9475a28ecee72b93392a (patch) | |
tree | d3925e84cf55121425f455c52715248d63da1036 /simon | |
parent | 1b38419b424cc7e16048dfc3860e0915fa568bd5 (diff) | |
download | scummvm-rg350-c7e723ceb4842b5e164e9475a28ecee72b93392a.tar.gz scummvm-rg350-c7e723ceb4842b5e164e9475a28ecee72b93392a.tar.bz2 scummvm-rg350-c7e723ceb4842b5e164e9475a28ecee72b93392a.zip |
Add combined speech and subtitles support for simon2.
svn-id: r10972
Diffstat (limited to 'simon')
-rw-r--r-- | simon/items.cpp | 17 | ||||
-rw-r--r-- | simon/simon.cpp | 57 | ||||
-rw-r--r-- | simon/vga.cpp | 2 |
3 files changed, 19 insertions, 57 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 34951fb70b..4b922dcf57 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -1001,17 +1001,10 @@ int SimonEngine::runScript() { if (_game & GF_TALKIE) speech_id = _array_4[string_id]; - if (_game & GF_SIMON2) { - if (speech_id != 0 && (_language == 20 || !_subtitles)) - talk_with_speech(speech_id, vga_struct_id); - if (string_ptr != NULL && _subtitles) - talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c); - } else { - if (speech_id != 0) - talk_with_speech(speech_id, vga_struct_id); - if (string_ptr != NULL && _subtitles) - talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c); - } + if (speech_id != 0) + talk_with_speech(speech_id, vga_struct_id); + if (string_ptr != NULL && _subtitles) + talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c); } break; @@ -1298,7 +1291,7 @@ void SimonEngine::o_inventory_descriptions() { } } - if (_language == 20 || !_subtitles) + if (_subtitles) talk_with_speech(var200, vga_struct_id); } diff --git a/simon/simon.cpp b/simon/simon.cpp index 9a6ca54726..0f4e8e0e15 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -2116,38 +2116,19 @@ void SimonEngine::o_print_str() { uint speech_id = 0; ThreeValues *tv; - if (_game & GF_TALKIE) { - if (string_id != 0xFFFF) - string_ptr = getStringPtrByID(string_id); + if (string_id != 0xFFFF) + string_ptr = getStringPtrByID(string_id); + if (_game & GF_TALKIE) speech_id = (uint16)getNextWord(); - } else { - string_ptr = getStringPtrByID(string_id); - } tv = getThreeValues(vga_sprite_id); - if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) { - if (speech_id != 0 && vga_sprite_id == 1 && (_language == 20 || !_subtitles)) - talk_with_speech(speech_id, vga_sprite_id); - - if ((_game & GF_TALKIE) && (speech_id == 0)) - o_kill_sprite_simon2(2, vga_sprite_id + 2); - - if (string_ptr != NULL && (speech_id == 0 || _subtitles)) - talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c); - - } else if (_game & GF_TALKIE) { - if (speech_id != 0) - talk_with_speech(speech_id, vga_sprite_id); - if (string_ptr != NULL && (speech_id == 0 || _subtitles)) - talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c); - - } else { + if (speech_id != 0) + talk_with_speech(speech_id, vga_sprite_id); + if (string_ptr != NULL && (speech_id == 0 || _subtitles)) talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c); - } - } void SimonEngine::ensureVgaResLoadedC(uint vga_res) { @@ -3992,10 +3973,9 @@ void SimonEngine::talk_with_speech(uint speech_id, uint vga_sprite_id) { } _skip_vga_wait = true; } else { - if (_subtitles && _scriptvar_2) { - start_vga_code(4, 2, 5, 0, 0, 0); - o_wait_for_vga(205); - o_kill_sprite_simon2(2, 5); + if (_subtitles) { + _sound->playVoice(speech_id); + return; } o_kill_sprite_simon2(2, vga_sprite_id + 2); _sound->playVoice(speech_id); @@ -4715,23 +4695,12 @@ void SimonEngine::go() { _start_mainscript = true; if (_game & GF_TALKIE) { - if (_game & GF_SIMON2) { - // Allow choice in Hebrew version of Simon the Sorcerer 2 - if (_language == 20) { - if (_noSubtitles) - _subtitles = false; - // Check for speech file in other versions of Simon the Sorcerer 2 - } else { - if (_sound->hasVoice()) - _subtitles = false; - } - // English and German versions of Simon the Sorcerer 1 don't have full subtitles - } else if (_language < 2) { - _subtitles = false; - // Allow choice in other versions of Simon the Sorcerer 1 - } else { + if ((_game & GF_SIMON2) || _language >= 2) { if (_noSubtitles) _subtitles = false; + // English and German versions of Simon the Sorcerer 1 don't have full subtitles + } else { + _subtitles = false; } } diff --git a/simon/vga.cpp b/simon/vga.cpp index 6fe357c0d2..f6bde58ef4 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -1780,7 +1780,7 @@ void SimonEngine::vc_63_palette_thing_2() { void SimonEngine::vc_64_skip_if_no_speech() { // Simon2 - if (_sound->_voice_handle == 0) + if ((_sound->_voice_handle == 0) || _subtitles) vc_skip_next_instruction(); } |