diff options
author | Eugene Sandulenko | 2019-12-01 21:44:12 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-12-01 21:44:12 +0100 |
commit | ab9c2631f04559f693f6da53e73dcfcf5f72a8c2 (patch) | |
tree | 6740060b3f8e1fb55718c89389b1eadc2a196d90 /engines/director | |
parent | 91570ca63f1c822cd7fd624d584a07960b40a40a (diff) | |
download | scummvm-rg350-ab9c2631f04559f693f6da53e73dcfcf5f72a8c2.tar.gz scummvm-rg350-ab9c2631f04559f693f6da53e73dcfcf5f72a8c2.tar.bz2 scummvm-rg350-ab9c2631f04559f693f6da53e73dcfcf5f72a8c2.zip |
DIRECTOR: Fix fonts in cached texts
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/cachedmactext.cpp | 16 | ||||
-rw-r--r-- | engines/director/cachedmactext.h | 2 |
2 files changed, 7 insertions, 11 deletions
diff --git a/engines/director/cachedmactext.cpp b/engines/director/cachedmactext.cpp index e152974911..c89efc4d06 100644 --- a/engines/director/cachedmactext.cpp +++ b/engines/director/cachedmactext.cpp @@ -41,9 +41,13 @@ void CachedMacText::makeMacText() { else _align = (Graphics::TextAlign)((int)_textCast->_textAlign + 1); + Graphics::MacFont *macFont = new Graphics::MacFont(_textCast->_fontId, + _textCast->_fontSize, + _textCast->_textSlant); + _macText = new Graphics::MacText(_textCast->_ftext, _wm, - _macFont, + macFont, 0x00, 0xff, _width, @@ -60,14 +64,8 @@ CachedMacText::CachedMacText(TextCast *const textCast, Graphics::MacWindowManager *const wm ) : - _surface(NULL), _macFont(NULL), - _macText(NULL), _width(defaultWidth), _dirty(true), _textCast(textCast), - _wm(wm) { - _macFont = new Graphics::MacFont(_textCast->_fontId, - _textCast->_fontSize, - _textCast->_textSlant); - // TODO destroy me - + _surface(NULL), _macText(NULL), _width(defaultWidth), _dirty(true), + _textCast(textCast), _wm(wm) { if (_width == -1) { if (version >= 4) { // This came from frame.cpp diff --git a/engines/director/cachedmactext.h b/engines/director/cachedmactext.h index 8adf275f15..b06146237b 100644 --- a/engines/director/cachedmactext.h +++ b/engines/director/cachedmactext.h @@ -26,7 +26,6 @@ #include "graphics/font.h" namespace Graphics { -class MacFont; class ManagedSurface; class MacText; class MacWindowManager; @@ -41,7 +40,6 @@ private: int _width; TextCast *const _textCast; Graphics::MacWindowManager *_wm; - Graphics::MacFont *_macFont; Graphics::MacText *_macText; Graphics::TextAlign _align; bool _dirty; |