diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/engine.cpp | 6 | ||||
-rw-r--r-- | engines/lab/interface.cpp | 18 | ||||
-rw-r--r-- | engines/lab/intro.cpp | 4 | ||||
-rw-r--r-- | engines/lab/lab.h | 1 | ||||
-rw-r--r-- | engines/lab/map.cpp | 2 | ||||
-rw-r--r-- | engines/lab/special.cpp | 4 |
6 files changed, 17 insertions, 18 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 47d631c95c..bd625be346 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -163,7 +163,7 @@ void LabEngine::eatMessages() { IntuiMessage *msg; do { - msg = getMsg(); + msg = _event->getMsg(); } while (msg); } @@ -503,7 +503,7 @@ void LabEngine::mainGameLoop() { // Make sure we check the music at least after every message _music->updateMusic(); interfaceOn(); - IntuiMessage *curMsg = getMsg(); + IntuiMessage *curMsg = _event->getMsg(); if (!curMsg) { // Does music load and next animation frame when you've run out of messages @@ -645,7 +645,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo while (1) { // Make sure we check the music at least after every message _music->updateMusic(); - curMsg = getMsg(); + curMsg = _event->getMsg(); if (!curMsg) { // Does music load and next animation frame when you've run out of messages diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp index 08a53e2c63..cd062a8ea3 100644 --- a/engines/lab/interface.cpp +++ b/engines/lab/interface.cpp @@ -135,34 +135,34 @@ Gadget *EventManager::checkNumGadgetHit(GadgetList *gadgetList, uint16 key) { return nullptr; } -IntuiMessage *LabEngine::getMsg() { +IntuiMessage *EventManager::getMsg() { static IntuiMessage message; - _event->updateMouse(); + updateMouse(); - int qualifiers = _event->_keyPressed.flags; - Gadget *curgad = _event->mouseGadget(); + int qualifiers = _keyPressed.flags; + Gadget *curgad = mouseGadget(); if (curgad) { - _event->updateMouse(); + updateMouse(); message._msgClass = GADGETUP; message._code = curgad->_gadgetID; message._gadgetID = curgad->_gadgetID; message._qualifier = qualifiers; return &message; - } else if (_event->mouseButton(&message._mouseX, &message._mouseY, true)) { + } else if (mouseButton(&message._mouseX, &message._mouseY, true)) { // Left Button message._qualifier = IEQUALIFIER_LEFTBUTTON | qualifiers; message._msgClass = MOUSEBUTTONS; return &message; - } else if (_event->mouseButton(&message._mouseX, &message._mouseY, false)) { + } else if (mouseButton(&message._mouseX, &message._mouseY, false)) { // Right Button message._qualifier = IEQUALIFIER_RIGHTBUTTON | qualifiers; message._msgClass = MOUSEBUTTONS; return &message; - } else if (_event->keyPress(&message._code)) { + } else if (keyPress(&message._code)) { // Keyboard key - curgad = _event->checkNumGadgetHit(_event->_screenGadgetList, message._code); + curgad = checkNumGadgetHit(_screenGadgetList, message._code); if (curgad) { message._msgClass = GADGETUP; diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 5b170f54a9..2e88132da8 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -50,7 +50,7 @@ Intro::Intro(LabEngine *vm) : _vm(vm) { */ void Intro::introEatMessages() { while (1) { - IntuiMessage *msg = _vm->getMsg(); + IntuiMessage *msg = _vm->_event->getMsg(); if (g_engine->shouldQuit()) { _quitIntro = true; @@ -129,7 +129,7 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { lastMillis = g_system->getMillis(); } - msg = _vm->getMsg(); + msg = _vm->_event->getMsg(); if (msg == NULL) { _vm->_music->updateMusic(); diff --git a/engines/lab/lab.h b/engines/lab/lab.h index 1b98c11c27..eb8db5cbb2 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -184,7 +184,6 @@ public: void changeVolume(int delta); uint16 getDirection() { return _direction; } - IntuiMessage *getMsg(); char *getPictName(CloseDataPtr *closePtrList); uint16 getQuarters(); void setDirection(uint16 direction) { _direction = direction; }; diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index d0dce93388..316334f70e 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -439,7 +439,7 @@ void LabEngine::processMap(uint16 curRoom) { while (1) { // Make sure we check the music at least after every message _music->updateMusic(); - IntuiMessage *msg = getMsg(); + IntuiMessage *msg = _event->getMsg(); if (!msg) { _music->updateMusic(); diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index b68963706f..1fc5c67efd 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -261,7 +261,7 @@ void LabEngine::processJournal() { while (1) { // Make sure we check the music at least after every message _music->updateMusic(); - IntuiMessage *msg = getMsg(); + IntuiMessage *msg = _event->getMsg(); if (msg == NULL) { _music->updateMusic(); @@ -424,7 +424,7 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera // Make sure we check the music at least after every message _music->updateMusic(); - IntuiMessage *msg = getMsg(); + IntuiMessage *msg = _event->getMsg(); if (msg == NULL) { _music->updateMusic(); |