diff options
author | Eugene Sandulenko | 2016-10-18 11:15:48 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-10-18 11:50:12 +0200 |
commit | 0eac022f554469846fe5c752a650f668133ae4a1 (patch) | |
tree | 91b5fe3ccc27e032df729fb160b169bf3e2c12dc | |
parent | 01cf3d2ebd7e4b189121a4818dae19ccad52bfbd (diff) | |
download | scummvm-rg350-0eac022f554469846fe5c752a650f668133ae4a1.tar.gz scummvm-rg350-0eac022f554469846fe5c752a650f668133ae4a1.tar.bz2 scummvm-rg350-0eac022f554469846fe5c752a650f668133ae4a1.zip |
DIRECTOR: Added debug chanel for text rendering
-rw-r--r-- | engines/director/director.cpp | 1 | ||||
-rw-r--r-- | engines/director/director.h | 3 | ||||
-rw-r--r-- | engines/director/frame.cpp | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index 848eaa9b2b..43c56021c6 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -39,6 +39,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam DebugMan.addDebugChannel(kDebugLingoCompile, "lingocompile", "Lingo Compilation"); DebugMan.addDebugChannel(kDebugLoading, "loading", "Loading"); DebugMan.addDebugChannel(kDebugImages, "images", "Image drawing"); + DebugMan.addDebugChannel(kDebugText, "text", "Text rendering"); if (!_mixer->isReady()) error("Sound initialization failed"); diff --git a/engines/director/director.h b/engines/director/director.h index 7c65897bbf..f64b87b7d6 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -55,7 +55,8 @@ enum { kDebugLingoExec = 1 << 0, kDebugLingoCompile = 1 << 1, kDebugLoading = 1 << 2, - kDebugImages = 1 << 3 + kDebugImages = 1 << 3, + kDebugText = 1 << 4 }; diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index 2eaddc50f2..53b7502779 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -586,9 +586,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) { } else { textStream = _vm->getSharedSTXT()->getVal(spriteID + 1024); } - /*uint32 unk1 = */ textStream->readUint32(); + uint32 unk1 = textStream->readUint32(); uint32 strLen = textStream->readUint32(); - /*uin32 dataLen = */ textStream->readUint32(); + uint32 dataLen = textStream->readUint32(); Common::String text; for (uint32 i = 0; i < strLen; i++) { @@ -599,6 +599,8 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) { text += ch; } + debugC(3, kDebugText, "renderText: unk1: %d strLen: %d dataLen: %d textlen: %d", unk1, strLen, dataLen, text.size()); + uint32 rectLeft = static_cast<TextCast *>(_sprites[spriteID]->_cast)->initialRect.left; uint32 rectTop = static_cast<TextCast *>(_sprites[spriteID]->_cast)->initialRect.top; |