diff options
author | Travis Howell | 2003-07-14 07:26:57 +0000 |
---|---|---|
committer | Travis Howell | 2003-07-14 07:26:57 +0000 |
commit | 085d14a8c81b1324cba45e301fa44046f4daf29b (patch) | |
tree | b60caed0086eca3a223aec4bb302015ef6dcbad3 /scumm | |
parent | 73365aa2c7e225fcc7558e1e8482e5c2fd4f3212 (diff) | |
download | scummvm-rg350-085d14a8c81b1324cba45e301fa44046f4daf29b.tar.gz scummvm-rg350-085d14a8c81b1324cba45e301fa44046f4daf29b.tar.bz2 scummvm-rg350-085d14a8c81b1324cba45e301fa44046f4daf29b.zip |
Redraw screen when loading v1 saved game
svn-id: r9000
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/saveload.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 5123a2091a..02b8c36dad 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -85,6 +85,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) { int i, j; SaveGameHeader hdr; int sb, sh; + byte *roomptr; makeSavegameName(filename, slot, compat); if (!(out = mgr->open_savefile(filename, false))) @@ -192,8 +193,20 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) { initBGBuffers(_roomHeight); - if (_version == 2) { - // Regenerate strip table when loading + // Regenerate strip table when loading + if (_version == 1) { + roomptr = getResourceAddress(rtRoom, _roomResource); + _IM00_offs = 0; + for (i = 0; i < 4; i++){ + gdi._C64Colors[i] = roomptr[6 + i]; + } + gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 10), gdi._C64CharMap, 2048); + gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 12), gdi._C64PicMap, roomptr[4] * roomptr[5]); + gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 14), gdi._C64ColorMap, roomptr[4] * roomptr[5]); + gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 16), gdi._C64MaskMap, roomptr[4] * roomptr[5]); + gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 18) + 2, gdi._C64MaskChar, READ_LE_UINT16(roomptr + READ_LE_UINT16(roomptr + 18))); + gdi._C64ObjectMode = true; + } else if (_version == 2) { _roomStrips = gdi.generateStripTable(getResourceAddress(rtRoom, _roomResource) + _IM00_offs, _roomWidth, _roomHeight, _roomStrips); } |