src/gldraw.cpp

changeset 498
791c831c8020
parent 497
c51941e590b6
child 499
ebd30d9eb667
--- a/src/gldraw.cpp	Sat Oct 05 12:51:13 2013 +0300
+++ b/src/gldraw.cpp	Sat Oct 05 15:18:47 2013 +0300
@@ -1105,7 +1105,7 @@
 
 // =============================================================================
 // -----------------------------------------------------------------------------
-void GLRenderer::pick (uint mouseX, uint mouseY)
+void GLRenderer::pick (int mouseX, int mouseY)
 {	GLint viewport[4];
 	makeCurrent();
 
@@ -1194,7 +1194,7 @@
 		if (!m_rangepick && m_addpick)
 		{	bool removed = false;
 
-			for (ulong i = 0; i < g_win->sel().size(); ++i)
+			for (int i = 0; i < g_win->sel().size(); ++i)
 			{	if (g_win->sel() [i] == obj)
 				{	g_win->sel().erase (i);
 					obj->setSelected (false);
@@ -1341,7 +1341,7 @@
 
 						obj->setColor (maincolor);
 
-						for (ushort i = 0; i < obj->vertices(); ++i)
+						for (int i = 0; i < obj->vertices(); ++i)
 							obj->setVertex (i, verts[i]);
 
 						break;
@@ -1459,7 +1459,7 @@
 
 // =============================================================================
 // -----------------------------------------------------------------------------
-uchar* GLRenderer::screencap (ushort& w, ushort& h)
+uchar* GLRenderer::screencap (int& w, int& h)
 {	w = m_width;
 	h = m_height;
 	uchar* cap = new uchar[4 * w * h];
@@ -1650,12 +1650,12 @@
 		bool filled = false;
 
 		// Check the top and bottom rows
-		for (ushort i = 0; i < w && !filled; ++i)
+		for (int i = 0; i < w && !filled; ++i)
 			if (imgdata[i] != white || imgdata[ ( (h - 1) * w) + i] != white)
 				filled = true;
 
 		// Left and right edges
-		for (ushort i = 0; i < h && !filled; ++i)
+		for (int i = 0; i < h && !filled; ++i)
 			if (imgdata[i * w] != white || imgdata[ (i * w) + (w - 1)] != white)
 				filled = true;
 
@@ -1813,7 +1813,7 @@
 			// the last one found. Otherwise, place it before the first schemantic
 			// object and put an empty object after it (though don't do this if
 			// there was no schemantic elements at all)
-			ulong i, lastOverlay = -1u;
+			int i, lastOverlay = -1;
 			bool found = false;
 
 			for (i = 0; i < file()->numObjs(); ++i)
@@ -1828,7 +1828,7 @@
 					lastOverlay = i;
 			}
 
-			if (lastOverlay != -1u)
+			if (lastOverlay != -1)
 				file()->insertObj (lastOverlay + 1, ovlobj);
 			else
 			{	file()->insertObj (i, ovlobj);

mercurial