aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.h
diff options
context:
space:
mode:
authorMax Horn2008-10-02 17:48:01 +0000
committerMax Horn2008-10-02 17:48:01 +0000
commit3248906156d6fa2bb01c4bfa527aaba379456705 (patch)
tree0e6b02e3e7324eae9a71fbf02524cedf57c46f4e /engines/engine.h
parentc77124ff50dee8864a94a31b4a0f2a588daed445 (diff)
downloadscummvm-rg350-3248906156d6fa2bb01c4bfa527aaba379456705.tar.gz
scummvm-rg350-3248906156d6fa2bb01c4bfa527aaba379456705.tar.bz2
scummvm-rg350-3248906156d6fa2bb01c4bfa527aaba379456705.zip
Engine class changed:
- Moved initCommonGFX() && GUIErrorMessage() out of class Engine - got rid of the _autosavePeriod member (this prevented users from changing the autosave period during runtime) - Got rid of an evil 'using GUI::Dialog' statement - Clarified some Doxygen comments svn-id: r34720
Diffstat (limited to 'engines/engine.h')
-rw-r--r--engines/engine.h55
1 files changed, 28 insertions, 27 deletions
diff --git a/engines/engine.h b/engines/engine.h
index 1f7a3a54e7..dec85885d8 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -25,9 +25,9 @@
#ifndef ENGINES_ENGINE_H
#define ENGINES_ENGINE_H
+#include "common/scummsys.h"
#include "common/events.h"
#include "common/fs.h"
-#include "common/scummsys.h"
#include "common/str.h"
class OSystem;
@@ -45,7 +45,16 @@ namespace GUI {
class Dialog;
}
-using GUI::Dialog;
+/**
+ * Setup the backend's graphics mode.
+ */
+void initCommonGFX(bool defaultTo1XScaler);
+
+/**
+ * Initialized graphics and shows error message.
+ */
+void GUIErrorMessage(const Common::String msg);
+
class Engine {
public:
@@ -57,8 +66,8 @@ protected:
Common::EventManager *_eventMan;
Common::SaveFileManager *_saveFileMan;
- Dialog *_mainMenuDialog;
- virtual int runDialog(Dialog &dialog);
+ GUI::Dialog *_mainMenuDialog;
+ virtual int runDialog(GUI::Dialog &dialog);
const Common::String _targetName; // target name for saves
@@ -66,11 +75,6 @@ protected:
private:
/**
- * The autosave interval, given in second. Used by shouldPerformAutoSave.
- */
- int _autosavePeriod;
-
- /**
* The pause level, 0 means 'running', a positive value indicates
* how often the engine has been paused (and hence how often it has
* to be un-paused before it resumes running). This makes it possible
@@ -79,13 +83,13 @@ private:
int _pauseLevel;
public:
+
/** @name Overloadable methods
*
* All Engine subclasses should consider overloading some or all of the following methods.
*/
//@{
-
Engine(OSystem *syst);
virtual ~Engine();
@@ -114,7 +118,11 @@ public:
*/
virtual GUI::Debugger *getDebugger() { return 0; }
- /** Sync the engine's sound settings with the config manager
+ /**
+ * Notify the engine that the sound settings in the config manager may have
+ * changed and that it hence should adjust any internal volume etc. values
+ * accordingly.
+ * @todo find a better name for this
*/
virtual void syncSoundSettings();
@@ -132,16 +140,17 @@ protected:
public:
/**
- * Quit the engine, sends a Quit event to the Event Manager
+ * Request the engine to quit. Sends a EVENT_QUIT event to the Event
+ * Manager.
*/
void quitGame();
/**
- * Return whether or not the ENGINE should quit
+ * Return whether the ENGINE should quit respectively should return to the
+ * launcher.
*/
bool shouldQuit() const { return (_eventMan->shouldQuit() || _eventMan->shouldRTL()); }
-
/**
* Pause or resume the engine. This should stop/resume any audio playback
* and other stuff. Called right before the system runs a global dialog
@@ -163,7 +172,7 @@ public:
/**
* Run the Global Main Menu Dialog
*/
- void mainMenuDialog();
+ void openMainMenuDialog();
/**
* Determine whether the engine supports the specified MetaEngine feature.
@@ -172,24 +181,16 @@ public:
public:
- /**
- * Setup the backend's graphics mode.
- * @todo Must be public because e.g. Saga's Gfx class wants to invoke it. Move it to a better place?
- */
- void initCommonGFX(bool defaultTo1XScaler);
-
/** On some systems, check if the game appears to be run from CD. */
void checkCD();
- /** Indicate whether an autosave should be performed. */
- bool shouldPerformAutoSave(int lastSaveTime);
+protected:
/**
- * Initialized graphics and shows error message.
- * @todo Move this to a better place (not just engines need to access it, so it neither
- * needs to nor should be contained in class Engine)
+ * Indicate whether an autosave should be performed.
*/
- void GUIErrorMessage(const Common::String msg);
+ bool shouldPerformAutoSave(int lastSaveTime);
+
};
extern Engine *g_engine;