[Scummvm-cvs-logs] SF.net SVN: scummvm:[35036] scummvm/trunk/graphics

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Nov 13 12:20:43 CET 2008


Revision: 35036
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35036&view=rev
Author:   fingolfin
Date:     2008-11-13 11:20:43 +0000 (Thu, 13 Nov 2008)

Log Message:
-----------
minor tweaks

Modified Paths:
--------------
    scummvm/trunk/graphics/font.cpp
    scummvm/trunk/graphics/font.h

Modified: scummvm/trunk/graphics/font.cpp
===================================================================
--- scummvm/trunk/graphics/font.cpp	2008-11-13 09:19:42 UTC (rev 35035)
+++ scummvm/trunk/graphics/font.cpp	2008-11-13 11:20:43 UTC (rev 35036)
@@ -51,11 +51,12 @@
 
 template <typename PixelType>
 void drawCharIntern(byte *ptr, uint pitch, const bitmap_t *src, int h, int minX, int maxX, const PixelType color) {
+	const bitmap_t maxXMask = ~((1 << (16-maxX)) - 1);
 	while (h-- > 0) {
 		bitmap_t buffer = READ_UINT16(src);
 		src++;
 
-		buffer &= ~((1 << (16-maxX)) - 1);
+		buffer &= maxXMask;
 		buffer <<= minX;
 		PixelType *tmp = (PixelType *)ptr;
 		while (buffer != 0) {

Modified: scummvm/trunk/graphics/font.h
===================================================================
--- scummvm/trunk/graphics/font.h	2008-11-13 09:19:42 UTC (rev 35035)
+++ scummvm/trunk/graphics/font.h	2008-11-13 11:20:43 UTC (rev 35036)
@@ -90,7 +90,7 @@
 	virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const;
 };
 
-typedef unsigned short bitmap_t; /* bitmap image unit size*/
+typedef uint16 bitmap_t; /* bitmap image unit size*/
 
 struct BBX {
 	int8 w;


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