diff options
author | Tobia Tesan | 2017-04-30 00:14:23 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-04-30 09:48:08 +0200 |
commit | af664fe757b0834e011e93420911428b361c516e (patch) | |
tree | ffb2857ba31d5191bed3d181c2f859eacf3b9e29 /engines | |
parent | d602850b0c3bd9e99d729da335ac3f068c5cd73a (diff) | |
download | scummvm-rg350-af664fe757b0834e011e93420911428b361c516e.tar.gz scummvm-rg350-af664fe757b0834e011e93420911428b361c516e.tar.bz2 scummvm-rg350-af664fe757b0834e011e93420911428b361c516e.zip |
GRAPHICS: Use MacFont in lieu of Graphics::Font in MacText
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/frame.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index ba5b9033ab..3b3c1ff978 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -846,11 +846,10 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo return; } - Graphics::MacFont macFont = Graphics::MacFont(textCast->fontId, textCast->fontSize, textCast->textSlant); + Graphics::MacFont *macFont = new Graphics::MacFont(textCast->fontId, textCast->fontSize, textCast->textSlant); + // TODO: MacText must destroy me - const Graphics::Font *font = _vm->_wm->_fontMan->getFont(macFont); - - debugC(3, kDebugText, "renderText: x: %d y: %d w: %d h: %d font: '%s'", x, y, width, height, _vm->_wm->_fontMan->getFontName(macFont)); + debugC(3, kDebugText, "renderText: x: %d y: %d w: %d h: %d font: '%s'", x, y, width, height, _vm->_wm->_fontMan->getFontName(*macFont)); int alignment = (int)textCast->textAlign; if (alignment == -1) @@ -866,7 +865,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo } } - Graphics::MacText mt(ftext, _vm->_wm, font, 0x00, 0xff, width, (Graphics::TextAlign)alignment); + Graphics::MacText mt(ftext, _vm->_wm, macFont, 0x00, 0xff, width, (Graphics::TextAlign)alignment); mt.setInterLinear(1); mt.render(); const Graphics::ManagedSurface *textSurface = mt.getSurface(); |