summaryrefslogtreecommitdiffstats
path: root/apps/plugins/star.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-09-04 00:46:24 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-09-04 00:46:24 +0000
commit25123570c76f2055d3ae05d79741038c0e23c536 (patch)
treea2edd8351a611b9cef0aef08c880a994d9e1d75e /apps/plugins/star.c
parentf6025186fd1f6d9083c07568bc3d160f3e8774f8 (diff)
downloadrockbox-25123570c76f2055d3ae05d79741038c0e23c536.tar.gz
rockbox-25123570c76f2055d3ae05d79741038c0e23c536.tar.bz2
rockbox-25123570c76f2055d3ae05d79741038c0e23c536.zip
Fix STRIDE macro for multiscreen and add stride support for picture lib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22615 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/star.c')
-rw-r--r--apps/plugins/star.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index e40fa5a2dc..6079ba488e 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -729,7 +729,8 @@ static void star_display_board_info(int current_level)
rb->lcd_bitmap_part(star_tiles, 0, control == STAR_CONTROL_BALL ?
BALL*TILE_HEIGHT : BLOCK*TILE_HEIGHT,
- STRIDE(BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
STAR_OFFSET_X + (STAR_WIDTH-1) * TILE_WIDTH,
tile_pos_y, TILE_WIDTH, TILE_HEIGHT);
@@ -768,7 +769,8 @@ static int star_load_level(int current_level)
# define DRAW_TILE( a ) \
rb->lcd_bitmap_part( star_tiles, 0, \
a*TILE_HEIGHT, \
- STRIDE( BMPWIDTH_star_tiles, \
+ STRIDE( SCREEN_MAIN, \
+ BMPWIDTH_star_tiles, \
BMPHEIGHT_star_tiles), \
STAR_OFFSET_X + x * TILE_WIDTH, \
STAR_OFFSET_Y + y * TILE_HEIGHT, \
@@ -820,10 +822,12 @@ static void star_animate_tile(int tile_no, int start_x, int start_y,
{
STAR_SLEEP
rb->lcd_bitmap_part(star_tiles, 0, SPACE * TILE_HEIGHT,
- STRIDE(BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x, start_y, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_bitmap_part(star_tiles, 0, tile_no * TILE_HEIGHT,
- STRIDE(BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x + delta_x * i, start_y, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_update_rect(start_x + delta_x * i - (delta_x>0?1:0),
start_y, TILE_WIDTH + 1, TILE_HEIGHT);
@@ -835,10 +839,12 @@ static void star_animate_tile(int tile_no, int start_x, int start_y,
{
STAR_SLEEP
rb->lcd_bitmap_part(star_tiles, 0, SPACE * TILE_HEIGHT,
- STRIDE(BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x, start_y, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_bitmap_part(star_tiles, 0, tile_no * TILE_HEIGHT,
- STRIDE(BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x, start_y + delta_y * i, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_update_rect(start_x, start_y + delta_y * i - (delta_y>0?1:0),
TILE_WIDTH, TILE_HEIGHT + 1);