[Scummvm-cvs-logs] CVS: residual driver_gl.cpp,1.51,1.52 driver_tinygl.cpp,1.19,1.20

Pawel Kolodziejski aquadran at users.sourceforge.net
Fri Apr 8 22:04:00 CEST 2005


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21890

Modified Files:
	driver_gl.cpp driver_tinygl.cpp 
Log Message:
corrections for drawing rectangles

Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- driver_gl.cpp	8 Apr 2005 18:29:12 -0000	1.51
+++ driver_gl.cpp	9 Apr 2005 05:03:39 -0000	1.52
@@ -719,7 +719,7 @@
 	if (primitive->isFilled()) {
 		glBegin(GL_QUADS);
 	} else {
-		glBegin(GL_LINES);
+		glBegin(GL_LINE_LOOP);
 	}
 
 	glVertex2f(x1, y1);

Index: driver_tinygl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- driver_tinygl.cpp	8 Apr 2005 18:29:13 -0000	1.19
+++ driver_tinygl.cpp	9 Apr 2005 05:03:39 -0000	1.20
@@ -505,22 +505,22 @@
 	uint16 c = ((color.red() & 0xF8) << 8) | ((color.green() & 0xFC) << 3) | (color.blue() >> 3);
 
 	if (primitive->isFilled()) {
-		for (; y1 < y2; y1++) {
-			for (int x = x1; x < x2; x++) {
+		for (; y1 <= y2; y1++) {
+			for (int x = x1; x <= x2; x++) {
 				WRITE_LE_UINT16(dst + 640 * y1 + x, c);
 			}
 		}
 	} else {
-		for (int x = x1; x < x2; x++) {
+		for (int x = x1; x <= x2; x++) {
 			WRITE_LE_UINT16(dst + 640 * y1 + x, c);
 		}
-		for (int x = x1; x < x2; x++) {
+		for (int x = x1; x <= x2; x++) {
 			WRITE_LE_UINT16(dst + 640 * y2 + x, c);
 		}
-		for (int y = y1; y < y2; y++) {
+		for (int y = y1; y <= y2; y++) {
 			WRITE_LE_UINT16(dst + 640 * y + x1, c);
 		}
-		for (int y = y1; y < y2; y++) {
+		for (int y = y1; y <= y2; y++) {
 			WRITE_LE_UINT16(dst + 640 * y + x2, c);
 		}
 	}





More information about the Scummvm-git-logs mailing list