[Scummvm-cvs-logs] scummvm master -> 6fed44298e38c672789ac3b2e42d254dd5a6ee62

wjp wjp at usecode.org
Sat Feb 4 14:15:46 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6fed44298e TOUCHE: Add charset debug channel


Commit: 6fed44298e38c672789ac3b2e42d254dd5a6ee62
    https://github.com/scummvm/scummvm/commit/6fed44298e38c672789ac3b2e42d254dd5a6ee62
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-02-04T05:13:26-08:00

Commit Message:
TOUCHE: Add charset debug channel

This is intended to help debug the missing Spanish characters reported
in #2040311 and #3483383.

Changed paths:
    engines/touche/touche.cpp
    engines/touche/touche.h



diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 81d6adf..4b98996 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 cbb3fec..949727b 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 {






More information about the Scummvm-git-logs mailing list