From 06fc49166320e592b2fe6afd875a45fc9f57bb63 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 14 Apr 2020 00:27:49 +0200 Subject: [PATCH] GRAPHOCS: MACGUI: Renamed MacWindow::getSurface() to getWindowSurface() --- engines/director/score.cpp | 2 +- engines/macventure/gui.cpp | 24 ++++++++++++------------ engines/wage/gui.cpp | 2 +- graphics/macgui/macwindow.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 70b0114a86a..11dd784a0f0 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -1523,7 +1523,7 @@ void Score::startLoop() { _window->disableBorder(); _window->resize(_movieRect.width(), _movieRect.height()); - _surface = _window->getSurface(); + _surface = _window->getWindowSurface(); _trailSurface = new Graphics::ManagedSurface; _backSurface = new Graphics::ManagedSurface; _backSurface2 = new Graphics::ManagedSurface; diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index d7b640571d2..6db7a1201bd 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -195,7 +195,7 @@ void Gui::draw() { drawDraggedObject(); drawDialog(); // TODO: When window titles with custom borders are in MacGui, this should be used. - //drawWindowTitle(kMainGameWindow, _mainGameWindow->getSurface()); + //drawWindowTitle(kMainGameWindow, _mainGameWindow->getWindowSurface()); } void Gui::drawMenu() { @@ -574,7 +574,7 @@ void Gui::drawWindows() { void Gui::drawCommandsWindow() { if (_engine->needsClickToContinue()) { - Graphics::ManagedSurface *srf = _controlsWindow->getSurface(); + Graphics::ManagedSurface *srf = _controlsWindow->getWindowSurface(); WindowData data = getWindowData(kCommandsWindow); srf->fillRect(Common::Rect(0, 0, srf->w, srf->h), kColorWhite); getCurrentFont().drawString( @@ -590,7 +590,7 @@ void Gui::drawCommandsWindow() { for (; it != _controlData->end(); ++it) { CommandButton button = *it; if (button.getData().type != kControlExitBox) - button.draw(*_controlsWindow->getSurface()); + button.draw(*_controlsWindow->getWindowSurface()); } } } @@ -606,13 +606,13 @@ void Gui::drawMainGameWindow() { ensureAssetLoaded(objRef); _assets[objRef]->blitInto( - _mainGameWindow->getSurface(), + _mainGameWindow->getWindowSurface(), border.leftOffset, border.topOffset, kBlitDirect); } - drawObjectsInWindow(data, _mainGameWindow->getSurface()); + drawObjectsInWindow(data, _mainGameWindow->getWindowSurface()); if (DebugMan.isDebugChannelEnabled(kMVDebugGUI)) { Graphics::MacWindow *win = findWindow(data.refcon); @@ -620,14 +620,14 @@ void Gui::drawMainGameWindow() { int x = win->getDimensions().left; int y = win->getDimensions().top; innerDims.translate(-x, -y); - win->getSurface()->frameRect(innerDims, kColorGreen); + win->getWindowSurface()->frameRect(innerDims, kColorGreen); } findWindow(kMainGameWindow)->setDirty(true); } void Gui::drawSelfWindow() { - drawObjectsInWindow(getWindowData(kSelfWindow), _selfWindow->getSurface()); + drawObjectsInWindow(getWindowData(kSelfWindow), _selfWindow->getWindowSurface()); if (_engine->isObjSelected(1)) { invertWindowColors(kSelfWindow); } @@ -640,7 +640,7 @@ void Gui::drawInventories() { for (uint i = 0; i < _inventoryWindows.size(); i++) { const WindowData &data = getWindowData((WindowReference)(kInventoryStart + i)); Graphics::MacWindow *win = findWindow(data.refcon); - srf = win->getSurface(); + srf = win->getWindowSurface(); srf->clear(kColorGreen); srf->fillRect(srf->getBounds(), kColorWhite); drawObjectsInWindow(data, srf); @@ -661,7 +661,7 @@ void Gui::drawInventories() { void Gui::drawExitsWindow() { _exitsWindow->setBackgroundPattern(kPatternLightGray); - Graphics::ManagedSurface *srf = _exitsWindow->getSurface(); + Graphics::ManagedSurface *srf = _exitsWindow->getWindowSurface(); Common::Array::const_iterator it = _exitsData->begin(); for (; it != _exitsData->end(); ++it) { @@ -674,7 +674,7 @@ void Gui::drawExitsWindow() { void Gui::drawConsoleWindow() { - Graphics::ManagedSurface *srf = _outConsoleWindow->getSurface(); + Graphics::ManagedSurface *srf = _outConsoleWindow->getWindowSurface(); BorderBounds bounds = borderBounds(getWindowData(kOutConsoleWindow).type); _consoleText->renderInto(srf, bounds, kConsoleLeftOffset); } @@ -820,7 +820,7 @@ void Gui::updateWindow(WindowReference winID, bool containerOpen) { drawMainGameWindow(); } else { Graphics::MacWindow *winRef = findWindow(winID); - winRef->getSurface()->fillRect(data.bounds, kColorGray); + winRef->getWindowSurface()->fillRect(data.bounds, kColorGray); } if (data.type == kZoomDoc && data.updateScroll) { warning("Unimplemented: update scroll"); @@ -1240,7 +1240,7 @@ void menuCommandsCallback(int action, Common::String &text, void *data) { void Gui::invertWindowColors(WindowReference winID) { - Graphics::ManagedSurface *srf = findWindow(winID)->getSurface(); + Graphics::ManagedSurface *srf = findWindow(winID)->getWindowSurface(); for (uint y = 0; y < srf->h; y++) { for (uint x = 0; x < srf->w; x++) { byte p = *(byte *)srf->getBasePtr(x, y); diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 8138ff4b6ae..2f527c7214f 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -173,7 +173,7 @@ void Gui::drawScene() { if (!_sceneDirty) return; - _scene->paint(_sceneWindow->getSurface(), 0, 0); + _scene->paint(_sceneWindow->getWindowSurface(), 0, 0); _sceneWindow->setDirty(true); _sceneDirty = true; diff --git a/graphics/macgui/macwindow.h b/graphics/macgui/macwindow.h index 8fbf2ab5e50..eabb55d3f58 100644 --- a/graphics/macgui/macwindow.h +++ b/graphics/macgui/macwindow.h @@ -102,7 +102,7 @@ public: * Method to access the entire surface of the window (e.g. to draw an image). * @return A pointer to the entire surface of the window. */ - ManagedSurface *getSurface() { return &_surface; } + ManagedSurface *getWindowSurface() { return &_surface; } /** * Abstract method for indicating whether the window is active or inactive.