From 83723eb5558383537968bee22b2342372ad9a40d Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 1 Mar 2008 03:19:49 +0000 Subject: remove unused variable git-svn-id: svn://mattst88.com/svn/glpong/trunk@12 449aeecc-241a-0410-943f-e2f883e2d7a2 --- ball.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ball.c b/ball.c index 81c3ad0..a1c3b9e 100644 --- a/ball.c +++ b/ball.c @@ -26,14 +26,14 @@ GLPong_BallInit() { ball_width = GLPONG_WIDTH / 32.0f; /* FIXME: magic numbers */ ball_height = GLPONG_HEIGHT / 24.0f; - ball = glGenLists(1); - glNewList(ball, GL_COMPILE); + ball = glGenLists(1); + glNewList(ball, GL_COMPILE); glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex2f( 0.0f, 0.0f); /* Lower Left */ glTexCoord2f(1.0f, 0.0f); glVertex2f(ball_width, 0.0f); /* Lower Right */ glTexCoord2f(1.0f, 1.0f); glVertex2f(ball_width, ball_height); /* Upper Right */ glTexCoord2f(0.0f, 1.0f); glVertex2f( 0.0f, ball_height); /* Upper Left */ - glEnd(); + glEnd(); glEndList(); } @@ -72,16 +72,15 @@ GLPong_BallAdd(Ball_t ** balls) { void GLPong_BallDelete(Ball_t * from, Ball_t * ball) { - Ball_t * current = from; Ball_t * temp = NULL; - while (current) { - if (current == ball) { + while (from) { + if (from == ball) { temp = ball; - current->next = ball->next; + from->next = ball->next; free(ball); break; } - current = current->next; + from = from->next; } } -- cgit v1.2.3