summaryrefslogtreecommitdiffstats
path: root/src/ball.c
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-25 16:34:15 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-25 17:29:47 (EDT)
commit9389cc62a79a534bf248f620eb495d8584465d27 (patch)
treef5ff16b80c6d0c667c701b25f1188f918d827266 /src/ball.c
parentffc5cdc5bb5fa09f51edf34a4857cb7d8b6599e4 (diff)
downloaddodge-balls-9389cc62a79a534bf248f620eb495d8584465d27.zip
dodge-balls-9389cc62a79a534bf248f620eb495d8584465d27.tar.gz
dodge-balls-9389cc62a79a534bf248f620eb495d8584465d27.tar.bz2
ball: Add spin direction and radius
Diffstat (limited to 'src/ball.c')
-rw-r--r--src/ball.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/ball.c b/src/ball.c
index 8a00d7d..60ebc74 100644
--- a/src/ball.c
+++ b/src/ball.c
@@ -27,12 +27,15 @@ struct db_ball {
int y;
int r;
int a;
+ int d;
+ double sr;
int s;
struct db_ball *next;
};
struct db_ball *
-db_ball_new(int x, int y, int r, int a, int s, struct db_ball *prev)
+db_ball_new(int x, int y, int r, int a, int d, double sr, int s,
+ struct db_ball *prev)
{
struct db_ball *ball;
@@ -42,11 +45,13 @@ db_ball_new(int x, int y, int r, int a, int s, struct db_ball *prev)
return NULL;
}
- ball->x = x;
- ball->y = y;
- ball->r = r;
- ball->a = a;
- ball->s = s;
+ ball->x = x;
+ ball->y = y;
+ ball->r = r;
+ ball->a = a;
+ ball->d = d;
+ ball->sr = sr;
+ ball->s = s;
if (prev != NULL) {
prev->next = ball;