aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.cpp
diff options
context:
space:
mode:
authorMax Horn2008-10-06 12:48:52 +0000
committerMax Horn2008-10-06 12:48:52 +0000
commit6a2f3dc0b984bcd8bd84d98ae456ed57fca740d6 (patch)
tree6c900838c9aacdaa301ce1bab2e75826f9ec67bc /engines/engine.cpp
parent6ca906d7aa4e515d0b0ce9c6a5a38500721d2483 (diff)
downloadscummvm-rg350-6a2f3dc0b984bcd8bd84d98ae456ed57fca740d6.tar.gz
scummvm-rg350-6a2f3dc0b984bcd8bd84d98ae456ed57fca740d6.tar.bz2
scummvm-rg350-6a2f3dc0b984bcd8bd84d98ae456ed57fca740d6.zip
Added new type Engine::Feature; pushed down some #include dependencies
svn-id: r34755
Diffstat (limited to 'engines/engine.cpp')
-rw-r--r--engines/engine.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index c99187d2f2..a17f1e5153 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -31,6 +31,7 @@
#include "engines/engine.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/file.h"
#include "common/timer.h"
#include "common/savefile.h"
@@ -250,13 +251,20 @@ void Engine::quitGame() {
_eventMan->pushEvent(event);
}
-bool Engine::hasFeature(MetaEngine::MetaEngineFeature f) {
- // TODO: In each engine, keep a ref to the corresponding MetaEngine?
+bool Engine::shouldQuit() const {
+ return (_eventMan->shouldQuit() || _eventMan->shouldRTL());
+}
+
+bool Engine::hasFeature(EngineFeature f) {
+ // TODO: Get rid of this hack!!!
+ if (f != kSupportsRTL)
+ return false;
+
const EnginePlugin *plugin = 0;
Common::String gameid = ConfMan.get("gameid");
gameid.toLowercase();
EngineMan.findGame(gameid, &plugin);
assert(plugin);
- return ( (*plugin)->hasFeature(f) );
+ return ( (*plugin)->hasFeature(MetaEngine::kSupportsRTL) );
}