From 31a7c1f0739865556a0f4d1f322508a38ebd553d Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Tue, 13 Dec 2005 15:27:32 +0000 Subject: make sure all Text compacts were killed after restoring a savegame svn-id: r19795 --- sky/compact.h | 2 ++ sky/control.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/sky/compact.h b/sky/compact.h index 26eedbbdf1..20634855a8 100644 --- a/sky/compact.h +++ b/sky/compact.h @@ -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, diff --git a/sky/control.cpp b/sky/control.cpp index f0f2bb4d02..90adcf7f05 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -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); -- cgit v1.2.3