Ticket #8461: iq-hack.diff

File iq-hack.diff, 3.9 KB (added by eriktorbjorn, 19 years ago)

Patch against a September 20 CVS snapshot

  • README

    diff -ur ScummVM-cvs20050919/README ScummVM-cvs20050919+hack/README
    old new  
    617617        [ and ]                - Music volume, down/up
    618618        - and +                - Text speed, slower/faster
    619619        F5                     - Displays a save/load box
     620        Alt-F5                 - Displays the original save/load box, if the
     621                                 game has one. This is not intended for saving
     622                                 or loading a game, and may even crash ScummVM
     623                                 in some games, but it is currently the only
     624                                 way to see your IQ points in Indiana Jones and
     625                                 the Last Crusade without dying.
    620626        Space                  - Pauses
    621627        Period (.)             - Skips current line of text in some games
    622628        Enter                  - Simulate left mouse button press
  • doc/05_04.tex

    diff -ur ScummVM-cvs20050919/doc/05_04.tex ScummVM-cvs20050919+hack/doc/05_04.tex
    old new  
    3838    $[$ and $]$                & Music volume, down/up\\
    3939    - and +                & Text speed, slower/faster\\
    4040    F5                     & Displays a save/load box\\
     41    Alt-F5                 & Displays the original save/load box, if the game\\
     42                           & has one. This is not intended for saving or\\
     43                           & loading a game, and may even crash ScummVM in\\
     44                           & some games, but it is currently the only way to\\
     45                           & see your IQ points in Indiana Jones and the Last\\
     46                           & Crusade without dying.\\
    4147    Space                  & Pauses\\
    4248    Period (.)             & Skips current line of text in some games\\
    4349    Enter                  & Simulate left mouse button press\\
  • scumm/input.cpp

    diff -ur ScummVM-cvs20050919/scumm/input.cpp ScummVM-cvs20050919+hack/scumm/input.cpp
    old new  
    233233#endif
    234234
    235235        _lastKeyHit = _keyPressed;
    236         _keyPressed = 0;
     236
    237237        if (((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3)) && 315 <= _lastKeyHit && _lastKeyHit < 315+12) {
    238238                // Convert F-Keys for V1/V2 games (they start at 1 instead of at 315)
    239239                _lastKeyHit -= 314;
    240240        }
    241241
     242        if ((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3))
     243                saveloadkey = 5;        // F5
     244        else if ((_version <= 3) || (_gameId == GID_SAMNMAX) || (_gameId == GID_CMI) || (_heversion >= 72))
     245                saveloadkey = 319;      // F5
     246        else
     247                saveloadkey = VAR(VAR_MAINMENU_KEY);
     248
     249        // Alt-F5 will attempt to call up the original save/load dialog. This
     250        // is not intended for saving or loading games, and may even crash
     251        // ScummVM, but it's currently the only way there is to see your IQ
     252        // points in Indy 3 without dying.
     253
     254        if (_keyPressed == 440) {
     255                if (_gameId == GID_CMI && !(_features & GF_DEMO))
     256                        _lastKeyHit = 315;
     257                else
     258                        _lastKeyHit = saveloadkey;
     259                saveloadkey = -1;
     260        }
     261
     262        _keyPressed = 0;
    242263
    243264        //
    244265        // Clip the mouse coordinates, and compute _virtualMouse.x (and clip it, too)
     
    410431                return;
    411432        }
    412433
    413         if ((_version <= 2) || (_platform == Common::kPlatformFMTowns && _version == 3))
    414                 saveloadkey = 5;        // F5
    415         else if ((_version <= 3) || (_gameId == GID_SAMNMAX) || (_gameId == GID_CMI) || (_heversion >= 72))
    416                 saveloadkey = 319;      // F5
    417         else
    418                 saveloadkey = VAR(VAR_MAINMENU_KEY);
    419 
    420434        if ((_platform == Common::kPlatformC64 && _gameId == GID_MANIAC && _lastKeyHit == 27) ||
    421435                ((VAR(VAR_CUTSCENEEXIT_KEY) == 4 || VAR(VAR_CUTSCENEEXIT_KEY) == 64) && _lastKeyHit == 27) ||
    422436                _lastKeyHit == VAR(VAR_CUTSCENEEXIT_KEY)) {