diff options
author | Simei Yin | 2017-08-03 04:14:35 +0200 |
---|---|---|
committer | Simei Yin | 2017-08-03 04:14:35 +0200 |
commit | 7eade8b0318bd969afce4958e27813956fcd5baa (patch) | |
tree | 161e5341d30eaac69a60ad5317483642215aae30 /engines/sludge | |
parent | bbc781faaad94ad7b7024f98156225062a57dde4 (diff) | |
download | scummvm-rg350-7eade8b0318bd969afce4958e27813956fcd5baa.tar.gz scummvm-rg350-7eade8b0318bd969afce4958e27813956fcd5baa.tar.bz2 scummvm-rg350-7eade8b0318bd969afce4958e27813956fcd5baa.zip |
SLUDGE: Quit game built-in function
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/builtin.cpp | 4 | ||||
-rw-r--r-- | engines/sludge/event.cpp | 3 | ||||
-rw-r--r-- | engines/sludge/event.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp index 01d58a0815..6d7d571638 100644 --- a/engines/sludge/builtin.cpp +++ b/engines/sludge/builtin.cpp @@ -977,11 +977,9 @@ builtIn(callEvent) { return BR_CONTINUE; } -bool reallyWantToQuit = false; - builtIn(quitGame) { UNUSEDALL - reallyWantToQuit = true; + g_sludge->_evtMan->quitGame(); return BR_CONTINUE; } diff --git a/engines/sludge/event.cpp b/engines/sludge/event.cpp index 221140055c..c2997be078 100644 --- a/engines/sludge/event.cpp +++ b/engines/sludge/event.cpp @@ -43,6 +43,7 @@ EventManager::EventManager(SludgeEngine *vm) { _vm = vm; _weAreDoneSoQuit = 0; + _reallyWantToQuit = false; _input.leftClick = _input.rightClick = _input.justMoved = _input.leftRelease = _input.rightRelease = false; _input.keyPressed = 0; @@ -129,7 +130,7 @@ void EventManager::checkInput() { case Common::EVENT_QUIT: _weAreDoneSoQuit = 1; - // TODO: if reallyWantToQuit, popup a message box to confirm + // TODO: if _reallyWantToQuit, popup a message box to confirm break; default: diff --git a/engines/sludge/event.h b/engines/sludge/event.h index ddb973f4ec..691a0daa82 100644 --- a/engines/sludge/event.h +++ b/engines/sludge/event.h @@ -73,6 +73,7 @@ public: void restore(FrozenStuffStruct *frozenStuff); // Quit + void quitGame() { _weAreDoneSoQuit = true; /* _reallyWantToQuit = true; */ } bool quit() { return _weAreDoneSoQuit; } private: @@ -80,6 +81,7 @@ private: InputType _input; int _weAreDoneSoQuit; + bool _reallyWantToQuit; EventHandlers *_currentEvents; }; |