[Scummvm-cvs-logs] SF.net SVN: scummvm: [23292] scummvm/trunk/graphics/font.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Sat Jun 24 14:27:12 CEST 2006


Revision: 23292
Author:   wjpalenstijn
Date:     2006-06-24 05:27:07 -0700 (Sat, 24 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23292&view=rev

Log Message:
-----------
fix character clipping as mentioned by Marcus on the mailing list on 22 june

Modified Paths:
--------------
    scummvm/trunk/graphics/font.cpp
Modified: scummvm/trunk/graphics/font.cpp
===================================================================
--- scummvm/trunk/graphics/font.cpp	2006-06-24 12:22:54 UTC (rev 23291)
+++ scummvm/trunk/graphics/font.cpp	2006-06-24 12:27:07 UTC (rev 23292)
@@ -82,11 +82,12 @@
 		const bitmap_t buffer = READ_UINT16(tmp);
 		tmp++;
 		bitmap_t mask = 0x8000;
-		if (ty + y < 0 || ty + y >= dst->h)
+		if (ty + desc.ascent - bby - bbh + y < 0 ||
+		    ty + desc.ascent - bby - bbh + y >= dst->h)
 			continue;
 
 		for (int x = 0; x < bbw; x++, mask >>= 1) {
-			if (tx + x < 0 || tx + x >= dst->w)
+			if (tx + bbx + x < 0 || tx + bbx + x >= dst->w)
 				continue;
 			if ((buffer & mask) != 0) {
 				if (dst->bytesPerPixel == 1)


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