aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2012-02-04 14:11:20 +0100
committerWillem Jan Palenstijn2012-02-04 14:13:26 +0100
commit6fed44298e38c672789ac3b2e42d254dd5a6ee62 (patch)
treefe95779f665dd3534a62e8c57d8e7c7ed0a0677d /engines
parent8b172f0ceff9b790f856d7e668815665438bce83 (diff)
downloadscummvm-rg350-6fed44298e38c672789ac3b2e42d254dd5a6ee62.tar.gz
scummvm-rg350-6fed44298e38c672789ac3b2e42d254dd5a6ee62.tar.bz2
scummvm-rg350-6fed44298e38c672789ac3b2e42d254dd5a6ee62.zip
TOUCHE: Add charset debug channel
This is intended to help debug the missing Spanish characters reported in #2040311 and #3483383.
Diffstat (limited to 'engines')
-rw-r--r--engines/touche/touche.cpp8
-rw-r--r--engines/touche/touche.h3
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 {