forked from len0rd/rockbox
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
This commit is contained in:
parent
fa7f829665
commit
f7a67625dc
1 changed files with 30 additions and 11 deletions
|
|
@ -1571,18 +1571,37 @@ static int brickmania_game_loop(void)
|
||||||
} /* for j */
|
} /* for j */
|
||||||
} /* for i */
|
} /* for i */
|
||||||
|
|
||||||
/* draw the pad */
|
/* draw the paddle according to the PAD_WIDTH */
|
||||||
rb->lcd_bitmap_part(
|
if( pad_width == PAD_WIDTH ) /* Normal width */
|
||||||
/* Figure out which paddle to draw */
|
{
|
||||||
(pad_width == PAD_WIDTH) ? brickmania_pads :
|
rb->lcd_bitmap_part(
|
||||||
(pad_width == LONG_PAD_WIDTH) ? brickmania_long_pads :
|
brickmania_pads,
|
||||||
|
0, pad_type*PAD_HEIGHT,
|
||||||
|
STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_pads,
|
||||||
|
BMPHEIGHT_brickmania_pads),
|
||||||
|
INT3(pad_pos_x), INT3(PAD_POS_Y),
|
||||||
|
INT3(pad_width), INT3(PAD_HEIGHT) );
|
||||||
|
}
|
||||||
|
else if( pad_width == LONG_PAD_WIDTH ) /* Long Pad */
|
||||||
|
{
|
||||||
|
rb->lcd_bitmap_part(
|
||||||
|
brickmania_long_pads,
|
||||||
|
0,pad_type*PAD_HEIGHT,
|
||||||
|
STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_long_pads,
|
||||||
|
BMPHEIGHT_brickmania_long_pads),
|
||||||
|
INT3(pad_pos_x), INT3(PAD_POS_Y),
|
||||||
|
INT3(pad_width), INT3(PAD_HEIGHT) );
|
||||||
|
}
|
||||||
|
else /* Short pad */
|
||||||
|
{
|
||||||
|
rb->lcd_bitmap_part(
|
||||||
brickmania_short_pads,
|
brickmania_short_pads,
|
||||||
|
0,pad_type*PAD_HEIGHT,
|
||||||
0, pad_type*INT3(PAD_HEIGHT),
|
STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_short_pads,
|
||||||
STRIDE( SCREEN_MAIN, BMPWIDTH_brickmania_pads,
|
BMPHEIGHT_brickmania_short_pads),
|
||||||
BMPHEIGHT_brickmania_pads),
|
INT3(pad_pos_x), INT3(PAD_POS_Y),
|
||||||
INT3(pad_pos_x), INT3(PAD_POS_Y),
|
INT3(pad_width), INT3(PAD_HEIGHT) );
|
||||||
INT3(pad_width), INT3(PAD_HEIGHT) );
|
}
|
||||||
|
|
||||||
/* If the game is not paused continue */
|
/* If the game is not paused continue */
|
||||||
if (game_state!=ST_PAUSE)
|
if (game_state!=ST_PAUSE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue