Ticket #8244: simon.patch

File simon.patch, 4.0 KB (added by Kirben, 21 years ago)

Simon combined speech and subtitles patch

  • simon/items.cpp

    RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
    retrieving revision 1.80
    diff -u -r1.80 items.cpp
     
    995995                                if (_game & GF_TALKIE)
    996996                                        d = _array_4[a];
    997997
    998                                 if (d != 0 && !_subtitles) {
     998                                if (d != 0)
    999999                                        talk_with_speech(d, b);
    1000                                 } else if (s != NULL) {
     1000                                if (s != NULL && (d == 0 || _subtitles))
    10011001                                        talk_with_text(b, c, s, tv->a, tv->b, tv->c);
    1002                                 }
    10031002                        }
    10041003                        break;
    10051004
     
    12341233        if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
    12351234                if (child != NULL && child->avail_props & 0x200) {
    12361235                        uint offs = getOffsetOfChild2Param(child, 0x200);
    1237                         if (!_subtitles)
    1238                                 talk_with_speech(child->array[offs], a);
     1236                        talk_with_speech(child->array[offs], a);
    12391237                } else if (child != NULL && child->avail_props & 0x100) {
    12401238                        uint offs = getOffsetOfChild2Param(child, 0x100);
    1241                         if (!_subtitles)
    1242                                 talk_with_speech(child->array[offs] + 3550, a);
     1239                        talk_with_speech(child->array[offs] + 3550, a);
    12431240                }
    12441241        } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
    12451242                if (child != NULL && child->avail_props & 0x200) {
     
    12891286                                }
    12901287                        }
    12911288
    1292                         if (!_subtitles)
    1293                                 talk_with_speech(var200, a);
     1289                        talk_with_speech(var200, a);
    12941290                }
    12951291
    12961292        }
  • simon/simon.cpp

    RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
    retrieving revision 1.231
    diff -u -r1.231 simon.cpp
     
    20372037        case GAME_SIMON1TALKIE:
    20382038        case GAME_SIMON1WIN:
    20392039        case GAME_SIMON1CD32:
    2040                 if (speech_id != 0 && !_subtitles) {
     2040                if (speech_id != 0)
    20412041                        talk_with_speech(speech_id, num_1);
    2042                 } else if (string_ptr != NULL) {
     2042                if (string_ptr != NULL && _subtitles)
    20432043                        talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
    2044                 }
    20452044                break;
    20462045
    20472046        case GAME_SIMON1DEMO:
     
    20542053        case GAME_SIMON2TALKIE:
    20552054        case GAME_SIMON2WIN:
    20562055        case GAME_SIMON2MAC:
    2057                 if (speech_id != 0 && num_1 == 1 && !_subtitles)
     2056                if (speech_id != 0 && num_1 == 1)
    20582057                        talk_with_speech(speech_id, num_1);
    20592058
    20602059                if (speech_id != 0 && !_subtitles)
     
    27292728        _exit_cutscene = false;
    27302729        _skip_speech = false;
    27312730        while (_vga_wait_for != 0) {
    2732                 if (_skip_speech) {
    2733                         if (_game & GF_SIMON2) {
    2734                                 if (_vga_wait_for == 200 && !vc_get_bit(14)) {
    2735                                         skip_speech();
    2736                                         break;
    2737                                 }
     2731                if (_skip_speech && _game & GF_SIMON2) {
     2732                        if (_vga_wait_for == 200 && !vc_get_bit(14)) {
     2733                                skip_speech();
     2734                                break;
    27382735                        }
    27392736                } else if (_exit_cutscene) {
    27402737                        if (vc_get_bit(9)) {
     
    37423739void SimonEngine::talk_with_speech(uint speech_id, uint num_1) {
    37433740        if (!(_game & GF_SIMON2)) {
    37443741                if (speech_id == 9999) {
     3742                        if (_subtitles)
     3743                                return;
    37453744                        if (!(_bit_array[0] & 0x4000) && !(_bit_array[1] & 0x1000)) {
    37463745                                _bit_array[0] |= 0x4000;
    37473746                                _variableArray[100] = 0xF;
     
    37493748                                o_wait_for_vga(0x82);
    37503749                        }
    37513750                        _skip_vga_wait = true;
    3752                         return;
    3753                 }
    3754                 if (num_1 < 100) {
     3751                } else {
     3752                        if (_subtitles && _scriptvar_2) {
     3753                                start_vga_code(4, 2, 204, 0, 0, 0);
     3754                                o_wait_for_vga(204);
     3755                                o_kill_sprite_simon1(204);
     3756                        }
    37553757                        o_kill_sprite_simon1(num_1 + 201);
    3756                 }
    3757 
    3758                 _sound->playVoice(speech_id);
    3759 
    3760                 if (num_1 < 100) {
     3758                        _sound->playVoice(speech_id);
    37613759                        start_vga_code(4, 2, num_1 + 201, 0, 0, 0);
    37623760                }
    37633761        } else {
     
    37793777                        }
    37803778                        o_kill_sprite_simon2(2, num_1 + 2);
    37813779                        _sound->playVoice(speech_id);
    3782 
    37833780                        start_vga_code(4, 2, num_1 + 2, 0, 0, 0);
    37843781                }
    37853782        }
     
    44824479
    44834480                                case OSystem::EVENT_RBUTTONDOWN:
    44844481                                        if (_game & GF_SIMON2)
    4485                                         _skip_speech = true;
     4482                                                _skip_speech = true;
    44864483                                        else
    4487                                         _exit_cutscene = true;
    4488                                         break;
     4484                                                _exit_cutscene = true;
     4485                                        break;
    44894486                               
    44904487                                default:
    44914488                                        break;