aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/various.h
diff options
context:
space:
mode:
authorKari Salminen2008-07-22 10:15:58 +0000
committerKari Salminen2008-07-22 10:15:58 +0000
commit2a90435e5dccc0085613e35cc7177d1766cea6d0 (patch)
treef803f0d048754e9733925a63ab345cab7d05ce14 /engines/cine/various.h
parent446a0406de97dba9417df8f82c4363cd3542a64b (diff)
downloadscummvm-rg350-2a90435e5dccc0085613e35cc7177d1766cea6d0.tar.gz
scummvm-rg350-2a90435e5dccc0085613e35cc7177d1766cea6d0.tar.bz2
scummvm-rg350-2a90435e5dccc0085613e35cc7177d1766cea6d0.zip
Fix for bug #2019355 (FW: broken compatibility with 0.11.1 saves):
- Changed savegame loading related functions to use SeekableReadStream rather than InSaveFile so MemoryReadStream can be used transparently. - Fixed loadResourcesFromSave to load multiframe animations correctly and to load 0.11.0/0.11.1 Future Wars savegames which used a slightly different format. - Added a savegame format detector that tries to detect between the old Future Wars savegame format, the new one and a broken revision of the new one. - Changed makeLoad to first load the savegame fully into memory and only then handle it (If the savegame's packed then it's unpacked first). If the packed savegame can't tell its unpacked size (i.e. it's using zlib format) then we'll try to load up to 256kB of the savegame data. Thanks to wjp for his help with nailing this release critical bug. svn-id: r33192
Diffstat (limited to 'engines/cine/various.h')
-rw-r--r--engines/cine/various.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/cine/various.h b/engines/cine/various.h
index 840f1674a2..9507876307 100644
--- a/engines/cine/various.h
+++ b/engines/cine/various.h
@@ -33,6 +33,39 @@
namespace Cine {
+/**
+ * Cine engine's save game formats.
+ * Enumeration entries (Excluding the one used as an error)
+ * are sorted according to age (i.e. top one is oldest, last one newest etc).
+ *
+ * ANIMSIZE_UNKNOWN:
+ * - Animation data entry size is unknown (Used as an error).
+ *
+ * ANIMSIZE_23:
+ * - Animation data entry size is 23 bytes.
+ * - Used at least by 0.11.0 and 0.11.1 releases of ScummVM.
+ * - Introduced in revision 21772, stopped using in revision 31444.
+ *
+ * ANIMSIZE_30_PTRS_BROKEN:
+ * - Animation data entry size is 30 bytes.
+ * - Data and mask pointers in the saved structs are always NULL.
+ * - Introduced in revision 31453, stopped using in revision 32073.
+ *
+ * ANIMSIZE_30_PTRS_INTACT:
+ * - Animation data entry size is 30 bytes.
+ * - Data and mask pointers in the saved structs are intact,
+ * so you can test them for equality or inequality with NULL
+ * but don't try using them for anything else, it won't work.
+ * - Introduced in revision 31444, got broken in revision 31453,
+ * got fixed in revision 32073 and used after that.
+ */
+enum CineSaveGameFormat {
+ ANIMSIZE_UNKNOWN,
+ ANIMSIZE_23,
+ ANIMSIZE_30_PTRS_BROKEN,
+ ANIMSIZE_30_PTRS_INTACT
+};
+
void initLanguage(Common::Language lang);
int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue = false);