diff options
author | P. J. McDermott <pjm@nac.net> | 2013-05-21 18:48:53 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-05-21 18:48:53 (EDT) |
commit | 40a64ca7bf3fcae470f3af16f21597e80e23fbe3 (patch) | |
tree | a6d7a1480bad18e4b2de3a73d05ee07c09031591 /src/ball.c | |
parent | 5280d939318c460fa9632857ee7f1c05856cb3a0 (diff) | |
download | cursespong-40a64ca7bf3fcae470f3af16f21597e80e23fbe3.zip cursespong-40a64ca7bf3fcae470f3af16f21597e80e23fbe3.tar.gz cursespong-40a64ca7bf3fcae470f3af16f21597e80e23fbe3.tar.bz2 |
Store position of ball in floats.
Diffstat (limited to 'src/ball.c')
-rw-r--r-- | src/ball.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ #include "ball.h" struct ball * -new_ball(int x, int y) +new_ball(float x, float y) { struct ball *b; @@ -28,7 +28,7 @@ free_ball(struct ball *b) void clear_ball(struct ball *b) { - mvprintw(b->y, b->x, " "); + mvprintw((int) (b->y + 0.5), (int) (b->x + 0.5), " "); } void @@ -40,5 +40,5 @@ update_ball(struct ball *b) void draw_ball(struct ball *b) { - mvprintw(b->y, b->x, "o"); + mvprintw((int) (b->y + 0.5), (int) (b->x + 0.5), "o"); } |