aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-13 15:39:35 -0400
committerPaul Gilbert2016-03-13 15:39:35 -0400
commitb57805bd4b5f9beca9fe6e8e697744c89cad09f3 (patch)
treea7b8f9ffb2c3186e3f86525afe07179b55fa4813 /engines
parent819b773491b728ab0be933ffdcfc333e20d582d3 (diff)
downloadscummvm-rg350-b57805bd4b5f9beca9fe6e8e697744c89cad09f3.tar.gz
scummvm-rg350-b57805bd4b5f9beca9fe6e8e697744c89cad09f3.tar.bz2
scummvm-rg350-b57805bd4b5f9beca9fe6e8e697744c89cad09f3.zip
TITANIC: Added main game event loop
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/titanic.cpp13
-rw-r--r--engines/titanic/titanic.h5
2 files changed, 18 insertions, 0 deletions
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index bcccf1b880..b00e1c3088 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -87,7 +87,20 @@ void TitanicEngine::deinitialize() {
Common::Error TitanicEngine::run() {
initialize();
+ // Main event loop
+ while (!shouldQuit()) {
+ processEvents();
+ g_system->delayMillis(5);
+ }
+
+ deinitialize();
return Common::kNoError;
}
+void TitanicEngine::processEvents() {
+ Common::Event evt;
+ g_system->getEventManager()->pollEvent(evt);
+
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index 978f9b3d4f..ad0ed75165 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -80,6 +80,11 @@ private:
* Handles game deinitialization
*/
void deinitialize();
+
+ /**
+ * Processes pending events
+ */
+ void processEvents();
protected:
const TitanicGameDescription *_gameDescription;
int _loadSaveSlot;