make sure all Text compacts were killed after restoring a savegame

svn-id: r19795
This commit is contained in:
Robert Göffringmann 2005-12-13 15:27:32 +00:00
parent 1f727e0018
commit 31a7c1f073
2 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,8 @@ namespace Common {
enum CptIds {
CPT_JOEY = 1,
CPT_FOSTER = 3,
CPT_TEXT_1 = 0x17,
CPT_TEXT_11 = 0x21,
CPT_MENU_BAR = 0x2E,
CPT_REICH_DOOR_20 = 0x30AB,
CPT_MOVE_LIST = 0xBD,

View File

@ -1396,6 +1396,10 @@ uint16 Control::parseSaveData(uint8 *srcBuf) {
LODSW(srcPos, rawCpt[cnt]);
}
// make sure all text compacts are off
for (cnt = CPT_TEXT_1; cnt <= CPT_TEXT_11; cnt++)
_skyCompact->fetchCpt(cnt)->status = 0;
if (srcPos - srcBuf != (int32)size)
error("Restore failed! Savegame data = %d bytes. Expected size: %d", srcPos-srcBuf, size);