diff options
Diffstat (limited to 'engines/engine.h')
-rw-r--r-- | engines/engine.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/engine.h b/engines/engine.h index 73d529cc62..278c259ea8 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -25,6 +25,7 @@ #ifndef ENGINES_ENGINE_H #define ENGINES_ENGINE_H +#include "common/events.h" #include "common/scummsys.h" #include "common/str.h" @@ -39,17 +40,25 @@ namespace Common { } namespace GUI { class Debugger; + class Dialog; } +using GUI::Dialog; + class Engine { public: OSystem *_system; Audio::Mixer *_mixer; Common::TimerManager * _timer; + bool _quit, _rtl; + protected: Common::EventManager *_eventMan; Common::SaveFileManager *_saveFileMan; + + Dialog *_mainMenuDialog; + virtual int runDialog(Dialog &dialog); const Common::String _targetName; // target name for saves const Common::String _gameDataPath; @@ -109,10 +118,28 @@ public: void pauseEngine(bool pause); /** + * Quit the engine, sends a Quit event to the Event Manager + */ + void quitGame(); + + /** * Return whether the engine is currently paused or not. */ bool isPaused() const { return _pauseLevel != 0; } + /** + * Return whether or not the ENGINE should quit + */ + bool quit() const { return (_eventMan->shouldQuit() || _eventMan->shouldRTL()); } + + /** Run the Global Main Menu Dialog + */ + virtual void mainMenuDialog(); + + /** Sync the engine's sound settings with the config manager + */ + virtual void syncSoundSettings(); + public: /** Setup the backend's graphics mode. */ |