(no commit message)
[atyndall/cits2231.git] / scene.c
diff --git a/scene.c b/scene.c
index a2da934..cc96c00 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -558,7 +558,7 @@ void idle() {
   angle = (int)(angle + 10) % 360;\r
     //angle2 = (int)(angle2 + 10) % 360;\r
     printf("Angle 1: %f, Angle 2: %f\n", angle, angle2);\r
-    sleep(2);\r
+    sleep(25);\r
     glutPostRedisplay();\r
 }\r
 \r
@@ -599,15 +599,18 @@ int drawFloorRecurse = 10;
 \r
 void drawSquare(int recurseLevel, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) {\r
 \r
+  printf("Recurse level %d\n", recurseLevel);\r
+\r
   if ( drawFloorRecurse != recurseLevel ) {\r
-    GLfloat xm = (x2 - x1) / 2;\r
+    GLfloat xm = (x2 - x1) / 2.0;\r
     if ( x1 > x2 ) {\r
-      xm = (x1 - x2) / 2;\r
+      xm = (x1 - x2) / 2.0;\r
     }\r
 \r
     drawSquare(recurseLevel + 1, x1, y1, xm, y2);\r
     drawSquare(recurseLevel + 1, xm, y1, x2, y2);\r
   } else {\r
+    printf("Drawing (%f, %f) -> (%f, %f)\n", x1, y2, x2, y2);\r
     glBegin(GL_QUADS);\r
       glVertex3f(x1, 0.0, y1);\r
       glVertex3f(x1, 0.0, y2);\r

UCC git Repository :: git.ucc.asn.au