Ticket #9021: kq1_demo_fix.diff

File kq1_demo_fix.diff, 3.2 KB (added by SF/mthreepwood, 15 years ago)

Patch against latest trunk

  • sci.cpp

     
    204204
    205205                if (gamestate->flags & GF_SCI0_OLD ||
    206206                        gamestate->flags & GF_SCI0_OLDGFXFUNCS ||
    207                         gamestate->flags & GF_SCI0_OLDGETTIME) {
     207                        gamestate->flags & GF_SCI0_OLDGETTIME ||
     208                        gamestate->flags & GF_SCI0_NEWVOCAB) {
    208209                        error("This game entry is erroneous. It's marked as SCI1, but it has SCI0 flags set");
    209210                }
    210211        } else if (version == SCI_VERSION_1_1 || version == SCI_VERSION_32) {
     
    217218
    218219                if (gamestate->flags & GF_SCI0_OLD ||
    219220                        gamestate->flags & GF_SCI0_OLDGFXFUNCS ||
    220                         gamestate->flags & GF_SCI0_OLDGETTIME) {
     221                        gamestate->flags & GF_SCI0_OLDGETTIME ||
     222                        gamestate->flags & GF_SCI0_NEWVOCAB) {
    221223                        error("This game entry is erroneous. It's marked as SCI1.1/SCI32, but it has SCI0 flags set");
    222224                }
    223225
  • 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.h

     
    105105        ** Older SCI versions had simpler code for GetTime()
    106106        */
    107107        GF_SCI0_OLDGETTIME              = (1 << 2),
     108       
     109        /* Applies to the King's Quest I Demo
     110        ** This requires the SCI1 vocabulary, but everything else is close to SCI0.
     111        */
     112        GF_SCI0_NEWVOCAB                = (1 << 3),
    108113
    109114        // ----------------------------------------------------------------------------
    110115
     
    115120        /*
    116121        ** Used to distinguish SCI1 EGA games
    117122        */
    118         GF_SCI1_EGA                             = (1 << 3),
     123        GF_SCI1_EGA                             = (1 << 4),
    119124
    120125        /* Applies to all SCI1 versions after 1.000.200
    121126    ** In late SCI1 versions, the argument of lofs[as] instructions
    122127        ** is absolute rather than relative.
    123128        */
    124         GF_SCI1_LOFSABSOLUTE    = (1 << 4),
     129        GF_SCI1_LOFSABSOLUTE    = (1 << 5),
    125130
    126131        /* Applies to all versions from 1.000.510 onwards
    127132        ** kDoSound() is different than in earlier SCI1 versions.
    128133        */
    129         GF_SCI1_NEWDOSOUND              = (1 << 5),
     134        GF_SCI1_NEWDOSOUND              = (1 << 6),
    130135
    131136        /*
    132137        ** Newer SCI1 games (like KQ5 CD and EcoQuest 1) use
    133138        ** different semantics in kSetCursor(), like SCI1.1 games
    134139        */
    135         GF_SCI1_NEWSETCURSOR    = (1 << 6)
     140        GF_SCI1_NEWSETCURSOR    = (1 << 7)
    136141};
    137142
    138143class SciEngine : public Engine {
  • engine/kernel.cpp

     
    627627        switch (resmgr->_sciVersion) {
    628628        case SCI_VERSION_0:
    629629        case SCI_VERSION_01:
    630                 vocabulary_get_knames0(resmgr, names);
     630                // HACK: The KQ1 demo requires the SCI1 vocabulary.
     631                if (((SciEngine*)g_engine)->getFlags() & GF_SCI0_NEWVOCAB)
     632                        vocabulary_get_knames1(resmgr, names);
     633                else
     634                        vocabulary_get_knames0(resmgr, names);
    631635                break;
    632636        case SCI_VERSION_01_VGA:
    633637        case SCI_VERSION_01_VGA_ODD: