diff options
author | Willem Jan Palenstijn | 2013-04-18 23:34:29 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:39:44 +0200 |
commit | 01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6 (patch) | |
tree | 544b07f3aa41abe7907bcd2040cdad11ebc324bb /engines/tsage/saveload.h | |
parent | 9cf2c83e5e5a35816ab153bf8443dac691829ea8 (diff) | |
parent | a41d72a44a660c72fdadbc3a8ef580e5e03cb890 (diff) | |
download | scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.gz scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.bz2 scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.zip |
Merge branch 'master'
Diffstat (limited to 'engines/tsage/saveload.h')
-rw-r--r-- | engines/tsage/saveload.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h index c1c2851f28..52b23413d4 100644 --- a/engines/tsage/saveload.h +++ b/engines/tsage/saveload.h @@ -29,11 +29,11 @@ #include "common/savefile.h" #include "common/serializer.h" -namespace tSage { +namespace TsAGE { typedef void (*SaveNotifierFn)(bool postFlag); -#define TSAGE_SAVEGAME_VERSION 5 +#define TSAGE_SAVEGAME_VERSION 7 class SavedObject; @@ -77,6 +77,7 @@ public: Common::Serializer::Version maxVersion = kLastVersion); void validate(int v, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = kLastVersion); + void syncAsDouble(double &v); }; /*--------------------------------------------------------------------------*/ @@ -137,6 +138,18 @@ public: } } } + + void addBefore(T existingItem, T newItem) { + typename SynchronizedList<T>::iterator i = this->begin(); + while ((i != this->end()) && (*i != existingItem)) ++i; + this->insert(i, newItem); + } + void addAfter(T existingItem, T newItem) { + typename SynchronizedList<T>::iterator i = this->begin(); + while ((i != this->end()) && (*i != existingItem)) ++i; + if (i != this->end()) ++i; + this->insert(i, newItem); + } }; /** @@ -219,8 +232,8 @@ public: void listObjects(); }; -extern Saver *_saver; +extern Saver *g_saver; -} // End of namespace tSage +} // End of namespace TsAGE #endif |