diff options
author | Vladimir Menshakov | 2011-06-12 18:58:00 +0400 |
---|---|---|
committer | Alyssa Milburn | 2011-06-15 17:34:22 +0200 |
commit | 4ba74f73e1315430de0d86e3712a8ad2298f16f8 (patch) | |
tree | ffd3fa4448e8d378a8e80e76db609120997b2b0d /engines | |
parent | 04ee3aefae8ced07e69f42490859b3408d2c8cd8 (diff) | |
download | scummvm-rg350-4ba74f73e1315430de0d86e3712a8ad2298f16f8.tar.gz scummvm-rg350-4ba74f73e1315430de0d86e3712a8ad2298f16f8.tar.bz2 scummvm-rg350-4ba74f73e1315430de0d86e3712a8ad2298f16f8.zip |
DREAMWEB: moved quit() into engine's method
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 17 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.h | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 60462dc463..68cb902ea1 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -102,13 +102,18 @@ void DreamWebEngine::waitForVSync() { _system->updateScreen(); } +void DreamWebEngine::quit() { + warning("Engine should quit gracefully (but doesn't yet)"); + g_system->quit(); +} + void DreamWebEngine::processEvents() { Common::EventManager *event_manager = _system->getEventManager(); - Common::Event event; if (event_manager->shouldQuit()) { - warning("Engine should quit gracefully (but doesn't yet)"); - g_system->quit(); + quit(); + return; } + Common::Event event; while (event_manager->pollEvent(event)) { switch(event.type) { case Common::EVENT_LBUTTONDOWN: @@ -407,13 +412,11 @@ void randomnumber(Context &context) { } void quickquit(Context &context) { - assert(0); - ::error("quickquit"); + context.engine->quit(); } void quickquit2(Context &context) { - assert(0); - ::error("quickquit2"); + context.engine->quit(); } void keyboardread(Context &context) { diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 8cd489cc7e..455791d2c3 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -97,6 +97,8 @@ public: void setShakePos(int pos) { _system->setShakePos(pos); } + void quit(); + private: void keyPressed(uint16 ascii); |