aboutsummaryrefslogtreecommitdiff
path: root/engines/director/cachedmactext.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-01 21:44:12 +0100
committerEugene Sandulenko2019-12-01 21:44:12 +0100
commitab9c2631f04559f693f6da53e73dcfcf5f72a8c2 (patch)
tree6740060b3f8e1fb55718c89389b1eadc2a196d90 /engines/director/cachedmactext.cpp
parent91570ca63f1c822cd7fd624d584a07960b40a40a (diff)
downloadscummvm-rg350-ab9c2631f04559f693f6da53e73dcfcf5f72a8c2.tar.gz
scummvm-rg350-ab9c2631f04559f693f6da53e73dcfcf5f72a8c2.tar.bz2
scummvm-rg350-ab9c2631f04559f693f6da53e73dcfcf5f72a8c2.zip
DIRECTOR: Fix fonts in cached texts
Diffstat (limited to 'engines/director/cachedmactext.cpp')
-rw-r--r--engines/director/cachedmactext.cpp16
1 files changed, 7 insertions, 9 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