diff options
author | Martin Kiewitz | 2016-02-04 22:53:15 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-02-04 22:53:15 +0100 |
commit | 4b7d49dcff2377a6fe95af634bd5a0de5bf78326 (patch) | |
tree | 4313681589e4013ecd8aea97f82222bbf7cdfbcf /engines/agi/saveload.cpp | |
parent | 9f7ff8351bf8fae46f4b06321a6fd9bdfdaa7bd7 (diff) | |
download | scummvm-rg350-4b7d49dcff2377a6fe95af634bd5a0de5bf78326.tar.gz scummvm-rg350-4b7d49dcff2377a6fe95af634bd5a0de5bf78326.tar.bz2 scummvm-rg350-4b7d49dcff2377a6fe95af634bd5a0de5bf78326.zip |
AGI: Fix Hold-Key-Mode implementation
Hold-Key-Mode got introduced v2.425, it was simply not possible
to disable it until 3.098.
Now creating a AGI_KEY_STATIONARY event, so that it works properly
Fixes Mixed Up Mother Goose
Diffstat (limited to 'engines/agi/saveload.cpp')
-rw-r--r-- | engines/agi/saveload.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index c2d9de8bb2..1bf0dbcc02 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -45,7 +45,7 @@ #include "agi/systemui.h" #include "agi/words.h" -#define SAVEGAME_CURRENT_VERSION 7 +#define SAVEGAME_CURRENT_VERSION 8 // // Version 0 (Sarien): view table has 64 entries @@ -59,7 +59,9 @@ // required for some games for quick-loading from ScummVM main menu // for games, that do not set all key mappings right at the start // Added automatic save data (for command SetSimple) -// +// Version 8 (ScummVM): Added Hold-Key-Mode boolean +// required for at least Mixed Up Mother Goose +// gets set at the start of the game only namespace Agi { @@ -195,6 +197,10 @@ int AgiEngine::saveGame(const Common::String &fileName, const Common::String &de out->writeByte(_game.controllerKeyMapping[i].controllerSlot); } + // Version 8+: hold-key-mode + // required for at least Mixed Up Mother Goose + out->writeByte(_keyHoldMode); + // game.ev_keyp for (i = 0; i < MAX_STRINGS; i++) out->write(_game.strings[i], MAX_STRINGLEN); @@ -521,6 +527,15 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) { } } + if (saveVersion >= 8) { + // Version 8+: hold-key-mode + if (in->readByte()) { + _keyHoldMode = true; + } else { + _keyHoldMode = false; + } + } + for (i = 0; i < MAX_STRINGS; i++) in->read(_game.strings[i], MAX_STRINGLEN); |