summaryrefslogtreecommitdiff
path: root/ball.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-06-05 20:02:57 +0000
committerMatt Turner <mattst88@gmail.com>2008-06-05 20:02:57 +0000
commit1f714742e2dc53445f9979980e4b2e74c5bdcf8f (patch)
tree7b4a30484bb0e963e6caea1f44c7d1eb3b80ca8b /ball.c
parent33c1f18d3871fc756f381d1a3aee1fdac2ff077e (diff)
Fix a few warnings from icc. Remove an unneeded function
git-svn-id: svn://mattst88.com/svn/glpong/trunk@17 449aeecc-241a-0410-943f-e2f883e2d7a2
Diffstat (limited to 'ball.c')
-rw-r--r--ball.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/ball.c b/ball.c
index 1ae80fe..20c7f2f 100644
--- a/ball.c
+++ b/ball.c
@@ -57,9 +57,9 @@ GLPong_BallAdd(Ball_t ** balls) {
newball->y = 100.0f;
newball->xv = 2.0f;
newball->yv = 2.0f;
- newball->r = rand() % 255;
- newball->g = rand() % 255;
- newball->b = rand() % 255;
+ newball->r = (GLubyte)(rand() % 255);
+ newball->g = (GLubyte)(rand() % 255);
+ newball->b = (GLubyte)(rand() % 255);
newball->a = SDL_ALPHA_OPAQUE;
*balls = newball;
@@ -71,20 +71,6 @@ GLPong_BallAdd(Ball_t ** balls) {
}
void
-GLPong_BallDelete(Ball_t * from, Ball_t * ball) {
- Ball_t * temp = NULL;
- while (from) {
- if (from == ball) {
- temp = ball;
- from->next = ball->next;
- free(ball);
- break;
- }
- from = from->next;
- }
-}
-
-void
GLPong_BallDeleteAll(Ball_t * list) {
if (list) {
GLPong_BallDeleteAll(list->next);