aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorupthorn2012-05-26 23:23:44 -0700
committerangstsmurf2016-10-18 02:09:04 +0200
commit70220384cd726131b099ee4eb801c9a0f617a8bd (patch)
treeb7fdc7d4620eb888b3e765781c181b3bfc596aeb /engines
parent2b58f42b8c35e002a19acd60755ef2c62d32a042 (diff)
downloadscummvm-rg350-70220384cd726131b099ee4eb801c9a0f617a8bd.tar.gz
scummvm-rg350-70220384cd726131b099ee4eb801c9a0f617a8bd.tar.bz2
scummvm-rg350-70220384cd726131b099ee4eb801c9a0f617a8bd.zip
COMPOSER: game saving/loading now actually works
Diffstat (limited to 'engines')
-rw-r--r--engines/composer/saveload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/composer/saveload.cpp b/engines/composer/saveload.cpp
index c9437d230d..ce0a60b04b 100644
--- a/engines/composer/saveload.cpp
+++ b/engines/composer/saveload.cpp
@@ -154,7 +154,6 @@ Common::Error ComposerEngine::loadGameState(int slot) {
ser.syncAsByte(_mouseEnabled);
ser.syncAsByte(_mouseVisible);
ser.syncAsUint16LE(_mouseSpriteId);
- _dirtyRects.clear();
for (Common::List<Pipe *>::iterator i = _pipes.begin(); i != _pipes.end(); i++) {
delete *i;
@@ -174,10 +173,11 @@ Common::Error ComposerEngine::loadGameState(int slot) {
Common::SeekableReadStream *stream = getResource(ID_ANIM, id);
Pipe *pipe = new Pipe(stream, id);
pipe->setOffset(offset);
- _pipes.push_back(pipe);
+ _pipes.push_front(pipe);
_pipeStreams.push_back(stream);
}
+ _dirtyRects.clear();
_dirtyRects.push_back(Common::Rect(0, 0, 640, 480));
byte palbuf[256 * 3];
ser.syncBytes(palbuf, 256 * 3);
@@ -206,7 +206,7 @@ Common::Error ComposerEngine::saveGameState(int slot, const Common::String &desc
ser.syncString(_bookGroup);
tmp = _libraries.size();
ser.syncAsUint32LE(tmp);
- for (Common::List<Library>::const_iterator i = _libraries.begin(); i != _libraries.end(); i++) {
+ for (Common::List<Library>::const_iterator i = _libraries.reverse_begin(); i != _libraries.end(); i--) {
uint16 tmp = (*i)._id;
ser.syncAsUint16LE(tmp);
}
@@ -280,7 +280,7 @@ Common::Error ComposerEngine::saveGameState(int slot, const Common::String &desc
tmp = _pipes.size();
ser.syncAsUint32LE(tmp);
- for (Common::List<Pipe *>::const_iterator i = _pipes.begin(); i != _pipes.end(); i++) {
+ for (Common::List<Pipe *>::const_iterator i = _pipes.reverse_begin(); i != _pipes.end(); i--) {
uint16 tmp16 = (*i)->id();
tmp = (*i)->offset();
ser.syncAsUint16LE(tmp16);