diff options
author | Eugene Sandulenko | 2015-01-04 19:48:33 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-01-04 19:48:33 +0100 |
commit | 6c97eb4e366a292e91d143861f36c24b3169e06b (patch) | |
tree | 6bffb4d9e85c2481b3dafc1fdc484f328f794e51 /engines/engine.h | |
parent | 2587852c88e2fbc52bf702f71738e80628eb43fe (diff) | |
parent | 7dc316cced4c7a45a376d76a6ca0c84bd563132f (diff) | |
download | scummvm-rg350-6c97eb4e366a292e91d143861f36c24b3169e06b.tar.gz scummvm-rg350-6c97eb4e366a292e91d143861f36c24b3169e06b.tar.bz2 scummvm-rg350-6c97eb4e366a292e91d143861f36c24b3169e06b.zip |
Merge pull request #554 from eriktorbjorn/tentacle-maniac
SCUMM: Day of the Tentacle easter egg
Diffstat (limited to 'engines/engine.h')
-rw-r--r-- | engines/engine.h | 28 |
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; |