summaryrefslogtreecommitdiffstats
path: root/apps/plugins/invadrox.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/invadrox.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/invadrox.c')
-rw-r--r--apps/plugins/invadrox.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 33ec343a87..1886ed4b49 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -684,7 +684,8 @@ void draw_number(int x, int y, int num, int digits)
d = num % 10;
num = num / 10;
rb->lcd_bitmap_part(invadrox_numbers, d * NUMBERS_WIDTH, 0,
- STRIDE( BMPWIDTH_invadrox_numbers,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_numbers,
BMPHEIGHT_invadrox_numbers),
x + i * (NUMBERS_WIDTH + NUM_SPACING), y,
NUMBERS_WIDTH, FONT_HEIGHT);
@@ -715,7 +716,8 @@ void draw_lives(void)
int i;
/* Lives num */
rb->lcd_bitmap_part(invadrox_numbers, lives * NUMBERS_WIDTH, 0,
- STRIDE( BMPWIDTH_invadrox_numbers,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_numbers,
BMPHEIGHT_invadrox_numbers),
PLAYFIELD_X + LIVES_X, PLAYFIELD_Y + 2,
NUMBERS_WIDTH, FONT_HEIGHT);
@@ -723,7 +725,8 @@ void draw_lives(void)
/* Ships */
for (i = 0; i < (lives - 1); i++) {
rb->lcd_bitmap_part(invadrox_ships, 0, 0,
- STRIDE( BMPWIDTH_invadrox_ships,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_ships,
BMPHEIGHT_invadrox_ships),
PLAYFIELD_X + LIVES_X + SHIP_WIDTH + i * (SHIP_WIDTH + NUM_SPACING),
PLAYFIELD_Y + 1, SHIP_WIDTH, SHIP_HEIGHT);
@@ -747,7 +750,8 @@ inline void draw_aliens(void)
for (i = 0; i < 5 * ALIENS; i++) {
rb->lcd_bitmap_part(invadrox_aliens, aliens[i].x & 1 ? ALIEN_WIDTH : 0,
aliens[i].type * ALIEN_HEIGHT,
- STRIDE( BMPWIDTH_invadrox_aliens,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_aliens,
BMPHEIGHT_invadrox_aliens),
PLAYFIELD_X + LIVES_X + aliens[i].x * ALIEN_SPEED,
ALIEN_START_Y + aliens[i].y * ALIEN_HEIGHT,
@@ -888,7 +892,8 @@ bool move_aliens(void)
rb->lcd_bitmap_part(invadrox_aliens,
aliens[curr_alien].x & 1 ? ALIEN_WIDTH : 0,
aliens[curr_alien].type * ALIEN_HEIGHT,
- STRIDE( BMPWIDTH_invadrox_aliens,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_aliens,
BMPHEIGHT_invadrox_aliens),
x, y, ALIEN_WIDTH, ALIEN_HEIGHT);
@@ -918,7 +923,8 @@ inline void draw_ship(void)
/* Draw ship */
rb->lcd_bitmap_part(invadrox_ships, 0, ship_frame * SHIP_HEIGHT,
- STRIDE( BMPWIDTH_invadrox_ships,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_ships,
BMPHEIGHT_invadrox_ships),
ship_x, SHIP_Y, SHIP_WIDTH, SHIP_HEIGHT);
if (ship_hit) {
@@ -1160,7 +1166,8 @@ inline void draw_bomb(int i)
{
rb->lcd_bitmap_part(invadrox_bombs, bombs[i].type * BOMB_WIDTH,
bombs[i].frame * BOMB_HEIGHT,
- STRIDE( BMPWIDTH_invadrox_bombs,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_bombs,
BMPHEIGHT_invadrox_bombs),
bombs[i].x, bombs[i].y,
BOMB_WIDTH, BOMB_HEIGHT);
@@ -1262,7 +1269,8 @@ void move_bombs(void)
bombs[i].state = S_EXPLODE * 4;
bombs[i].target = TARGET_SHIP;
rb->lcd_bitmap_part(invadrox_ships, 0, 1 * SHIP_HEIGHT,
- STRIDE( BMPWIDTH_invadrox_ships,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_ships,
BMPHEIGHT_invadrox_ships),
ship_x, SHIP_Y,
SHIP_WIDTH, SHIP_HEIGHT);