aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/gui-console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wage/gui-console.cpp')
-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() {