[Scummvm-cvs-logs] SF.net SVN: scummvm:[48850] scummvm/trunk/engines/drascula/graphics.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Thu Apr 29 05:54:21 CEST 2010


Revision: 48850
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48850&view=rev
Author:   eriktorbjorn
Date:     2010-04-29 03:54:20 +0000 (Thu, 29 Apr 2010)

Log Message:
-----------
Fixed a glitch when a one-word text (e.g. "TOTENKOPF" in the first room, when
playing the German translation) doesn't fit on the screen at the desired
position.

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/graphics.cpp

Modified: scummvm/trunk/engines/drascula/graphics.cpp
===================================================================
--- scummvm/trunk/engines/drascula/graphics.cpp	2010-04-28 23:22:32 UTC (rev 48849)
+++ scummvm/trunk/engines/drascula/graphics.cpp	2010-04-29 03:54:20 UTC (rev 48850)
@@ -335,6 +335,17 @@
 		return;
 	}
 
+	// If it's a one-word message it can't be broken up. It's probably a
+	// mouse-over text, so try just sliding it to the side a bit to make it
+	// fit. This happens with the word "TOTENKOPF" in the very first room
+	// with the German translation.
+	if (!strchr(msg, ' ')) {
+		int len = strlen(msg);
+		x = CLIP<int>(textX - len * CHAR_WIDTH / 2, 0, 319 - len * CHAR_WIDTH);
+		print_abc(msg, x, y);
+		return;
+	}
+	
 	// Message doesn't fit on screen, split it
 
 	// Get a word from the message


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list