diff options
author | Strangerke | 2015-12-17 18:35:53 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:07 +0100 |
commit | 054a7a1e19ffb3d5f5d298c0af3e0e33435d5ed7 (patch) | |
tree | 5fb642f27baaf9d7ebbea1b5cd1900f9034edab7 /engines/lab/engine.cpp | |
parent | 605c2e553bd9b8421af643491a7855d8c2cd4710 (diff) | |
download | scummvm-rg350-054a7a1e19ffb3d5f5d298c0af3e0e33435d5ed7.tar.gz scummvm-rg350-054a7a1e19ffb3d5f5d298c0af3e0e33435d5ed7.tar.bz2 scummvm-rg350-054a7a1e19ffb3d5f5d298c0af3e0e33435d5ed7.zip |
LAB: Use Common::Rect in functions related to flowText (WIP)
Diffstat (limited to 'engines/lab/engine.cpp')
-rw-r--r-- | engines/lab/engine.cpp | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index f82c7cc790..c79197a35a 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -198,46 +198,55 @@ bool LabEngine::doCloseUp(CloseDataPtr closePtr) { if (!closePtr) return false; - int monltmargin, monrtmargin, montopmargin, lutertmargin; + int luteRight; + Common::Rect textRect; if (getPlatform() != Common::kPlatformWindows) { - monltmargin = 0; - monrtmargin = 319; - montopmargin = 0; - lutertmargin = 124; + textRect.left = 0; + textRect.right = 319; + textRect.top = 0; + textRect.bottom = 165; + luteRight = 124; } else { - monltmargin = 2; - monrtmargin = 317; - montopmargin = 2; - lutertmargin = 128; + textRect.left = 2; + textRect.right = 317; + textRect.top = 2; + textRect.bottom = 165; + luteRight = 128; } switch (closePtr->_closeUpType) { case kMonitorMuseum: case kMonitorLibrary: case kMonitorWindow: - doMonitor(closePtr->_graphicName, closePtr->_message, false, monltmargin, montopmargin, monrtmargin, 165); + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorGramophone: - doMonitor(closePtr->_graphicName, closePtr->_message, false, monltmargin, montopmargin, 171, 165); + textRect.right = 171; + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorUnicycle: - doMonitor(closePtr->_graphicName, closePtr->_message, false, 100, montopmargin, monrtmargin, 165); + textRect.left = 100; + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorStatue: - doMonitor(closePtr->_graphicName, closePtr->_message, false, 117, montopmargin, monrtmargin, 165); + textRect.left = 117; + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorTalisman: - doMonitor(closePtr->_graphicName, closePtr->_message, false, monltmargin, montopmargin, 184, 165); + textRect.right = 184; + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorLute: - doMonitor(closePtr->_graphicName, closePtr->_message, false, monltmargin, montopmargin, lutertmargin, 165); + textRect.right = luteRight; + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorClock: - doMonitor(closePtr->_graphicName, closePtr->_message, false, monltmargin, montopmargin, 206, 165); + textRect.right = 206; + doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorTerminal: - doMonitor(closePtr->_graphicName, closePtr->_message, true, monltmargin, montopmargin, monrtmargin, 165); + doMonitor(closePtr->_graphicName, closePtr->_message, true, textRect); break; default: return false; |