[Scummvm-cvs-logs] SF.net SVN: scummvm:[35828] scummvm/trunk/engines/saga/saveload.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jan 11 15:44:29 CET 2009
Revision: 35828
http://scummvm.svn.sourceforge.net/scummvm/?rev=35828&view=rev
Author: thebluegr
Date: 2009-01-11 14:44:29 +0000 (Sun, 11 Jan 2009)
Log Message:
-----------
IHNM save games no longer contain ITE-related variables
Modified Paths:
--------------
scummvm/trunk/engines/saga/saveload.cpp
Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp 2009-01-11 13:17:05 UTC (rev 35827)
+++ scummvm/trunk/engines/saga/saveload.cpp 2009-01-11 14:44:29 UTC (rev 35828)
@@ -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 @@
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 @@
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 @@
int volume = _music->getVolume();
_music->setVolume(0);
- if (getGameId() == GID_ITE)
- _isoMap->setMapPosition(mapx, mapy);
-
#ifdef ENABLE_IHNM
// Protagonist swapping
if (getGameId() == GID_IHNM) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list