Ticket #9213: mi-fan.patch

File mi-fan.patch, 13.3 KB (added by fingolfin, 10 years ago)

Slightly revised patch against master branch (updated)

  • engines/scumm/detection_tables.h

    diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
    index a5542ca..c2490c0 100644
    a b using Common::GUIO_MIDITOWNS;  
    208208// only a single unique variant. This is used to help the detector quickly
    209209// decide whether it has to worry about distinguishing multiple variants or not.
    210210static const GameSettings gameVariantsTable[] = {
    211         {"maniac", "Apple II",   0, GID_MANIAC, 0, 0, MDT_APPLEIIGS, 0, Common::kPlatformApple2GS, GUIO_NOSPEECH | GUIO_NOMIDI},
    212         {"maniac", "C64",        0, GID_MANIAC, 0, 0, MDT_C64, 0, Common::kPlatformC64, GUIO_NOSPEECH | GUIO_NOMIDI},
    213         {"maniac", "V1",      "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    214         {"maniac", "V1 Demo", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    215         {"maniac", "NES",        0, GID_MANIAC, 1, 0, MDT_NONE,  0, Common::kPlatformNES, GUIO_NOSPEECH | GUIO_NOMIDI},
    216         {"maniac", "V2",      "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    217         {"maniac", "V2 Demo", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    218 
    219         {"zak", "V1",       "v1", GID_ZAK, 1, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    220         {"zak", "V2",       "v2", GID_ZAK, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    221         {"zak", "FM-TOWNS",    0, GID_ZAK, 3, 0, MDT_TOWNS, GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
    222 
    223 
    224         {"indy3", "EGA",      "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    225         {"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR,             0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    226         {"indy3", "VGA",      "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS,                  Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    227         {"indy3", "FM-TOWNS",     0, GID_INDY3, 3, 0, MDT_TOWNS,             GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
    228 
    229         {"loom", "EGA",      "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
    230         {"loom", "No AdLib", "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS,                        0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     211        {"maniac",  "Apple II",     0, GID_MANIAC,    0, 0, MDT_APPLEIIGS, 0, Common::kPlatformApple2GS, GUIO_NOSPEECH | GUIO_NOMIDI},
     212        {"maniac",  "C64",          0, GID_MANIAC,    0, 0, MDT_C64, 0, Common::kPlatformC64, GUIO_NOSPEECH | GUIO_NOMIDI},
     213        {"maniac",  "V1",        "v1", GID_MANIAC,    1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     214        {"maniac",  "V1 Demo",   "v1", GID_MANIAC,    1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     215        {"maniac",  "NES",          0, GID_MANIAC,    1, 0, MDT_NONE,  0, Common::kPlatformNES, GUIO_NOSPEECH | GUIO_NOMIDI},
     216        {"maniac",  "V2",        "v2", GID_MANIAC,    2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     217        {"maniac",  "V2 Demo",   "v2", GID_MANIAC,    2, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     218
     219        {"zak",     "V1",        "v1", GID_ZAK,        1, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     220        {"zak",     "V2",        "v2", GID_ZAK,        2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     221        {"zak",     "FM-TOWNS",     0, GID_ZAK,        3, 0, MDT_TOWNS, GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
     222
     223
     224        {"indy3",   "EGA",      "ega", GID_INDY3,      3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     225        {"indy3",   "No AdLib", "ega", GID_INDY3,      3, 0, MDT_PCSPK | MDT_PCJR,             0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     226        {"indy3",   "VGA",      "vga", GID_INDY3,      3, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS,                  Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     227        {"indy3",   "FM-TOWNS",     0, GID_INDY3,      3, 0, MDT_TOWNS,             GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
     228
     229        {"loom",    "EGA",      "ega", GID_LOOM,      3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
     230        {"loom",    "No AdLib", "ega", GID_LOOM,      3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS,                        0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    231231#ifdef USE_RGB_COLOR
    232         {"loom", "PC-Engine",    0, GID_LOOM, 3, 0, MDT_NONE,                         GF_AUDIOTRACKS | GF_OLD256 | GF_16BIT_COLOR, Common::kPlatformPCEngine, GUIO_NOSPEECH | GUIO_NOMIDI},
     232        {"loom",    "PC-Engine",    0, GID_LOOM,      3, 0, MDT_NONE,                         GF_AUDIOTRACKS | GF_OLD256 | GF_16BIT_COLOR, Common::kPlatformPCEngine, GUIO_NOSPEECH | GUIO_NOMIDI},
    233233#endif
    234         {"loom", "FM-TOWNS",     0, GID_LOOM, 3, 0, MDT_TOWNS,                        GF_AUDIOTRACKS | GF_OLD256, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
    235         {"loom", "VGA",      "vga", GID_LOOM, 4, 0, MDT_NONE,                         GF_AUDIOTRACKS,             Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     234        {"loom",    "FM-TOWNS",     0, GID_LOOM,      3, 0, MDT_TOWNS,                        GF_AUDIOTRACKS | GF_OLD256, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
     235        {"loom",    "VGA",      "vga", GID_LOOM,      4, 0, MDT_NONE,                         GF_AUDIOTRACKS,             Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    236236
    237         {"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB, GF_16COLOR, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     237        {"pass",    0,              0, GID_PASS,      4, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB, GF_16COLOR, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    238238
    239         {"monkey", "VGA",      "vga", GID_MONKEY_VGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
    240         {"monkey", "EGA",      "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_16COLOR,     Common::kPlatformPC, GUIO_NOSPEECH},
    241         {"monkey", "No AdLib", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR,                        GF_16COLOR,     Common::kPlatformAtariST, GUIO_NOSPEECH | GUIO_NOMIDI},
    242         {"monkey", "Demo",     "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB,            GF_16COLOR,     Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
    243         {"monkey", "CD",           0, GID_MONKEY,     5, 0, MDT_ADLIB,                        GF_AUDIOTRACKS, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
    244         {"monkey", "FM-TOWNS",     0, GID_MONKEY,     5, 0, MDT_TOWNS,                        GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
    245         {"monkey", "SEGA",         0, GID_MONKEY,     5, 0, MDT_NONE,                         GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO_NOSPEECH | GUIO_NOMIDI},
     239        {"monkey",  "VGA",      "vga", GID_MONKEY_VGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
     240        {"monkey",  "EGA",      "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_16COLOR,     Common::kPlatformPC, GUIO_NOSPEECH},
     241        {"monkey",  "No AdLib", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR,                        GF_16COLOR,     Common::kPlatformAtariST, GUIO_NOSPEECH | GUIO_NOMIDI},
     242        {"monkey",  "Demo",     "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB,            GF_16COLOR,     Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
     243        {"monkey",  "CD",           0, GID_MONKEY,     5, 0, MDT_ADLIB,                        GF_AUDIOTRACKS, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
     244        {"monkey",  "FM-TOWNS",     0, GID_MONKEY,     5, 0, MDT_TOWNS,                        GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
     245        {"monkey",  "SEGA",         0, GID_MONKEY,     5, 0, MDT_NONE,                         GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO_NOSPEECH | GUIO_NOMIDI},
    246246
    247         {"monkey2",  "", 0, GID_MONKEY2,  5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
    248         {"monkey2", "FM-TOWNS", 0, GID_MONKEY2,  5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NOSPEECH},
     247        {"monkey2",  "",            0, GID_MONKEY2,    5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
     248        {"monkey2", "FM-TOWNS",     0, GID_MONKEY2,    5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NOSPEECH},
    249249
    250         {"atlantis", "", 0, GID_INDY4,    5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NONE},
    251         {"atlantis", "Floppy", 0, GID_INDY4,    5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
    252         {"atlantis", "FM-TOWNS", 0, GID_INDY4,    5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NONE},
     250        // Fan patch versions of Monkey Island 1 & 2 add native MIDI support and speech
     251        {"monkey",  "Fan Patch",    0, GID_MONKEY,     5, 0, MDT_ADLIB | MDT_MIDI,             GF_AUDIOTRACKS, UNK, GUIO_NONE},
     252        {"monkey2", "Fan Patch",    0, GID_MONKEY2,    5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NONE},
    253253
    254         {"tentacle", "", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NONE},
    255         {"tentacle", "Floppy", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NOSPEECH},
     254        {"atlantis", "",            0, GID_INDY4,      5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NONE},
     255        {"atlantis", "Floppy",      0, GID_INDY4,      5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
     256        {"atlantis", "FM-TOWNS",    0, GID_INDY4,      5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NONE},
    256257
    257         {"samnmax",  "", 0, GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NONE},
    258         {"samnmax",  "Floppy", 0, GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NOSPEECH},
     258        {"tentacle", "",            0, GID_TENTACLE,   6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NONE},
     259        {"tentacle", "Floppy",      0, GID_TENTACLE,   6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NOSPEECH},
     260
     261        {"samnmax",  "",            0, GID_SAMNMAX,    6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NONE},
     262        {"samnmax",  "Floppy",      0, GID_SAMNMAX,    6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NOSPEECH},
    259263
    260264#ifdef ENABLE_SCUMM_7_8
    261         {"ft",       0, 0, GID_FT,  7, 0, MDT_NONE, 0, UNK, GUIO_NOMIDI},
     265        {"ft",       0,             0, GID_FT,         7, 0, MDT_NONE, 0, UNK, GUIO_NOMIDI},
    262266
    263         {"dig",      0, 0, GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO_NOMIDI},
     267        {"dig",      0,             0, GID_DIG,        7, 0, MDT_NONE, 0, UNK, GUIO_NOMIDI},
    264268
    265         {"comi",     0, 0, GID_CMI, 8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO_NOMIDI},
     269        {"comi",     0,             0, GID_CMI,        8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO_NOMIDI},
    266270#endif
    267271
    268272        // Humongous Entertainment Scumm Version 6
  • engines/scumm/script_v5.cpp

    diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
    index ee790f7..9a88579 100644
    a b void ScummEngine_v5::o5_roomOps() {  
    18011801
    18021802        case 13:        // SO_SAVE_STRING
    18031803                {
    1804                         // This subopcode is used in Indy 4 to save the IQ points data.
    1805                         // No other game uses it. We use this to replace the given filename by
    1806                         // one based on the targetname ("TARGET.iq").
    1807                         // This way, the iq data of each Indy 4 variant a user might have stays
    1808                         // separate. Moreover, the filename now clearly reflects to which target
    1809                         // it belongs (as it should).
     1804                        // This subopcode is used in Indy 4 to save the IQ points
     1805                        // data. No other LucasArts game uses it. We use this fact
     1806                        // to substitute a filename based on the targetname
     1807                        // ("TARGET.iq").
     1808                        //
     1809                        // This way, the iq data of each Indy 4 variant stays
     1810                        // separate. Moreover, the filename now clearly reflects to
     1811                        // which target it belongs (as it should).
     1812                        //
     1813                        // In addition, the Monkey Island fan patch (which adds
     1814                        // speech support and more things to MI 1 and 2) uses
     1815                        // this opcode to generate a "monkey.cfg" file containing.
     1816                        // some user controllable settings.
     1817                        // Once more we use a custom filename ("TARGET.cfg").
    18101818                        Common::String filename;
    18111819                        char chr;
    18121820
    void ScummEngine_v5::o5_roomOps() {  
    18161824
    18171825                        if (_game.id == GID_INDY4) {
    18181826                                filename = _targetName + ".iq";
     1827                        } else if (_game.id == GID_MONKEY || _game.id == GID_MONKEY2) {
     1828                                filename = _targetName + ".cfg";
    18191829                        } else {
    18201830                                error("SO_SAVE_STRING: Unsupported filename %s", filename.c_str());
    18211831                        }
    void ScummEngine_v5::o5_roomOps() {  
    18431853
    18441854                        if (_game.id == GID_INDY4) {
    18451855                                filename = _targetName + ".iq";
     1856                        } else if (_game.id == GID_MONKEY || _game.id == GID_MONKEY2) {
     1857                                filename = _targetName + ".cfg";
    18461858                        } else {
    18471859                                error("SO_LOAD_STRING: Unsupported filename %s", filename.c_str());
    18481860                        }