summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-03-01 03:19:49 +0000
committerMatt Turner <mattst88@gmail.com>2008-03-01 03:19:49 +0000
commit83723eb5558383537968bee22b2342372ad9a40d (patch)
tree3fcce22ad4482d66b11e4c9cac2c47ab90de46b0
parentb0cadcab42b11175aadbd426507df0053bc8054e (diff)
remove unused variable
git-svn-id: svn://mattst88.com/svn/glpong/trunk@12 449aeecc-241a-0410-943f-e2f883e2d7a2
-rw-r--r--ball.c15
1 files 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;
}
}