aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-01 00:32:05 +0200
committerEugene Sandulenko2017-08-01 10:42:22 +0200
commit2f5b1f08efe697287c3e28c2cf97eb31996f23a9 (patch)
treeecc39a972c5c2c216aa89dc37e9e61598f276f08 /engines
parent48f07f027655c231117142d012c8d7fdc6808cbd (diff)
downloadscummvm-rg350-2f5b1f08efe697287c3e28c2cf97eb31996f23a9.tar.gz
scummvm-rg350-2f5b1f08efe697287c3e28c2cf97eb31996f23a9.tar.bz2
scummvm-rg350-2f5b1f08efe697287c3e28c2cf97eb31996f23a9.zip
WAGE: Render console text in MacTextWindow
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/gui-console.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp
index 16da99f996..c2f1753ced 100644
--- a/engines/wage/gui-console.cpp
+++ b/engines/wage/gui-console.cpp
@@ -203,12 +203,14 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) {
const Graphics::Font *font = getConsoleFont();
_consoleLineHeight = font->getFontHeight();
- int textW = r.width() - kConWPadding * 2;
- int textH = r.height() - kConHPadding * 2;
if (textReflow)
reflowText();
+#ifndef USE_MACTEXTWINDOW
+ int textW = r.width() - kConWPadding * 2;
+ int textH = r.height() - kConHPadding * 2;
+
const int firstLine = _scrollPos / _consoleLineHeight;
const int lastLine = MIN((_scrollPos + textH) / _consoleLineHeight + 1, _lines.size());
const int xOff = kConWOverlap;
@@ -219,8 +221,6 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) {
if (fullRedraw)
_consoleNumLines = (r.height() - 2 * kConWPadding) / _consoleLineHeight - 2;
-#ifndef USE_MACTEXTWINDOW
-
for (int line = firstLine; line < lastLine; line++) {
const char *str = _lines[line].c_str();
int color = kColorBlack;
@@ -302,8 +302,6 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) {
y1 += _consoleLineHeight;
}
-#endif
-
// Now we need to clip it to the screen
int xcon = r.left - kConOverscan;
int ycon = r.top - kConOverscan;
@@ -326,11 +324,8 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) {
if (rr.bottom > _screen.h - 1)
rr.bottom = _screen.h - 1;
-#ifdef USE_MACTEXTWINDOW
- _consoleWindow->drawText(&_console, 0, 0, boundsR.width(), boundsR.height(), boundsR.left + 7, boundsR.top + 7);
-#endif // USE_MACTEXTWINDOW
-
g->copyRectToSurface(_console, xcon, ycon, boundsR);
+#endif
}
void Gui::drawInput() {