changeset 39:4e68022ed545

fix some pixels wrongly highlighted in outlines
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 12 Jul 2008 12:35:31 +0000
parents 38232a42ff8d
children dbe85ccc8021
files engine/core/view/renderers/instancerenderer.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/engine/core/view/renderers/instancerenderer.cpp	Sat Jul 12 12:30:31 2008 +0000
+++ b/engine/core/view/renderers/instancerenderer.cpp	Sat Jul 12 12:35:31 2008 +0000
@@ -177,10 +177,10 @@
 		
 		// TODO: optimize...
 		uint8_t r, g, b, a = 0;
-		int prev_a = a;
 		
 		// vertical sweep
 		for (unsigned int x = 0; x < img->getWidth(); x ++) {
+			uint8_t prev_a = 0;
 			for (unsigned int y = 0; y < img->getHeight(); y ++) {
 				vc.image->getPixelRGBA(x, y, &r, &g, &b, &a);
 				if ((a == 0 || prev_a == 0) && (a != prev_a)) {
@@ -199,6 +199,7 @@
 		}
 		// horizontal sweep
 		for (unsigned int y = 0; y < img->getHeight(); y ++) {
+			uint8_t prev_a = 0;
 			for (unsigned int x = 0; x < img->getWidth(); x ++) {
 				vc.image->getPixelRGBA(x, y, &r, &g, &b, &a);
 				if ((a == 0 || prev_a == 0) && (a != prev_a)) {