From 2da3d76c026adc9d7e49d4e50f9dae2c49c80cb4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 27 Jul 2021 19:10:11 +0200 Subject: [PATCH] DIRECTOR: Put more debug output to printable state --- engines/director/lingo/lingo.cpp | 2 +- engines/director/window.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 835d6cec150..3e51d9e1858 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -248,7 +248,7 @@ Symbol Lingo::getHandler(const Common::String &name) { void LingoArchive::addCode(const Common::U32String &code, ScriptType type, uint16 id, const char *scriptName) { debugC(1, kDebugCompile, "Add code for type %s(%d) with id %d in '%s%s'\n" - "***********\n%s\n\n***********", scriptType2str(type), type, id, g_director->getCurrentPath().c_str(), cast->getMacName().c_str(), code.encode().c_str()); + "***********\n%s\n\n***********", scriptType2str(type), type, id, toPrintable(g_director->getCurrentPath()).c_str(), toPrintable(cast->getMacName()).c_str(), code.encode().c_str()); if (getScriptContext(type, id)) { // We can't undefine context data because it could be used in e.g. symbols. diff --git a/engines/director/window.cpp b/engines/director/window.cpp index 3e282904e9e..2c03063478c 100644 --- a/engines/director/window.cpp +++ b/engines/director/window.cpp @@ -447,11 +447,11 @@ bool Window::step() { // finish last movie if (_currentMovie && _currentMovie->getScore()->_playState == kPlayStopped) { debugC(3, kDebugEvents, "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); - debugC(3, kDebugEvents, "@@@@ Finishing movie '%s' in '%s'", _currentMovie->getMacName().c_str(), _currentPath.c_str()); + debugC(3, kDebugEvents, "@@@@ Finishing movie '%s' in '%s'", toPrintable(_currentMovie->getMacName()).c_str(), _currentPath.c_str()); debugC(3, kDebugEvents, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); _currentMovie->getScore()->stopPlay(); - debugC(1, kDebugEvents, "Finished playback of movie '%s'", _currentMovie->getMacName().c_str()); + debugC(1, kDebugEvents, "Finished playback of movie '%s'", toPrintable(_currentMovie->getMacName()).c_str()); if (_vm->getGameGID() == GID_TESTALL) { _nextMovie = getNextMovieFromQueue(); @@ -489,7 +489,7 @@ bool Window::step() { _currentMovie->setArchive(mov); debug(0, "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); - debug(0, "@@@@ Switching to movie '%s' in '%s'", _currentMovie->getMacName().c_str(), _currentPath.c_str()); + debug(0, "@@@@ Switching to movie '%s' in '%s'", toPrintable(_currentMovie->getMacName()).c_str(), _currentPath.c_str()); debug(0, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); g_lingo->resetLingo(); @@ -548,7 +548,7 @@ bool Window::step() { // fall through case kPlayStarted: debugC(3, kDebugEvents, "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); - debugC(3, kDebugEvents, "@@@@ Stepping movie '%s' in '%s'", _currentMovie->getMacName().c_str(), _currentPath.c_str()); + debugC(3, kDebugEvents, "@@@@ Stepping movie '%s' in '%s'", toPrintable(_currentMovie->getMacName()).c_str(), _currentPath.c_str()); debugC(3, kDebugEvents, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); _currentMovie->getScore()->step(); return true;