GRAPHOCS: MACGUI: Renamed MacWindow::getSurface() to getWindowSurface()

This commit is contained in:
Eugene Sandulenko
2020-04-14 00:27:49 +02:00
parent e7b2b87acf
commit 06fc491663
4 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -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;
+12 -12
View File
@@ -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<CommandButton>::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);
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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.