aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/saveload.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tsage/saveload.h')
-rw-r--r--engines/tsage/saveload.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h
index 4126e31822..32da6ee7f4 100644
--- a/engines/tsage/saveload.h
+++ b/engines/tsage/saveload.h
@@ -33,7 +33,7 @@ namespace TsAGE {
typedef void (*SaveNotifierFn)(bool postFlag);
-#define TSAGE_SAVEGAME_VERSION 10
+#define TSAGE_SAVEGAME_VERSION 12
class SavedObject;
@@ -48,7 +48,7 @@ struct tSageSavegameHeader {
/*--------------------------------------------------------------------------*/
-// FIXME: workaround to supress spurious strict-alias warnings on older GCC
+// FIXME: workaround to suppress spurious strict-alias warnings on older GCC
// versions. this should be resolved with the savegame rewrite
#define SYNC_POINTER(x) do { \
SavedObject **y = (SavedObject **)((void *)&x); \
@@ -59,7 +59,7 @@ struct tSageSavegameHeader {
if (s.isLoading()) FIELD = (TYPE)v_##FIELD;
/**
- * Derived serializer class with extra synchronisation types
+ * Derived serializer class with extra synchronization types
*/
class Serializer : public Common::Serializer {
public:
@@ -150,6 +150,16 @@ public:
if (i != this->end()) ++i;
this->insert(i, newItem);
}
+
+ bool contains(T item) {
+ typename SynchronizedList<T>::iterator i = this->begin();
+ for (; i != this->end(); ++i) {
+ if (*i == item)
+ return true;
+ }
+
+ return false;
+ }
};
/**
@@ -202,7 +212,6 @@ private:
bool _macroSaveFlag;
bool _macroRestoreFlag;
- int _saveSlot;
void resolveLoadPointers();
public: