diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-08 00:15:54 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-08 00:15:54 +0000 |
commit | f7a67625dcfe3bc9d532c8fe35146de2b5d3af55 (patch) | |
tree | a415661fb3b9adb6a9b0d8a5ff899a0f4da937f8 | |
parent | fa7f829665d6595c04d12f051636170bc61f9d09 (diff) | |
download | rockbox-f7a67625dcfe3bc9d532c8fe35146de2b5d3af55.tar.gz rockbox-f7a67625dcfe3bc9d532c8fe35146de2b5d3af55.zip |
Brickmania: Fix the paddle drawing - The strides were wrong with paddles other than the standard one.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23003 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/brickmania.c | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 74539518b7..4a67e22b67 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -1571,18 +1571,37 @@ static int brickmania_game_loop(void) | |||
1571 | } /* for j */ | 1571 | } /* for j */ |
1572 | } /* for i */ | 1572 | } /* for i */ |
1573 | 1573 | ||
1574 | /* draw the pad */ | 1574 | /* draw the paddle according to the PAD_WIDTH */ |
1575 | rb->lcd_bitmap_part( | 1575 | if( pad_width == PAD_WIDTH ) /* Normal width */ |
1576 | /* Figure out which paddle to draw */ | 1576 | { |
1577 | (pad_width == PAD_WIDTH) ? brickmania_pads : | 1577 | rb->lcd_bitmap_part( |
1578 | (pad_width == LONG_PAD_WIDTH) ? brickmania_long_pads : | 1578 | brickmania_pads, |
1579 | 0, pad_type*PAD_HEIGHT, | ||
1580 | STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_pads, | ||
1581 | BMPHEIGHT_brickmania_pads), | ||
1582 | INT3(pad_pos_x), INT3(PAD_POS_Y), | ||
1583 | INT3(pad_width), INT3(PAD_HEIGHT) ); | ||
1584 | } | ||
1585 | else if( pad_width == LONG_PAD_WIDTH ) /* Long Pad */ | ||
1586 | { | ||
1587 | rb->lcd_bitmap_part( | ||
1588 | brickmania_long_pads, | ||
1589 | 0,pad_type*PAD_HEIGHT, | ||
1590 | STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_long_pads, | ||
1591 | BMPHEIGHT_brickmania_long_pads), | ||
1592 | INT3(pad_pos_x), INT3(PAD_POS_Y), | ||
1593 | INT3(pad_width), INT3(PAD_HEIGHT) ); | ||
1594 | } | ||
1595 | else /* Short pad */ | ||
1596 | { | ||
1597 | rb->lcd_bitmap_part( | ||
1579 | brickmania_short_pads, | 1598 | brickmania_short_pads, |
1580 | 1599 | 0,pad_type*PAD_HEIGHT, | |
1581 | 0, pad_type*INT3(PAD_HEIGHT), | 1600 | STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_short_pads, |
1582 | STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_pads, | 1601 | BMPHEIGHT_brickmania_short_pads), |
1583 | BMPHEIGHT_brickmania_pads), | 1602 | INT3(pad_pos_x), INT3(PAD_POS_Y), |
1584 | INT3(pad_pos_x), INT3(PAD_POS_Y), | 1603 | INT3(pad_width), INT3(PAD_HEIGHT) ); |
1585 | INT3(pad_width), INT3(PAD_HEIGHT) ); | 1604 | } |
1586 | 1605 | ||
1587 | /* If the game is not paused continue */ | 1606 | /* If the game is not paused continue */ |
1588 | if (game_state!=ST_PAUSE) | 1607 | if (game_state!=ST_PAUSE) |