aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-10-12 15:18:03 -0400
committerPaul Gilbert2015-10-12 15:18:03 -0400
commitb0016071ecf3f5ffbc6f1619af610ab648bbba3a (patch)
treef00f6b17bfd3475200e454cdfc09eba94d764f01 /engines/engine.h
parent652a6623156b6c6bba8ca49e038945fd0c2b7780 (diff)
parentfbcf667b6a57593a2b85622ad1e1380c8aef7210 (diff)
downloadscummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.gz
scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.bz2
scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.zip
Merge branch 'msvc_2015' into xeen
Diffstat (limited to 'engines/engine.h')
-rw-r--r--engines/engine.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/engine.h b/engines/engine.h
index e325cc1ba2..d3415d584c 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -27,6 +27,8 @@
#include "common/str.h"
#include "common/language.h"
#include "common/platform.h"
+#include "common/queue.h"
+#include "common/singleton.h"
class OSystem;
@@ -334,6 +336,32 @@ protected:
};
+// Chained games
+
+/**
+ * Singleton class which manages chained games. A chained game is one that
+ * starts automatically, optionally loading a saved game, instead of returning
+ * to the launcher.
+ */
+class ChainedGamesManager : public Common::Singleton<ChainedGamesManager> {
+private:
+ struct Game {
+ Common::String target;
+ int slot;
+ };
+
+ Common::Queue<Game> _chainedGames;
+
+public:
+ ChainedGamesManager();
+ void clear();
+ void push(const Common::String target, const int slot = -1);
+ bool pop(Common::String &target, int &slot);
+};
+
+/** Convenience shortcut for accessing the chained games manager. */
+#define ChainedGamesMan ChainedGamesManager::instance()
+
// FIXME: HACK for MidiEmu & error()
extern Engine *g_engine;