[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12866] trunk/blender/intern/bmfont/intern /BMF_BitmapFont.cpp: fix for own warning

Campbell Barton ideasman42 at gmail.com
Thu Dec 13 13:50:37 CET 2007


Revision: 12866
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12866
Author:   campbellbarton
Date:     2007-12-13 13:50:36 +0100 (Thu, 13 Dec 2007)

Log Message:
-----------
fix for own warning

Modified Paths:
--------------
    trunk/blender/intern/bmfont/intern/BMF_BitmapFont.cpp

Modified: trunk/blender/intern/bmfont/intern/BMF_BitmapFont.cpp
===================================================================
--- trunk/blender/intern/bmfont/intern/BMF_BitmapFont.cpp	2007-12-13 10:55:10 UTC (rev 12865)
+++ trunk/blender/intern/bmfont/intern/BMF_BitmapFont.cpp	2007-12-13 12:50:36 UTC (rev 12866)
@@ -291,20 +291,20 @@
 	if (fbuf) {
 		float *pixel, *max;
 		unsigned char c;
-		int x, y;
+		int xi, yi;
 		
 		max = fbuf + (4 * (w * h));
 		
 		while ((c = (unsigned char) *str++)) {
 			BMF_CharData & cd = m_fontData->chars[c];
 			if (cd.data_offset != -1) { 
-				for (y = 0; y < cd.height; y++) {
-					unsigned char* chrRow = &m_fontData->bitmap_data[cd.data_offset + ((cd.width+7)/8)*y];
-					for (x = cd.xorig; x < cd.width; x++) {
-						pixel = fbuf + 4 * (((posy + y - cd.yorig) * w) + (posx + x));
+				for (yi = 0; yi < cd.height; yi++) {
+					unsigned char* chrRow = &m_fontData->bitmap_data[cd.data_offset + ((cd.width+7)/8)*yi];
+					for (xi = cd.xorig; xi < cd.width; xi++) {
+						pixel = fbuf + 4 * (((posy + yi - cd.yorig) * w) + (posx + xi));
 						if ((pixel < max) && (pixel > fbuf)) {
-							int byteIdx = x/8;
-							int bitIdx = 7 - (x%8);
+							int byteIdx = xi/8;
+							int bitIdx = 7 - (xi%8);
 							
 							if (chrRow[byteIdx]&(1<<bitIdx)) {
 								pixel[0] = col[0];





More information about the Bf-blender-cvs mailing list