From c7c5f28bdb2f393c1290bcac803cf9fc86ac8ed8 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 6 Oct 2017 22:05:57 -0500 Subject: SCI32: Clean up scriptWidth/scriptHeight/screenWidth/screenHeight This removes the unnecessary Buffer subclass and stops most places where the output buffer was being interrogated about dimensions instead of GfxFrameout. --- engines/sci/event.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sci/event.cpp') diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index e69095a6b1..aef84e212d 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -164,7 +164,7 @@ SciEvent EventManager::getScummVMEvent() { #if ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { - const Buffer &screen = g_sci->_gfxFrameout->getCurrentBuffer(); + const GfxFrameout *gfxFrameout = g_sci->_gfxFrameout; // This will clamp `mousePos` according to the restricted zone, // so any cursor or screen item associated with the mouse position @@ -172,7 +172,7 @@ SciEvent EventManager::getScummVMEvent() { g_sci->_gfxCursor32->deviceMoved(mousePos); Common::Point mousePosSci = mousePos; - mulru(mousePosSci, Ratio(screen.scriptWidth, screen.screenWidth), Ratio(screen.scriptHeight, screen.screenHeight)); + mulru(mousePosSci, Ratio(gfxFrameout->getScriptWidth(), gfxFrameout->getScreenWidth()), Ratio(gfxFrameout->getScriptHeight(), gfxFrameout->getScreenHeight())); noEvent.mousePosSci = input.mousePosSci = mousePosSci; if (_hotRectanglesActive) { -- cgit v1.2.3