Merge pull request #657 from lordhoto/scumm-alt-x
ALL: Handle Alt-x internally in SCUMM.
This commit is contained in:
commit
68ff933206
4 changed files with 17 additions and 8 deletions
5
NEWS
5
NEWS
|
@ -19,6 +19,10 @@ For a more comprehensive changelog of the latest experimental code, see:
|
||||||
General:
|
General:
|
||||||
- Updated Munt MT-32 emulation code to version 1.5.0.
|
- Updated Munt MT-32 emulation code to version 1.5.0.
|
||||||
|
|
||||||
|
SDL:
|
||||||
|
- Alt-x no longer quits ScummVM on platforms exhibiting this behavior
|
||||||
|
before. A notable example is our Windows port.
|
||||||
|
|
||||||
3 Skulls of the Toltecs:
|
3 Skulls of the Toltecs:
|
||||||
- Improved AdLib music support.
|
- Improved AdLib music support.
|
||||||
|
|
||||||
|
@ -73,6 +77,7 @@ For a more comprehensive changelog of the latest experimental code, see:
|
||||||
- Implemented original Maniac Mansion v0-v1 walking code.
|
- Implemented original Maniac Mansion v0-v1 walking code.
|
||||||
- It is now possible to play Maniac Mansion from within Day of the
|
- It is now possible to play Maniac Mansion from within Day of the
|
||||||
Tentacle, with a few caveats. See README for details.
|
Tentacle, with a few caveats. See README for details.
|
||||||
|
- Alt-x can now be used to quit SCUMM games on all platforms.
|
||||||
|
|
||||||
Tinsel:
|
Tinsel:
|
||||||
- Improved AdLib music support in Discworld 1.
|
- Improved AdLib music support in Discworld 1.
|
||||||
|
|
3
README
3
README
|
@ -1487,7 +1487,7 @@ other games.
|
||||||
Ctrl-F5 - Displays the Global Menu
|
Ctrl-F5 - Displays the Global Menu
|
||||||
Cmd-q - Quit (Mac OS X)
|
Cmd-q - Quit (Mac OS X)
|
||||||
Ctrl-q - Quit (other unices including Linux)
|
Ctrl-q - Quit (other unices including Linux)
|
||||||
Ctrl-z OR Alt-x - Quit (other platforms)
|
Ctrl-z - Quit (other platforms)
|
||||||
Ctrl-u - Mute all sounds
|
Ctrl-u - Mute all sounds
|
||||||
Ctrl-m - Toggle mouse capture
|
Ctrl-m - Toggle mouse capture
|
||||||
Ctrl-Alt 1-8 - Switch between graphics filters
|
Ctrl-Alt 1-8 - Switch between graphics filters
|
||||||
|
@ -1505,6 +1505,7 @@ other games.
|
||||||
of the middle mouse button or wheel.
|
of the middle mouse button or wheel.
|
||||||
|
|
||||||
SCUMM:
|
SCUMM:
|
||||||
|
Alt-x - Quit
|
||||||
Ctrl 0-9 and Alt 0-9 - Load and save game state
|
Ctrl 0-9 and Alt 0-9 - Load and save game state
|
||||||
Ctrl-d - Starts the debugger
|
Ctrl-d - Starts the debugger
|
||||||
Ctrl-f - Toggle fast mode
|
Ctrl-f - Toggle fast mode
|
||||||
|
|
|
@ -545,8 +545,8 @@ bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Ctrl-z and Alt-X quit
|
// Ctrl-z quits
|
||||||
if ((event.kbd.hasFlags(Common::KBD_CTRL) && ev.key.keysym.sym == 'z') || (event.kbd.hasFlags(Common::KBD_ALT) && ev.key.keysym.sym == 'x')) {
|
if ((event.kbd.hasFlags(Common::KBD_CTRL) && ev.key.keysym.sym == 'z')) {
|
||||||
event.type = Common::EVENT_QUIT;
|
event.type = Common::EVENT_QUIT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -603,11 +603,6 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
|
||||||
#if defined(MACOSX)
|
#if defined(MACOSX)
|
||||||
if ((mod & KMOD_META) && ev.key.keysym.sym == 'q')
|
if ((mod & KMOD_META) && ev.key.keysym.sym == 'q')
|
||||||
return false; // On Macintosh, Cmd-Q quits
|
return false; // On Macintosh, Cmd-Q quits
|
||||||
#elif defined(POSIX)
|
|
||||||
// Control Q has already been handled above
|
|
||||||
#else
|
|
||||||
if ((mod & KMOD_ALT) && ev.key.keysym.sym == 'x')
|
|
||||||
return false; // Alt-x quit
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If we reached here, this isn't an event handled by handleKeyDown(), thus
|
// If we reached here, this isn't an event handled by handleKeyDown(), thus
|
||||||
|
|
|
@ -130,6 +130,14 @@ void ScummEngine::parseEvent(Common::Event event) {
|
||||||
_debugger->attach();
|
_debugger->attach();
|
||||||
} else if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_s) {
|
} else if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_s) {
|
||||||
_res->resourceStats();
|
_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 {
|
} else {
|
||||||
// Normal key press, pass on to the game.
|
// Normal key press, pass on to the game.
|
||||||
_keyPressed = event.kbd;
|
_keyPressed = event.kbd;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue