diff options
Diffstat (limited to 'engines/sword25/gfx/text.cpp')
-rw-r--r-- | engines/sword25/gfx/text.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp index 82bb7cdff7..d4aaa90682 100644 --- a/engines/sword25/gfx/text.cpp +++ b/engines/sword25/gfx/text.cpp @@ -91,9 +91,11 @@ bool Text::setFont(const Common::String &font) { } void Text::setText(const Common::String &text) { - _text = text; - updateFormat(); - forceRefresh(); + if (_text != text) { + _text = text; + updateFormat(); + forceRefresh(); + } } void Text::setColor(uint modulationColor) { @@ -129,7 +131,7 @@ void Text::setAutoWrapThreshold(uint autoWrapThreshold) { } } -bool Text::doRender() { +bool Text::doRender(RectangleList *updateRects) { // Font-Resource locken. FontResource *fontPtr = lockFontResource(); if (!fontPtr) @@ -171,7 +173,7 @@ bool Text::doRender() { Common::Rect renderRect(curX, curY, curX + curRect.width(), curY + curRect.height()); renderRect.translate(curRect.left - curX, curRect.top - curY); - result = charMapPtr->blit(curX, curY, Image::FLIP_NONE, &renderRect, _modulationColor); + result = charMapPtr->blit(curX, curY, Image::FLIP_NONE, &renderRect, _modulationColor, -1, -1, updateRects); if (!result) break; |