diff options
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/touche.cpp | 8 | ||||
-rw-r--r-- | engines/touche/touche.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index 81d6adf581..4b989963f6 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -81,6 +81,7 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language) DebugMan.addDebugChannel(kDebugResource, "Resource", "Resource debug level"); DebugMan.addDebugChannel(kDebugOpcodes, "Opcodes", "Opcodes debug level"); DebugMan.addDebugChannel(kDebugMenu, "Menu", "Menu debug level"); + DebugMan.addDebugChannel(kDebugCharset, "Charset", "Charset debug level"); _console = new ToucheConsole(this); } @@ -1260,6 +1261,13 @@ const char *ToucheEngine::getString(int num) const { int ToucheEngine::getStringWidth(int num) const { const char *str = getString(num); + if (DebugMan.isDebugChannelEnabled(kDebugCharset)) { + debug("stringwidth: %s", str); + debugN("raw:"); + const char *p = str; + while (*p) debugN(" %02X", (unsigned char)*p++); + debugN("\n"); + } return Graphics::getStringWidth16(str); } diff --git a/engines/touche/touche.h b/engines/touche/touche.h index cbb3fec7aa..949727b665 100644 --- a/engines/touche/touche.h +++ b/engines/touche/touche.h @@ -277,7 +277,8 @@ enum { kDebugGraphics = 1 << 1, kDebugResource = 1 << 2, kDebugOpcodes = 1 << 3, - kDebugMenu = 1 << 4 + kDebugMenu = 1 << 4, + kDebugCharset = 1 << 5 }; enum ResourceType { |