diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-04 05:29:40 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-04 05:29:40 +0000 |
commit | 5d0ac8db6f26624d259e94873f0c27a0533d0815 (patch) | |
tree | d8501c58adeee81ddd1d1eafaf596c237e35d9a2 /apps | |
parent | 9c881f712e69ac08886a1c7527abf45954e3501e (diff) | |
download | rockbox-5d0ac8db6f26624d259e94873f0c27a0533d0815.tar.gz rockbox-5d0ac8db6f26624d259e94873f0c27a0533d0815.zip |
Brickmania: Fix paddle position jumps when an N powerup is picked up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22909 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/brickmania.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 5e0f7fd73c..059d3c3336 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -276,9 +276,9 @@ CONFIG_KEYPAD == SANSA_M200_PAD | |||
276 | #endif | 276 | #endif |
277 | 277 | ||
278 | /* The time (in ms) for one iteration through the game loop - decrease this | 278 | /* The time (in ms) for one iteration through the game loop - decrease this |
279 | to speed up the game - note that current_tick is (currently) only accurate | 279 | * to speed up the game - note that current_tick is (currently) only accurate |
280 | to 10ms. | 280 | * to 10ms. |
281 | */ | 281 | */ |
282 | #define CYCLETIME 30 | 282 | #define CYCLETIME 30 |
283 | 283 | ||
284 | #define TOPMARGIN MAX(BRICK_HEIGHT, FIXED3(8)) | 284 | #define TOPMARGIN MAX(BRICK_HEIGHT, FIXED3(8)) |
@@ -291,10 +291,8 @@ CONFIG_KEYPAD == SANSA_M200_PAD | |||
291 | /* Brickmania was originally designed for the H300, other targets should scale | 291 | /* Brickmania was originally designed for the H300, other targets should scale |
292 | * the speed up/down as needed based on the screen height. | 292 | * the speed up/down as needed based on the screen height. |
293 | */ | 293 | */ |
294 | #define SPEED_SCALE_H(y) \ | 294 | #define SPEED_SCALE_H(y) FIXED3_DIV(GAMESCREEN_HEIGHT, FIXED3(176)/(y) ) |
295 | FIXED3_DIV(GAMESCREEN_HEIGHT, FIXED3(176)/(y) ) | 295 | #define SPEED_SCALE_W(x) FIXED3_DIV(GAMESCREEN_WIDTH, FIXED3(220)/(x) ) |
296 | #define SPEED_SCALE_W(x) \ | ||
297 | FIXED3_DIV(GAMESCREEN_WIDTH, FIXED3(220)/(x) ) | ||
298 | 296 | ||
299 | /* These are all used as ball speeds depending on where the ball hit the | 297 | /* These are all used as ball speeds depending on where the ball hit the |
300 | * paddle. | 298 | * paddle. |
@@ -1368,7 +1366,8 @@ static int brickmania_game_loop(void) | |||
1368 | for(k=0;k<used_balls;k++) | 1366 | for(k=0;k<used_balls;k++) |
1369 | ball[k].glue=false; | 1367 | ball[k].glue=false; |
1370 | flip_sides=false; | 1368 | flip_sides=false; |
1371 | pad_pos_x += pad_width - (PAD_WIDTH/2); | 1369 | |
1370 | pad_pos_x += (pad_width-PAD_WIDTH)/2; | ||
1372 | pad_width = PAD_WIDTH; | 1371 | pad_width = PAD_WIDTH; |
1373 | break; | 1372 | break; |
1374 | case 5: /* Flip the paddle */ | 1373 | case 5: /* Flip the paddle */ |