Ticket #9021: kq1_demo_fix_v2.diff

File kq1_demo_fix_v2.diff, 3.1 KB (added by SF/mthreepwood, 15 years ago)

Patch for r41051

  • vocabulary.cpp

     
    953953        switch (_resmgr->_sciVersion) {
    954954        case SCI_VERSION_0:
    955955        case SCI_VERSION_01:
    956                 vocab_get_knames0(_resmgr, _kernelNames);
     956                // HACK: The KQ1 demo requires the SCI1 vocabulary.
     957                if (((SciEngine*)g_engine)->getFlags() & GF_SCI0_NEWVOCAB)
     958                        vocab_get_knames1(_resmgr, _kernelNames);
     959                else
     960                        vocab_get_knames0(_resmgr, _kernelNames);
    957961                break;
    958962        case SCI_VERSION_01_VGA:
    959963        case SCI_VERSION_01_VGA_ODD:
  • detection.cpp

     
    950950                {"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954},
    951951                {"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555},
    952952                {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO},
    953                 0,
     953                GF_SCI0_NEWVOCAB,
    954954                SCI_VERSION_AUTODETECT,
    955                 SCI_VERSION_01
     955                SCI_VERSION_0
    956956        },
    957957
    958958        // King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection)
  • sci.cpp

     
    164164
    165165                if (gamestate->flags & GF_SCI0_OLD ||
    166166                        gamestate->flags & GF_SCI0_OLDGFXFUNCS ||
    167                         gamestate->flags & GF_SCI0_OLDGETTIME) {
     167                        gamestate->flags & GF_SCI0_OLDGETTIME ||
     168                        gamestate->flags & GF_SCI0_NEWVOCAB) {
    168169                        error("This game entry is erroneous. It's marked as SCI1, but it has SCI0 flags set");
    169170                }
    170171        } else if (version == SCI_VERSION_1_1 || version == SCI_VERSION_32) {
     
    176177
    177178                if (gamestate->flags & GF_SCI0_OLD ||
    178179                        gamestate->flags & GF_SCI0_OLDGFXFUNCS ||
    179                         gamestate->flags & GF_SCI0_OLDGETTIME) {
     180                        gamestate->flags & GF_SCI0_OLDGETTIME ||
     181                        gamestate->flags & GF_SCI0_NEWVOCAB) {
    180182                        error("This game entry is erroneous. It's marked as SCI1.1/SCI32, but it has SCI0 flags set");
    181183                }
    182184
  • sci.h

     
    108108        ** Older SCI versions had simpler code for GetTime()
    109109        */
    110110        GF_SCI0_OLDGETTIME              = (1 << 2),
     111       
     112        /* Applies to the King's Quest I Demo
     113        ** This requires the SCI1 vocabulary, but everything else is close to SCI0.
     114        */
     115        GF_SCI0_NEWVOCAB                = (1 << 3),
    111116
    112117        // ----------------------------------------------------------------------------
    113118
     
    118123        /*
    119124        ** Used to distinguish SCI1 EGA games
    120125        */
    121         GF_SCI1_EGA                             = (1 << 3),
     126        GF_SCI1_EGA                             = (1 << 4),
    122127
    123128        /* Applies to all SCI1 versions after 1.000.200
    124129    ** In late SCI1 versions, the argument of lofs[as] instructions
    125130        ** is absolute rather than relative.
    126131        */
    127         GF_SCI1_LOFSABSOLUTE    = (1 << 4),
     132        GF_SCI1_LOFSABSOLUTE    = (1 << 5),
    128133
    129134        /* Applies to all versions from 1.000.510 onwards
    130135        ** kDoSound() is different than in earlier SCI1 versions.
    131136        */
    132         GF_SCI1_NEWDOSOUND              = (1 << 5)
     137        GF_SCI1_NEWDOSOUND              = (1 << 6)
    133138};
    134139
    135140class SciEngine : public Engine {