diff options
author | Filippos Karapetis | 2016-01-14 00:59:49 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-01-14 23:41:30 +0200 |
commit | 241c9829f6d5aab5e790a71d30c5a8bca3fcf1e4 (patch) | |
tree | f8c8d3cba954ea5c55d86face8078cb97f6367ee | |
parent | cd2520b79591aa957fd86b8de270e70776b341c4 (diff) | |
download | scummvm-rg350-241c9829f6d5aab5e790a71d30c5a8bca3fcf1e4.tar.gz scummvm-rg350-241c9829f6d5aab5e790a71d30c5a8bca3fcf1e4.tar.bz2 scummvm-rg350-241c9829f6d5aab5e790a71d30c5a8bca3fcf1e4.zip |
LAB: Rename doCloseup() to reflect its actual purpose
-rw-r--r-- | engines/lab/engine.cpp | 23 | ||||
-rw-r--r-- | engines/lab/lab.h | 4 |
2 files changed, 12 insertions, 15 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 8f71dd1296..6c05a7fc47 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -177,14 +177,14 @@ void LabEngine::eatMessages() { } while (msg && !shouldQuit()); } -bool LabEngine::doCloseUp(const CloseData *closePtr) { - if (!closePtr) - return false; +void LabEngine::handleMonitorCloseup() { + if (!_closeDataPtr) + return; Common::Rect textRect(2, 2, 317, 165); bool isInteractive = false; - switch (closePtr->_closeUpType) { + switch (_closeDataPtr->_closeUpType) { case kMonitorMuseum: case kMonitorLibrary: case kMonitorWindow: @@ -211,15 +211,17 @@ bool LabEngine::doCloseUp(const CloseData *closePtr) { isInteractive = true; break; default: - return false; + return; } - doMonitor(closePtr->_graphicName, closePtr->_message, isInteractive, textRect); + doMonitor(_closeDataPtr->_graphicName, _closeDataPtr->_message, isInteractive, textRect); _curFileName = " "; _graphics->drawPanel(); - return true; + _closeDataPtr = nullptr; + mayShowCrumbIndicator(); + _graphics->screenUpdate(); } Common::String LabEngine::getInvName(uint16 curInv) { @@ -414,12 +416,7 @@ void LabEngine::mainGameLoop() { break; } - // Sees what kind of close up we're in and does the appropriate stuff, if any. - if (doCloseUp(_closeDataPtr)) { - _closeDataPtr = nullptr; - mayShowCrumbIndicator(); - _graphics->screenUpdate(); - } + handleMonitorCloseup(); // Sets the current picture properly on the screen if (_mainDisplay) diff --git a/engines/lab/lab.h b/engines/lab/lab.h index 90f5689c51..c3a5d8bce8 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -259,9 +259,9 @@ private: bool doActionRuleSub(int16 action, int16 roomNum, const CloseData *closePtr, bool allowDefaults); /** - * Checks whether the close up is one of the special case closeups. + * Handles monitor closeups */ - bool doCloseUp(const CloseData *closePtr); + void handleMonitorCloseup(); /** * Goes through the rules if the user tries to go forward. |