diff options
author | Travis Howell | 2006-02-04 08:40:36 +0000 |
---|---|---|
committer | Travis Howell | 2006-02-04 08:40:36 +0000 |
commit | cd24d93f7b5e2235134ede0854d3a95339c54578 (patch) | |
tree | da75e6d41b5cd3e3918f12ce45fda19b9442e7a4 /scumm/sprite_he.cpp | |
parent | 529f2602618e36ce3f578ca356f7a7c97d24d5ac (diff) | |
download | scummvm-rg350-cd24d93f7b5e2235134ede0854d3a95339c54578.tar.gz scummvm-rg350-cd24d93f7b5e2235134ede0854d3a95339c54578.tar.bz2 scummvm-rg350-cd24d93f7b5e2235134ede0854d3a95339c54578.zip |
Save complete tables, was off by one.
svn-id: r20368
Diffstat (limited to 'scumm/sprite_he.cpp')
-rw-r--r-- | scumm/sprite_he.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index 9b1185f6f4..cdcf144ebc 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -1421,9 +1421,15 @@ void Sprite::saveOrLoadSpriteData(Serializer *s) { MKEND() }; - s->saveLoadArrayOf(_activeSpritesTable, _varNumSprites, sizeof(_activeSpritesTable[0]), spriteEntries); - s->saveLoadArrayOf(_spriteTable, _varNumSprites, sizeof(_spriteTable[0]), spriteEntries); - s->saveLoadArrayOf(_spriteGroups, _varNumSpriteGroups, sizeof(_spriteGroups[0]), spriteGroupEntries); + if (s->getVersion() >= VER(64)) { + s->saveLoadArrayOf(_activeSpritesTable, _varNumSprites + 1, sizeof(_activeSpritesTable[0]), spriteEntries); + s->saveLoadArrayOf(_spriteTable, _varNumSprites + 1, sizeof(_spriteTable[0]), spriteEntries); + s->saveLoadArrayOf(_spriteGroups, _varNumSpriteGroups + 1, sizeof(_spriteGroups[0]), spriteGroupEntries); + } else { + s->saveLoadArrayOf(_activeSpritesTable, _varNumSprites, sizeof(_activeSpritesTable[0]), spriteEntries); + s->saveLoadArrayOf(_spriteTable, _varNumSprites, sizeof(_spriteTable[0]), spriteEntries); + s->saveLoadArrayOf(_spriteGroups, _varNumSpriteGroups, sizeof(_spriteGroups[0]), spriteGroupEntries); + } } } // End of namespace Scumm |