aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.h
diff options
context:
space:
mode:
authorMax Horn2008-11-04 16:11:40 +0000
committerMax Horn2008-11-04 16:11:40 +0000
commit61aadb378d654425d55b8cf9f91df4283b46de7e (patch)
treec087a5576ecc7f707abd68c596cf5d0955708e91 /engines/engine.h
parent70679e68951789f70f57a8b900b51b3cf52979b1 (diff)
downloadscummvm-rg350-61aadb378d654425d55b8cf9f91df4283b46de7e.tar.gz
scummvm-rg350-61aadb378d654425d55b8cf9f91df4283b46de7e.tar.bz2
scummvm-rg350-61aadb378d654425d55b8cf9f91df4283b46de7e.zip
Fixed the EngineFeature vs. MetaEngineFeature mess, clarified some EngineFeature comments
svn-id: r34896
Diffstat (limited to 'engines/engine.h')
-rw-r--r--engines/engine.h76
1 files changed, 40 insertions, 36 deletions
diff --git a/engines/engine.h b/engines/engine.h
index b8904d56c4..5267eec792 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -83,6 +83,39 @@ private:
public:
+
+ /**
+ * A feature in this context means an ability of the engine which can be
+ * either available or not.
+ * @see Engine::hasFeature()
+ */
+ enum EngineFeature {
+ /**
+ * 'Return to launcher' feature is supported, i.e., EVENT_RTL is handled
+ * either directly, or indirectly (that is, the engine calls and honors
+ * the result of the Engine::shouldQuit() method appropriately).
+ */
+ kSupportsRTL,
+
+ /**
+ * Loading savestates during runtime is supported, that is, this engine
+ * implements loadGameState() and canLoadGameStateCurrently().
+ * If this feature is supported, then the corresponding MetaEngine *must*
+ * support the kSupportsListSaves feature.
+ */
+ kSupportsLoadingDuringRuntime,
+
+ /**
+ * Loading savestates during runtime is supported, that is, this engine
+ * implements saveGameState() and canSaveGameStateCurrently().
+ * If this feature is supported, then the corresponding MetaEngine *must*
+ * support the kSupportsListSaves feature.
+ */
+ kSupportsSavingDuringRuntime
+ };
+
+
+
/** @name Overloadable methods
*
* All Engine subclasses should consider overloading some or all of the following methods.
@@ -118,6 +151,13 @@ public:
virtual GUI::Debugger *getDebugger() { return 0; }
/**
+ * Determine whether the engine supports the specified feature.
+ */
+ virtual bool hasFeature(EngineFeature f) const { return false; }
+
+// virtual EnginePlugin *getMetaEnginePlugin() const;
+
+ /**
* 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.
@@ -199,42 +239,6 @@ public:
*/
void openMainMenuDialog();
-
- /**
- * A feature in this context means an ability of the engine which can be
- * either available or not.
- */
- enum EngineFeature {
- /**
- * 'Return to launcher' feature is supported, i.e., EVENT_RTL is handled.
- */
- kSupportsRTL = 0,
-
- /**
- * Listing all Save States for a given target is supported, i.e.,
- * the listSaves() method is implemented.
- * Used for --list-saves support, as well as the GMM load dialog.
- */
- kSupportsListSaves = 1,
-
- /**
- * Loading from the in-game common ScummVM options dialog is supported
- */
- kSupportsLoadingDuringRuntime = 8,
-
- /**
- * Saving from the in-game common ScummVM options dialog is supported
- */
- kSupportsSavingDuringRuntime = 9
- };
-
- /**
- * Determine whether the engine supports the specified feature.
- *
- * @todo Let this return false by default, or even turn it into a pure virtual method.
- */
- bool hasFeature(EngineFeature f);
-
public:
/** On some systems, check if the game appears to be run from CD. */