diff options
author | Filippos Karapetis | 2009-11-12 11:47:28 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-11-12 11:47:28 +0000 |
commit | c45c335e0d303bd179beabe9013caf67893768d4 (patch) | |
tree | 7212d1721e53ad7ceda04dd61b58454377f7dee0 | |
parent | ec235d7463c69784fb2de1cdf915279f37a714e1 (diff) | |
download | scummvm-rg350-c45c335e0d303bd179beabe9013caf67893768d4.tar.gz scummvm-rg350-c45c335e0d303bd179beabe9013caf67893768d4.tar.bz2 scummvm-rg350-c45c335e0d303bd179beabe9013caf67893768d4.zip |
Some more tweaks for skipping the menu data in savegames, when INCLUDE_OLDGFX isn't defined (it still problematic and goes out of sync)
svn-id: r45858
-rw-r--r-- | engines/sci/engine/savegame.cpp | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 35f478a010..046d4194d9 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -307,25 +307,33 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { assert(_menubar); _menubar->saveLoadWithSerializer(s); #else + // FIXME: This code goes out of sync when loading. Find out why + // OBSOLETE: Saved menus. Skip all of the saved data - int menuLength = 0; - s.syncAsUint32LE(menuLength); - s.syncString(tmp); // OBSOLETE: Used to be _title - s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _titleWidth - s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _width + int totalMenus = 0; + s.syncAsUint32LE(totalMenus); // Now iterate through the obsolete saved menu data - for (int i = 0; i < menuLength; i++) { - s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _type - s.syncString(tmp); // OBSOLETE: Used to be _keytext - s.skip(4, VER(9), VER(9)); // OBSOLETE: Used to be keytext_size - - s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _flags - s.skip(64, VER(12), VER(12)); // OBSOLETE: Used to be MENU_SAID_SPEC_SIZE - s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _saidPos - s.syncString(tmp); // OBSOLETE: Used to be _text - s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _textPos - s.skip(4 * 4, VER(12), VER(12)); // OBSOLETE: Used to be _modifiers, _key, _enabled and _tag + for (int i = 0; i < totalMenus; i++) { + s.syncString(tmp); // OBSOLETE: Used to be _title + s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _titleWidth + s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _width + + int menuLength = 0; + s.syncAsUint32LE(menuLength); + + for (int j = 0; j < menuLength; j++) { + s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _type + s.syncString(tmp); // OBSOLETE: Used to be _keytext + s.skip(4, VER(9), VER(9)); // OBSOLETE: Used to be keytext_size + + s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _flags + s.skip(64, VER(12), VER(12)); // OBSOLETE: Used to be MENU_SAID_SPEC_SIZE + s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _saidPos + s.syncString(tmp); // OBSOLETE: Used to be _text + s.skip(4, VER(12), VER(12)); // OBSOLETE: Used to be _textPos + s.skip(4 * 4, VER(12), VER(12)); // OBSOLETE: Used to be _modifiers, _key, _enabled and _tag + } } #endif |