diff options
author | Filippos Karapetis | 2009-01-11 14:44:29 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-01-11 14:44:29 +0000 |
commit | e399865ee834c9e74325955a8b19574d2ce80fd9 (patch) | |
tree | 815967f0032787e81c5dd8cc86637fbd8c265e45 /engines/saga | |
parent | a266feeb5aee98d6d33adc88dd6b64e6ed544128 (diff) | |
download | scummvm-rg350-e399865ee834c9e74325955a8b19574d2ce80fd9.tar.gz scummvm-rg350-e399865ee834c9e74325955a8b19574d2ce80fd9.tar.bz2 scummvm-rg350-e399865ee834c9e74325955a8b19574d2ce80fd9.zip |
IHNM save games no longer contain ITE-related variables
svn-id: r35828
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/saveload.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp index 94237d6d0b..e908a54ad9 100644 --- a/engines/saga/saveload.cpp +++ b/engines/saga/saveload.cpp @@ -41,7 +41,7 @@ #include "saga/scene.h" #include "saga/script.h" -#define CURRENT_SAGA_VER 6 +#define CURRENT_SAGA_VER 7 namespace Saga { @@ -227,8 +227,11 @@ void SagaEngine::save(const char *fileName, const char *saveName) { out->write(_script->_commonBuffer, _script->_commonBufferSize); - out->writeSint16LE(_isoMap->getMapPosition().x); - out->writeSint16LE(_isoMap->getMapPosition().y); + // ISO map x, y coordinates for ITE + if (getGameId() == GID_ITE) { + out->writeSint16LE(_isoMap->getMapPosition().x); + out->writeSint16LE(_isoMap->getMapPosition().y); + } out->finalize(); @@ -329,8 +332,14 @@ void SagaEngine::load(const char *fileName) { commonBufferSize = in->readSint16LE(); in->read(_script->_commonBuffer, commonBufferSize); - mapx = in->readSint16LE(); - mapy = in->readSint16LE(); + if (getGameId() == GID_ITE) { + mapx = in->readSint16LE(); + mapy = in->readSint16LE(); + _isoMap->setMapPosition(mapx, mapy); + } + // Note: the mapx, mapy ISO map positions were incorrectly saved + // for IHNM too, which has no ISO map scenes, up to save version 6. + // Since they're at the end of the savegame, we just ignore them delete in; @@ -338,9 +347,6 @@ void SagaEngine::load(const char *fileName) { int volume = _music->getVolume(); _music->setVolume(0); - if (getGameId() == GID_ITE) - _isoMap->setMapPosition(mapx, mapy); - #ifdef ENABLE_IHNM // Protagonist swapping if (getGameId() == GID_IHNM) { |