Skip to content

Commit

Permalink
SCUMM: Allow Alt-x to be used to quit SCUMM games.
Browse files Browse the repository at this point in the history
This includes a TODO to check which SCUMM games actually exhibit this behavior
originally. cbd8673 added this behavior to our
backend code initially.
  • Loading branch information
Johannes Schickel committed Jan 29, 2016
1 parent 1e73796 commit 3b73408
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -65,6 +65,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Implemented original Maniac Mansion v0-v1 walking code.
- It is now possible to play Maniac Mansion from within Day of the
Tentacle, with a few caveats. See README for details.
- Alt-x can now be used to quit SCUMM games on all platforms.

Tinsel:
- Improved AdLib music support in Discworld 1.
Expand Down
1 change: 1 addition & 0 deletions README
Expand Up @@ -1505,6 +1505,7 @@ other games.
of the middle mouse button or wheel.

SCUMM:
Alt-x - Quit
Ctrl 0-9 and Alt 0-9 - Load and save game state
Ctrl-d - Starts the debugger
Ctrl-f - Toggle fast mode
Expand Down
8 changes: 8 additions & 0 deletions engines/scumm/input.cpp
Expand Up @@ -130,6 +130,14 @@ void ScummEngine::parseEvent(Common::Event event) {
_debugger->attach();
} else if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_s) {
_res->resourceStats();
} else if (event.kbd.hasFlags(Common::KBD_ALT) && event.kbd.keycode == Common::KEYCODE_x) {
// TODO: Some SCUMM games quit when Alt-x is pressed. However, not
// all of them seem to exhibit this behavior. LordHoto found that
// the Loom manual does not mention this hotkey. On the other hand
// the Sam&Max manual mentions that Alt-x does so on "most"
// platforms. We should really check which games exhibit this
// behavior and only use it for them.
quitGame();
} else {
// Normal key press, pass on to the game.
_keyPressed = event.kbd;
Expand Down

0 comments on commit 3b73408

Please sign in to comment.