From: Ash Tyndall Date: Tue, 18 Oct 2011 11:31:43 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=a452fcff3f30b458535e11d3d241d363bfc993b4;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 3a1cae6..64fcdb5 100644 --- a/scene.c +++ b/scene.c @@ -599,16 +599,18 @@ int drawFloorRecurse = 10; void drawSquare(int recurseLevel, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { + printf("Recurse level %d", recurseLevel); + if ( drawFloorRecurse != recurseLevel ) { - GLfloat xm = (x2 - x1) / 2; + GLfloat xm = (x2 - x1) / 2.0; if ( x1 > x2 ) { - xm = (x1 - x2) / 2; + xm = (x1 - x2) / 2.0; } drawSquare(recurseLevel + 1, x1, y1, xm, y2); drawSquare(recurseLevel + 1, xm, y1, x2, y2); } else { - printf("Drawing (%f, %f) -> (%f, %f)", x1, y2, x2, y2); + printf("Drawing (%f, %f) -> (%f, %f)\n", x1, y2, x2, y2); glBegin(GL_QUADS); glVertex3f(x1, 0.0, y1); glVertex3f(x1, 0.0, y2);