[Scummvm-git-logs] scummvm master -> 6e0cb60e4f8024e19e8764a581d5af4e61bc43ad

sev- sev at scummvm.org
Fri Apr 24 23:45:47 UTC 2020


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

Summary:
50dba256ce DIRECTOR: More debug output
6e0cb60e4f GRAPHICS: MACGUI: More debug output


Commit: 50dba256ce5099f89fe0edb6ff416ea21bc85067
    https://github.com/scummvm/scummvm/commit/50dba256ce5099f89fe0edb6ff416ea21bc85067
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-25T01:45:03+02:00

Commit Message:
DIRECTOR: More debug output

Changed paths:
    engines/director/frame.cpp


diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index e240e16e20..935cf217c2 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -888,8 +888,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
 
 	if (sprite->_editable) {
 		if (!textCast->_widget) {
+			warning("Creating MacEditableText with '%s'", toPrintable(textCast->_ftext).c_str());
 			textCast->_widget = new Graphics::MacEditableText(score->_window, x, y, width, height, g_director->_wm, textCast->_ftext, new Graphics::MacFont(), sprite->_foreColor, sprite->_backColor);
-			warning("Created MacEditableText with '%s'", textCast->_ftext.c_str());
+			warning("Finished creating MacEditableText");
 		}
 
 		textCast->_widget->draw();


Commit: 6e0cb60e4f8024e19e8764a581d5af4e61bc43ad
    https://github.com/scummvm/scummvm/commit/6e0cb60e4f8024e19e8764a581d5af4e61bc43ad
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-25T01:45:21+02:00

Commit Message:
GRAPHICS: MACGUI: More debug output

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 3cdb67da28..177fda03a8 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -26,6 +26,8 @@
 
 namespace Graphics {
 
+#define DEBUG 0
+
 const Font *MacFontRun::getFont() {
 	if (font)
 		return font;
@@ -151,6 +153,8 @@ void MacText::splitString(Common::U32String &str) {
 	bool nextChunk = false;
 	MacFontRun previousFormatting;
 
+	debug(9, "******** splitString: \"%s\"", toPrintable(str.encode()).c_str());
+
 	while (*s) {
 #if DEBUG
 		for (uint i = 0; i < _textLines.size(); i++) {
@@ -159,7 +163,7 @@ void MacText::splitString(Common::U32String &str) {
 			for (uint j = 0; j < _textLines[i].chunks.size(); j++)
 				debugN(9, "[%d] \"%s\"", _textLines[i].chunks[j].fontId, Common::toPrintable(_textLines[i].chunks[j].text.encode()).c_str());
 
-			debug(9, " --> %c %d, '%s'", (*s > 0x20 ? *s : ' '), (byte)*s, Common::toPrintable(tmp.encode()).c_str());
+			debug(9, " --> '%c' 0x%02x, \"%s\"", (*s > 0x20 ? *s : ' '), (byte)*s, Common::toPrintable(tmp.encode()).c_str());
 		}
 #endif
 
@@ -293,6 +297,18 @@ void MacText::splitString(Common::U32String &str) {
 			}
 		}
 	}
+
+#if DEBUG
+	debug(9, "Result:");
+	for (uint i = 0; i < _textLines.size(); i++) {
+		debugN(9, "%2d ", i);
+
+		for (uint j = 0; j < _textLines[i].chunks.size(); j++)
+			debugN(9, "[%d] \"%s\"", _textLines[i].chunks[j].fontId, Common::toPrintable(_textLines[i].chunks[j].text.encode()).c_str());
+
+		debug(9, " --> '%c' 0x%02x, \"%s\"", (*s > 0x20 ? *s : ' '), (byte)*s, Common::toPrintable(tmp.encode()).c_str());
+	}
+#endif
 }
 
 void MacText::reallocSurface() {




More information about the Scummvm-git-logs mailing list