diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2010-03-27 18:23:43 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2010-03-27 18:23:43 +0000 |
commit | 857e946923b5224053e8c2820456c5fbe404b9d6 (patch) | |
tree | df377ea1007b8d8558277dae09bf63e2c8edb28f /apps | |
parent | 8e8d2c2a5b9550307f97e4396cacdfd00caabf21 (diff) | |
download | rockbox-857e946923b5224053e8c2820456c5fbe404b9d6.tar.gz rockbox-857e946923b5224053e8c2820456c5fbe404b9d6.zip |
Brickmania: Prevent a ball that is sticked to the edge of the pad from being fired outside the screen's region when the pad is moved all the way to the screen's edge
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25357 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/brickmania.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index a4adcc29d0..13827edb53 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -2272,7 +2272,14 @@ static int brickmania_game_loop(void) | |||
2272 | for(k=0;k<used_balls;k++) | 2272 | for(k=0;k<used_balls;k++) |
2273 | { | 2273 | { |
2274 | if (game_state==ST_READY || ball[k].glue) | 2274 | if (game_state==ST_READY || ball[k].glue) |
2275 | { | ||
2275 | ball[k].pos_x+=dx; | 2276 | ball[k].pos_x+=dx; |
2277 | |||
2278 | if (ball[k].pos_x < HALFBALL) | ||
2279 | ball[k].pos_x = HALFBALL; | ||
2280 | else if (ball[k].pos_x > GAMESCREEN_WIDTH - HALFBALL) | ||
2281 | ball[k].pos_x = GAMESCREEN_WIDTH - HALFBALL; | ||
2282 | } | ||
2276 | } | 2283 | } |
2277 | } | 2284 | } |
2278 | } | 2285 | } |