diff options
author | Eugene Sandulenko | 2019-11-24 17:05:12 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-24 18:42:45 +0100 |
commit | 9ecc24979cb9991d527fc728118df21454cd2a44 (patch) | |
tree | f2ccbad2c9ba0e68c65dca2ce5a75d4d4faa2f9e | |
parent | c4820c454e17fc275b6e894e726471f2bbe6205f (diff) | |
download | scummvm-rg350-9ecc24979cb9991d527fc728118df21454cd2a44.tar.gz scummvm-rg350-9ecc24979cb9991d527fc728118df21454cd2a44.tar.bz2 scummvm-rg350-9ecc24979cb9991d527fc728118df21454cd2a44.zip |
DIRECTOR: Properly initialize cached text
-rw-r--r-- | engines/director/cast.cpp | 8 | ||||
-rw-r--r-- | engines/director/frame.cpp | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp index fe0f72d856..a3950c0d54 100644 --- a/engines/director/cast.cpp +++ b/engines/director/cast.cpp @@ -133,7 +133,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { warning("TextCast: t: %x", t); } - initialRect = Score::readRect(stream); + initialRect = Score::readRect(stream); } textShadow = static_cast<SizeType>(stream.readByte()); @@ -179,11 +179,11 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { fontSize = 12; stream.readUint32(); - stream.readUint32(); + stream.readUint32(); stream.readUint32(); stream.readUint32(); uint16 skip = stream.readUint16(); - for (int i = 0; i < skip; i++) + for (int i = 0; i < skip; i++) stream.readUint32(); stream.readUint32(); @@ -203,7 +203,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { modified = 0; - cachedMacText = new CachedMacText(this, version); + cachedMacText = new CachedMacText(this, version, -1, g_director->_wm); // TODO Destroy me } diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index 1054b0844f..c22bb05025 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -789,7 +789,6 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo //uint32 rectTop = textCast->initialRect.top; textCast->cachedMacText->clip(width); - textCast->cachedMacText->setWm(_vm->_wm); // TODO this is not a good place to do it const Graphics::ManagedSurface *textSurface = textCast->cachedMacText->getSurface(); if (!textSurface) |