Patch #1296058: Showing the original save/load dialog (see also RFE #832460)

svn-id: r24832
This commit is contained in:
Max Horn 2006-12-10 14:28:37 +00:00
parent 08c261a5a6
commit 8a32720213
3 changed files with 31 additions and 0 deletions

View file

@ -313,6 +313,12 @@ void ScummEngine::processInput() {
#ifndef DISABLE_SCUMM_7_8
void ScummEngine_v8::processKeyboard(int lastKeyHit) {
// Alt-F5 brings up the original save/load dialog
if (lastKeyHit == 440 && !(_game.features & GF_DEMO)) {
lastKeyHit = 315;
}
// If a key script was specified (a V8 feature), and it's trigger
// key was pressed, run it.
if (_keyScriptNo && (_keyScriptKey == lastKeyHit)) {
@ -435,6 +441,12 @@ void ScummEngine_v2::processKeyboard(int lastKeyHit) {
// Fall back to default behavior
ScummEngine::processKeyboard(lastKeyHit);
}
// Alt-F5 brings up the original save/load dialog
if (lastKeyHit == 440) {
lastKeyHit = 314+5;
}
// Store the input type. So far we can't distinguish
// between 1, 3 and 5.
@ -469,6 +481,13 @@ void ScummEngine::processKeyboard(int lastKeyHit) {
else
saveloadkey = VAR(VAR_MAINMENU_KEY);
// Alt-F5 brings up the original save/load dialog.
if (lastKeyHit == 440 && _game.version > 2 && _game.version < 8) {
lastKeyHit = saveloadkey;
saveloadkey = -1;
}
if (lastKeyHit == saveloadkey) {
if (VAR_SAVELOAD_SCRIPT != 0xFF && _currentRoom != 0)
runScript(VAR(VAR_SAVELOAD_SCRIPT), 0, 0, 0);