projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.33.tar.gz
[xscreensaver]
/
hacks
/
pong.c
diff --git
a/hacks/pong.c
b/hacks/pong.c
index 38e1d844f7d8bf23da936c32ce9526fdaa770c6b..a68872865b44e3765ca6c2bff15ef7577ae98229 100644
(file)
--- a/
hacks/pong.c
+++ b/
hacks/pong.c
@@
-105,6
+105,9
@@
enum {
PONG_TMARG = 10
};
PONG_TMARG = 10
};
+static void
+p_hit_top_bottom(Paddle *p);
+
static void
hit_top_bottom(struct state *st)
{
static void
hit_top_bottom(struct state *st)
{
@@
-155,6
+158,10
@@
new_game(struct state *st)
st->l_paddle.h = PONG_H/4;
st->r_paddle.h = PONG_H/4;
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
}
static void