From a452fcff3f30b458535e11d3d241d363bfc993b4 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Tue, 18 Oct 2011 19:31:43 +0800 Subject: [PATCH] --- scene.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.20.1