Ticket #8296: ftdemofix.patch

File ftdemofix.patch, 8.8 KB (added by sev-, 20 years ago)

Fixed Patch to make PC FT demo run

  • scumm/help.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/help.cpp scummvm/scumm/help.cpp
    old new  
    4747        case GID_DIG:
    4848        case GID_FT:
    4949        case GID_CMI:
     50        case GID_FTDEMO:
    5051                return 3;
    5152                break; 
    5253/*      TODO - I don't know the controls for these games
     
    215216                        ADD_BIND("b", "Black and White / Color");
    216217                        break;
    217218                case GID_FT:
     219                case GID_FTDEMO:
    218220                        ADD_BIND("e", "Eyes");
    219221                        ADD_BIND("t", "Tongue");
    220222                        ADD_BIND("i", "Inventory");
  • scumm/imuse_digi.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/imuse_digi.cpp scummvm/scumm/imuse_digi.cpp
    old new  
    10661066                                        return 0;
    10671067                                }
    10681068                        }
    1069                 } else if (_scumm->_gameId == GID_FT) {
     1069                } else if (_scumm->_gameId == GID_FT || _scumm->_gameId == GID_FTDEMO) {
    10701070                        for (l = 0;; l++) {
    10711071                                if (_ftStateMusicTable[l].index == -1) {
    10721072                                        return 1;
     
    11131113                                        return 0;
    11141114                                }
    11151115                        }
    1116                 } else if (_scumm->_gameId == GID_FT) {
     1116                } else if (_scumm->_gameId == GID_FT || _scumm->_gameId == GID_FTDEMO) {
    11171117                        for (l = 0;; l++) {
    11181118                                if (_ftSeqMusicTable[l].index == -1) {
    11191119                                        return 1;
  • scumm/resource.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/resource.cpp scummvm/scumm/resource.cpp
    old new  
    8787                                if (room > 0 && (_version == 8))
    8888                                        VAR(VAR_CURRENTDISK) = res.roomno[rtRoom][room];
    8989                                sprintf(buf, "%s.la%d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]);
    90                                 sprintf(buf2, "%s.%.3d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]);
     90
     91                                // FIXME: Now it is not possible to have target file and
     92                                // main resource file named differently
     93                                if (_gameId == GID_FTDEMO)
     94                                        sprintf(buf2, "ft.%.3d", room == 0 ? 0 : res.roomno[rtRoom][room]);
     95                                else
     96                                        sprintf(buf2, "%s.%.3d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]);
    9197                        } else if (_features & GF_HUMONGOUS)
    9298                                sprintf(buf, "%s.he%.1d", _gameName.c_str(), room == 0 ? 0 : res.roomno[rtRoom][room]);
    9399                        else {
     
    20692075                _numCostumes = _fileHandle.readUint16LE();
    20702076
    20712077                _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
    2072                 _numGlobalScripts = 2000;
     2078
     2079                if (_gameId == GID_FTDEMO)
     2080                        _numGlobalScripts = 300;
     2081                else
     2082                        _numGlobalScripts = 2000;
    20732083
    20742084                _shadowPaletteSize = NUM_SHADOW_PALETTE * 256;
    20752085        // FIXME better check for the more recent windows based humongous games...
  • scumm/script_v6.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/script_v6.cpp scummvm/scumm/script_v6.cpp
    old new  
    18131813        // Full Throttle implements conversation by creating new verbs, one
    18141814        // for each option, but it never tells when to actually draw them.
    18151815
    1816         if (_gameId == GID_FT)
     1816        if (_gameId == GID_FT || _gameId == GID_FTDEMO)
    18171817                _verbRedraw = true;
    18181818
    18191819        op = fetchScriptByte();
     
    24102410                                // INSANE mode 0: SMUSH movie playback
    24112411                                if (args[1] == 0) {
    24122412                                        sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
    2413                                 } else if (_gameId == GID_FT) {
    2414                                         int insaneMode = readArray(233,0,0);
     2413                                } else if (_gameId == GID_FT || _gameId == GID_FTDEMO) {
     2414                                        int insaneVarNum;
     2415                                        int insaneMode;
     2416
     2417                                        if (_gameId == GID_FTDEMO)
     2418                                                insaneVarNum = 232;
     2419                                        else
     2420                                                insaneVarNum = 233;
     2421
     2422                                        insaneMode = readArray(insaneVarNum,0,0);
     2423
     2424                                        // FIXME: FT Demo has different Insane
    24152425                                        debug(1, "FT_INSANE Mode: %d", insaneMode);
    24162426                                                switch (insaneMode) {
    24172427                                                case 0:
     
    24242434                                                        sp->play("tovista1.san", getGameDataPath());
    24252435                                                        break;
    24262436                                                case 3:
    2427                                                         if (readArray(233,0,50) == 0) {
     2437                                                        if (readArray(insaneVarNum,0,50) == 0) {
    24282438                                                                InfoDialog info(this, "Set MineRoad - You can now jump the gorge.");
    24292439                                                                runDialog(info);
    24302440
    2431                                                                 writeArray(233, 0, 50, 1); // INSANE callback: Chain
    2432                                                                 writeArray(233, 0, 51, 1); // INSANE callback: Chainsaw
    2433                                                                 writeArray(233, 0, 52, 1); // INSANE callback: Mace
    2434                                                                 writeArray(233, 0, 53, 1); // INSANE callback: 2x4
    2435                                                                 writeArray(233, 0, 54, 1); // INSANE callback: Wrench
    2436                                                                 writeArray(233, 0, 55, 1); // INSANE callback: Dust
     2441                                                                writeArray(insaneVarNum, 0, 50, 1); // INSANE callback: Chain
     2442                                                                writeArray(insaneVarNum, 0, 51, 1); // INSANE callback: Chainsaw
     2443                                                                writeArray(insaneVarNum, 0, 52, 1); // INSANE callback: Mace
     2444                                                                writeArray(insaneVarNum, 0, 53, 1); // INSANE callback: 2x4
     2445                                                                writeArray(insaneVarNum, 0, 54, 1); // INSANE callback: Wrench
     2446                                                                writeArray(insaneVarNum, 0, 55, 1); // INSANE callback: Dust
    24372447
    2438                                                                 writeArray(233, 0, 8, 1);  // INSANE callback: Give Googles
    2439                                                                 writeArray(233, 0, 7, 1);  // INSANE callback: Give nitro fuel
     2448                                                                writeArray(insaneVarNum, 0, 8, 1);  // INSANE callback: Give Googles
     2449                                                                writeArray(insaneVarNum, 0, 7, 1);  // INSANE callback: Give nitro fuel
    24402450
    24412451                                                                putState(235, 1);          // Cheat and activate Ramp
    24422452                                                                writeVar(142 | 0x8000, 1); // Cheat and activate auto-booster (fan)
  • scumm/scumm.h

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/scumm.h scummvm/scumm/scumm.h
    old new  
    186186        GID_PUTTDEMO,
    187187        GID_PUTTPUTT,
    188188        GID_PJSDEMO,
    189         GID_MONKEY_SEGA
     189        GID_MONKEY_SEGA,
     190        GID_FTDEMO
    190191};
    191192
    192193#define _maxRooms res.num[rtRoom]
  • scumm/scummvm.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/scummvm.cpp scummvm/scumm/scummvm.cpp
    old new  
    186186        /* Scumm Version 7 */
    187187        {"ft", "Full Throttle", GID_FT, 7, MDT_NONE,
    188188         GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE},
    189         {"ftdemo", "Full Throttle (Mac Demo)", GID_FT, 7, MDT_NONE,
     189        {"ftdemo", "Full Throttle (Demo)", GID_FTDEMO, 7, MDT_NONE,
     190         GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE},
     191        {"ftmacdemo", "Full Throttle (Mac Demo)", GID_FT, 7, MDT_NONE,
    190192         GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE},
    191193
    192194        {"dig", "The Dig", GID_DIG, 7, MDT_NONE,
     
    14851487                // texts have to be drawn before the blast objects. Unless
    14861488                // someone can think of a better way to achieve this effect.
    14871489
    1488                 if (_gameId == GID_FT) {
     1490                if (_gameId == GID_FT || _gameId == GID_FTDEMO) {
    14891491                        drawBlastTexts();
    14901492                        drawBlastObjects();
    14911493                } else {
     
    27682770                        strcpy(detectName2, g->gameName);
    27692771                        if (g->features & GF_HUMONGOUS) {
    27702772                                strcat(detectName2, ".he0");
     2773                        } else if (g->id == GID_FTDEMO) {
     2774                                // FIXME: Now it is not possible to have target file and
     2775                                // main resource file named differently
     2776                                strcpy(detectName, "ft.000");
    27712777                        } else if (g->version >= 7) {
    27722778                                strcat(detectName2, ".la0");
    27732779                        } else
  • scumm/smush/smush_player.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/smush/smush_player.cpp scummvm/scumm/smush/smush_player.cpp
    old new  
    839839                _sf[2] = new SmushFont(true, false);
    840840                _sf[0]->loadFont("scummfnt.nut", directory);
    841841                _sf[2]->loadFont("titlfnt.nut", directory);
     842        } else if (_scumm->_gameId == GID_FTDEMO) {
     843                _sf[0] = new SmushFont(true, false);
     844                _sf[0]->loadFont("scummfnt.nut", directory);
    842845        } else if (_scumm->_gameId == GID_DIG) {
    843846                for (i = 0; i < 4; i++) {
    844847                        sprintf(file_font, "font%d.nut", i);
  • scumm/sound.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/sound.cpp scummvm/scumm/sound.cpp
    old new  
    120120                _scumm->ensureResourceLoaded(rtSound, sound);
    121121                addSoundToQueue2(sound);
    122122        } else {
    123                 // WARNING ! This may break something, maybe this sould be put inside if (_gameID == GID_FT) ?
     123                // WARNING ! This may break something, maybe this sould be put inside if (_gameID == GID_FT || _gameID == GID_FTDEMO) ?
    124124                // But why addSoundToQueue should not queue sound ?
    125125                _scumm->ensureResourceLoaded(rtSound, sound);
    126126                addSoundToQueue2(sound);
  • scumm/string.cpp

    diff -N --exclude CVS --exclude .deps --rec -u scummvm.old/scumm/string.cpp scummvm/scumm/string.cpp
    old new  
    401401        // and never time out. We can't do it blindly for all games, because
    402402        // it causes problem with the FOA intro.
    403403
    404         if (_gameId == GID_FT && a == 4)
     404        if ((_gameId == GID_FT || _gameId == GID_FTDEMO) && a == 4)
    405405                _talkDelay = -1;
    406406
    407407        if (!buf[0]) {