Commits

T...@Ted-PC.carolina.rr.com  committed 8c649ee

Changed drawing rotations to use radians instead of degrees.

Just added a LOVE_TORAD(angle) to every call to t.setTransformation.

  • Participants
  • Parent commits a653ad6

Comments (0)

Files changed (5)

File src/modules/graphics/opengl/Canvas.cpp

 	void Canvas::draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const
 	{
 		static Matrix t;
-		t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 
 		drawv(t, vertices);
 	}
 		quad->mirror(false, true);
 		const vertex * v = quad->getVertices();
 
-		t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 		drawv(t, v);
 		quad->mirror(false, true);
 	}

File src/modules/graphics/opengl/Font.cpp

 		glPushMatrix();
 
 		Matrix t;
-		t.setTransformation(ceil(x), ceil(y), angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(ceil(x), ceil(y), LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 		glMultMatrixf((const GLfloat*)t.getElements());
 		try
 		{

File src/modules/graphics/opengl/Image.cpp

 	{
 		static Matrix t;
 
-		t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 		drawv(t, vertices);
 	}
 
 		static Matrix t;
 		const vertex * v = quad->getVertices();
 
-		t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 		drawv(t, v);
 	}
 

File src/modules/graphics/opengl/ParticleSystem.cpp

 		glPushAttrib(GL_CURRENT_BIT);
 
 		Matrix t;
-		t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 		glMultMatrixf((const GLfloat*)t.getElements());
 
 		particle * p = pStart;

File src/modules/graphics/opengl/SpriteBatch.cpp

 
 		// Transform.
 		Matrix t;
-		t.setTransformation(x, y, a, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(a), sx, sy, ox, oy, kx, ky);
 		t.transform(sprite, sprite, 4);
 
 		if (color)
 
 		// Transform.
 		Matrix t;
-		t.setTransformation(x, y, a, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(a), sx, sy, ox, oy, kx, ky);
 		t.transform(sprite, sprite, 4);
 
 		if (color)
 
 		glPushMatrix();
 
-		t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
+		t.setTransformation(x, y, LOVE_TORAD(angle), sx, sy, ox, oy, kx, ky);
 		glMultMatrixf((const GLfloat*)t.getElements());
 
 		image->bind();