summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-08-31 04:00:30 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-08-31 04:00:30 +0000
commitfe608c840da725f7969e0f2cc014fa69997322d5 (patch)
tree336014f70ceb12e1e6bfa828b6e174f5d92aed59 /apps
parente76110cce98e1941edd0f94b21f31bf2a3498237 (diff)
Bubbles: Add support for vertical strides.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22568 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/bubbles.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index fe9e693a61..e8618e95bb 100644
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -1440,7 +1440,8 @@ static void bubbles_drawboard(struct game_context* bb) {
for(j=0; j<colmax; j++) {
if(bb->playboard[i][j].type >= 0 && !bb->playboard[i][j].delete) {
rb->lcd_bitmap_part(bubbles_emblem,
- 0, EMBLEM_HEIGHT*bb->playboard[i][j].type, EMBLEM_WIDTH,
+ 0, EMBLEM_HEIGHT*bb->playboard[i][j].type,
+ STRIDE(BMPWIDTH_bubbles_emblem, BMPHEIGHT_bubbles_emblem),
XOFS+indent+BUBBLE_WIDTH*j+(BUBBLE_WIDTH-EMBLEM_WIDTH)/2,
YOFS+ROW_HEIGHT*i+(BUBBLE_HEIGHT-EMBLEM_HEIGHT)/2+bb->compress*ROW_HEIGHT,
EMBLEM_WIDTH, EMBLEM_HEIGHT);
@@ -1456,7 +1457,8 @@ static void bubbles_drawboard(struct game_context* bb) {
/* display bubble to be shot */
rb->lcd_bitmap_part(bubbles_emblem,
- 0, EMBLEM_HEIGHT*bb->queue[bb->nextinq], EMBLEM_WIDTH,
+ 0, EMBLEM_HEIGHT*bb->queue[bb->nextinq],
+ STRIDE(BMPWIDTH_bubbles_emblem, BMPHEIGHT_bubbles_emblem),
SHOTX+(BUBBLE_WIDTH-EMBLEM_WIDTH)/2,
SHOTY+(BUBBLE_HEIGHT-EMBLEM_HEIGHT)/2,
EMBLEM_WIDTH, EMBLEM_HEIGHT);
@@ -1469,7 +1471,8 @@ static void bubbles_drawboard(struct game_context* bb) {
/* display next bubble to be shot */
#ifndef NEXT_BB_X
rb->lcd_bitmap_part(bubbles_emblem,
- 0, EMBLEM_HEIGHT*bb->queue[(bb->nextinq+1)%NUM_QUEUE], EMBLEM_WIDTH,
+ 0, EMBLEM_HEIGHT*bb->queue[(bb->nextinq+1)%NUM_QUEUE],
+ STRIDE(BMPWIDTH_bubbles_emblem, BMPHEIGHT_bubbles_emblem),
XOFS/2-BUBBLE_WIDTH/2+(BUBBLE_WIDTH-EMBLEM_WIDTH)/2,
SHOTY+(BUBBLE_HEIGHT-EMBLEM_HEIGHT)/2,
EMBLEM_WIDTH, EMBLEM_HEIGHT);
@@ -1480,7 +1483,8 @@ static void bubbles_drawboard(struct game_context* bb) {
rb->lcd_set_drawmode(DRMODE_SOLID);
#else
rb->lcd_bitmap_part(bubbles_emblem,
- 0, EMBLEM_HEIGHT*bb->queue[(bb->nextinq+1)%NUM_QUEUE], EMBLEM_WIDTH,
+ 0, EMBLEM_HEIGHT*bb->queue[(bb->nextinq+1)%NUM_QUEUE],
+ STRIDE(BMPWIDTH_bubbles_emblem, BMPHEIGHT_bubbles_emblem),
NEXT_BB_X + NEXT_BB_WIDTH/2-BUBBLE_WIDTH/2+(BUBBLE_WIDTH-EMBLEM_WIDTH)/2,
NEXT_BB_Y + (BUBBLE_HEIGHT-EMBLEM_HEIGHT)/2 + h,
EMBLEM_WIDTH, EMBLEM_HEIGHT);
@@ -1602,7 +1606,8 @@ static int bubbles_fire(struct game_context* bb) {
/* display shot */
bubbles_drawboard(bb);
- rb->lcd_bitmap_part(bubbles_emblem, 0, EMBLEM_HEIGHT*bubblecur, EMBLEM_WIDTH,
+ rb->lcd_bitmap_part(bubbles_emblem, 0, EMBLEM_HEIGHT*bubblecur,
+ STRIDE(BMPWIDTH_bubbles_emblem, BMPHEIGHT_bubbles_emblem),
SHOTX+tempxofs+(BUBBLE_WIDTH-EMBLEM_WIDTH)/2,
SHOTY+tempyofs+(BUBBLE_HEIGHT-EMBLEM_HEIGHT)/2,
EMBLEM_WIDTH, EMBLEM_HEIGHT);
@@ -2064,7 +2069,8 @@ static int bubbles_fall(struct game_context* bb) {
onscreen = true;
rb->lcd_bitmap_part(bubbles_emblem, 0,
- EMBLEM_HEIGHT*bb->playboard[i][j].type, EMBLEM_WIDTH,
+ EMBLEM_HEIGHT*bb->playboard[i][j].type,
+ STRIDE(BMPWIDTH_bubbles_emblem, BMPHEIGHT_bubbles_emblem),
XOFS+indent+BUBBLE_WIDTH*j+
(BUBBLE_WIDTH-EMBLEM_WIDTH)/2+xofs,
YOFS+ROW_HEIGHT*i+(BUBBLE_HEIGHT-EMBLEM_HEIGHT)/2+