aboutsummaryrefslogtreecommitdiff
path: root/engines/composer/saveload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/composer/saveload.cpp')
-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);