diff options
author | Matthew Hoops | 2007-03-22 22:03:21 +0000 |
---|---|---|
committer | Matthew Hoops | 2007-03-22 22:03:21 +0000 |
commit | a722b767a8a24906b512a0381fb49b1bcd59aa92 (patch) | |
tree | a566489e001d00301015ac3d73a85bbc41fe2c58 /engines/agi/savegame.cpp | |
parent | 3daa442c82f0820493dc4e7bb078f44d9f5f0571 (diff) | |
download | scummvm-rg350-a722b767a8a24906b512a0381fb49b1bcd59aa92.tar.gz scummvm-rg350-a722b767a8a24906b512a0381fb49b1bcd59aa92.tar.bz2 scummvm-rg350-a722b767a8a24906b512a0381fb49b1bcd59aa92.zip |
- adding support for saving AGIPAL games
- adding debug comment when using a new AGIPAL palette
- changing so that only pal.101-109 files are used and not pal.100, as AGIPAL starts at 101
svn-id: r26277
Diffstat (limited to 'engines/agi/savegame.cpp')
-rw-r--r-- | engines/agi/savegame.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/agi/savegame.cpp b/engines/agi/savegame.cpp index 8a58d67f58..566f2945b0 100644 --- a/engines/agi/savegame.cpp +++ b/engines/agi/savegame.cpp @@ -36,12 +36,13 @@ #include "agi/keyboard.h" #include "agi/menu.h" -#define SAVEGAME_VERSION 2 +#define SAVEGAME_VERSION 3 /* * Version 0 (Sarien): view table has 64 entries * Version 1 (Sarien): view table has 256 entries (needed in KQ3) * Version 2 (ScummVM): first ScummVM version + * Version 3 (ScummVM): adding AGIPAL save/load support */ namespace Agi { @@ -200,6 +201,10 @@ int AgiEngine::saveGame(const char *fileName, const char *description) { } out->writeByte(0); + //Write which file number AGIPAL is using (0 if not being used) + if ((getFeatures() & GF_AGIPAL)) + out->writeSint16BE(_gfx->getAGIPalFileNum()); + out->finalize(); if (out->ioFailed()) warning("Can't write file '%s'. (Disk full?)", fileName); @@ -434,6 +439,10 @@ int AgiEngine::loadGame(const char *fileName) { parm[3], parm[4], parm[5], parm[6]); } + //Load AGIPAL Data + if ((getFeatures() & GF_AGIPAL) && (saveVersion >= 3)) + _gfx->setAGIPal(in->readSint16BE()); + delete in; debugC(3, kDebugLevelMain | kDebugLevelSavegame, "Closed %s", fileName); |