From 5b5efd4cbe4a592c654788c612f7229ee45822a0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 8 Jan 2016 00:45:38 +0200 Subject: LAB: Use the same text rect in monitors for DOS and Windows versions The Windows rectangle looks better than the DOS one, with some small spacing on the top left. This is a minor enhancement, and it does help to make the monitors slightly better. Also, this helps us clean up the monitor code a bit --- engines/lab/engine.cpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'engines/lab') diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index cd47342097..5dffa64c97 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -181,54 +181,41 @@ bool LabEngine::doCloseUp(const CloseData *closePtr) { if (!closePtr) return false; - int luteRight; - Common::Rect textRect; - - if (getPlatform() != Common::kPlatformWindows) { - textRect = Common::Rect(0, 0, 319, 165); - luteRight = 124; - } else { - textRect = Common::Rect(2, 2, 317, 165); - luteRight = 128; - } + Common::Rect textRect(2, 2, 317, 165); + bool isInteractive = false; switch (closePtr->_closeUpType) { case kMonitorMuseum: case kMonitorLibrary: case kMonitorWindow: - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorGramophone: textRect.right = 171; - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorUnicycle: textRect.left = 100; - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorStatue: textRect.left = 117; - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorTalisman: textRect.right = 184; - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorLute: - textRect.right = luteRight; - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); + textRect.right = 128; break; case kMonitorClock: textRect.right = 206; - doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect); break; case kMonitorTerminal: - doMonitor(closePtr->_graphicName, closePtr->_message, true, textRect); + isInteractive = true; break; default: return false; } + doMonitor(closePtr->_graphicName, closePtr->_message, isInteractive, textRect); + _curFileName = " "; _graphics->drawPanel(); -- cgit v1.2.3