LAB: Clean up the event loops of special game screens
This commit is contained in:
parent
816381bbfe
commit
ce5f8f32cb
2 changed files with 80 additions and 76 deletions
|
@ -386,14 +386,16 @@ void LabEngine::processMap(uint16 curRoom) {
|
|||
uint16 curFloor = _maps[curRoom]._pageNumber;
|
||||
|
||||
while (1) {
|
||||
// Make sure we check the music at least after every message
|
||||
updateEvents();
|
||||
IntuiMessage *msg = _event->getMsg();
|
||||
if (shouldQuit()) {
|
||||
_quitLab = true;
|
||||
return;
|
||||
}
|
||||
|
||||
updateEvents();
|
||||
_graphics->screenUpdate();
|
||||
_system->delayMillis(10);
|
||||
|
||||
if (!msg) {
|
||||
updateEvents();
|
||||
|
||||
|
@ -520,7 +522,7 @@ void LabEngine::processMap(uint16 curRoom) {
|
|||
|
||||
_graphics->screenUpdate();
|
||||
}
|
||||
}
|
||||
} // while
|
||||
}
|
||||
|
||||
void LabEngine::doMap() {
|
||||
|
|
|
@ -221,17 +221,19 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
|
|||
|
||||
void LabEngine::processJournal() {
|
||||
while (1) {
|
||||
// Make sure we check the music at least after every message
|
||||
updateEvents();
|
||||
IntuiMessage *msg = _event->getMsg();
|
||||
if (shouldQuit()) {
|
||||
_quitLab = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!msg)
|
||||
updateEvents();
|
||||
else {
|
||||
_graphics->screenUpdate();
|
||||
_system->delayMillis(10);
|
||||
|
||||
if (!msg)
|
||||
continue;
|
||||
|
||||
MessageClass msgClass = msg->_msgClass;
|
||||
|
||||
if ((msgClass == kMessageRightClick) ||
|
||||
|
@ -253,8 +255,7 @@ void LabEngine::processJournal() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // while
|
||||
}
|
||||
|
||||
void LabEngine::doJournal() {
|
||||
|
@ -364,17 +365,19 @@ void LabEngine::processMonitor(const Common::String &ntext, TextFont *monitorFon
|
|||
}
|
||||
}
|
||||
|
||||
updateEvents();
|
||||
_graphics->screenUpdate();
|
||||
_system->delayMillis(10);
|
||||
|
||||
IntuiMessage *msg = _event->getMsg();
|
||||
if (shouldQuit()) {
|
||||
_quitLab = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg) {
|
||||
updateEvents();
|
||||
_graphics->screenUpdate();
|
||||
_system->delayMillis(10);
|
||||
|
||||
if (!msg)
|
||||
continue;
|
||||
|
||||
MessageClass msgClass = msg->_msgClass;
|
||||
|
||||
if ((msgClass == kMessageRightClick) ||
|
||||
|
@ -430,8 +433,7 @@ void LabEngine::processMonitor(const Common::String &ntext, TextFont *monitorFon
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // while
|
||||
}
|
||||
|
||||
void LabEngine::doMonitor(const Common::String background, const Common::String textfile, bool isinteractive, Common::Rect textRect) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue