aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/toon/font.cpp')
-rw-r--r--engines/toon/font.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 8455ca7b61..53786f8617 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -81,6 +81,8 @@ void FontRenderer::renderText(int32 x, int32 y, Common::String origText, int32 m
x -= xx / 2;
}
+ _vm->addDirtyRect(x,y,x+xx,y+yy);
+
int32 curX = x;
int32 curY = y;
int32 height = 0;
@@ -270,9 +272,13 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, Common::String origText
int32 curX = x;
int32 curY = y;
+
+
for (int32 i = 0; i < numLines; i++) {
const byte *line = lines[i];
curX = x - lineSize[i] / 2;
+ _vm->addDirtyRect(curX + _vm->state()->_currentScrollValue, y, curX + lineSize[i] + _vm->state()->_currentScrollValue, curY + height);
+
while (*line) {
byte curChar = textToFont(*line);
if (curChar != 32) _currentFont->drawFontFrame(_vm->getMainSurface(), curChar, curX + _vm->state()->_currentScrollValue, curY, _currentFontColor);