diff options
author | BLooperZ | 2019-08-01 00:21:07 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-18 02:02:14 +0100 |
commit | 83285746b0cbaa7223592fa008af22b31484e0d6 (patch) | |
tree | 098748cb88cfc67cd39982e0f4fabaee69ec03df /engines/toon/font.cpp | |
parent | fd7efe4fb6fd07b4c3831cbe0082027b9782f919 (diff) | |
download | scummvm-rg350-83285746b0cbaa7223592fa008af22b31484e0d6.tar.gz scummvm-rg350-83285746b0cbaa7223592fa008af22b31484e0d6.tar.bz2 scummvm-rg350-83285746b0cbaa7223592fa008af22b31484e0d6.zip |
TOON: add support for cutscene subtitles
Diffstat (limited to 'engines/toon/font.cpp')
-rw-r--r-- | engines/toon/font.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp index 9b08e432fc..29dbf40b8b 100644 --- a/engines/toon/font.cpp +++ b/engines/toon/font.cpp @@ -191,7 +191,7 @@ void FontRenderer::setFontColor(int32 fontColor1, int32 fontColor2, int32 fontCo _currentFontColor[3] = fontColor3; } -void FontRenderer::renderMultiLineText(int16 x, int16 y, const Common::String &origText, int32 mode) { +void FontRenderer::renderMultiLineText(int16 x, int16 y, const Common::String &origText, int32 mode, Graphics::Surface& frame) { debugC(5, kDebugFont, "renderMultiLineText(%d, %d, %s, %d)", x, y, origText.c_str(), mode); // divide the text in several lines @@ -289,7 +289,7 @@ void FontRenderer::renderMultiLineText(int16 x, int16 y, const Common::String &o while (*line) { byte curChar = textToFont(*line); - if (curChar != 32) _currentFont->drawFontFrame(_vm->getMainSurface(), curChar, curX + _vm->state()->_currentScrollValue, curY, _currentFontColor); + if (curChar != 32) _currentFont->drawFontFrame(frame, curChar, curX + _vm->state()->_currentScrollValue, curY, _currentFontColor); curX = curX + MAX<int32>(_currentFont->getFrameWidth(curChar) - 2, 0); //height = MAX(height, _currentFont->getFrameHeight(curChar)); line++; |