PONG_TMARG = 10
};
+static void
+p_hit_top_bottom(Paddle *p);
+
static void
hit_top_bottom(struct state *st)
{
st->l_paddle.h = PONG_H/4;
st->r_paddle.h = PONG_H/4;
+ /* Adjust paddle position again, because
+ paddle length is enlarged (reset) above. */
+ p_hit_top_bottom(&st->l_paddle);
+ p_hit_top_bottom(&st->r_paddle);
}
static void
pong_draw (Display *dpy, Window window, void *closure)
{
struct state *st = (struct state *) closure;
+ const analogtv_reception *reception = &st->reception;
if (st->clock)
{
}
if (1) paint_ball(st);
- analogtv_init_signal(st->tv, st->noise);
analogtv_reception_update(&st->reception);
- analogtv_add_signal(st->tv, &st->reception);
- analogtv_draw(st->tv);
+ analogtv_draw(st->tv, st->noise, &reception, 1);
- return 10000;
+#ifdef USE_IPHONE
+ return 0;
+#else
+ return 5000;
+#endif
}
\f