summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sliding_puzzle.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-08-31 13:56:48 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-08-31 13:56:48 +0000
commitcdafa3e49825c7eec278000fc097cd5e047249ec (patch)
tree3bf1212cad6a3a3c67c241e795e8cc09d05e8b12 /apps/plugins/sliding_puzzle.c
parent1baf5c946329d9d6ba69d27277cc59a4d6e29e16 (diff)
downloadrockbox-cdafa3e49825c7eec278000fc097cd5e047249ec.tar.gz
rockbox-cdafa3e49825c7eec278000fc097cd5e047249ec.tar.bz2
rockbox-cdafa3e49825c7eec278000fc097cd5e047249ec.zip
pegbox, sliding_puzzle, sokoban, solitaire, sudoku, and superdom: Add support for vertical strides
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22573 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/sliding_puzzle.c')
-rw-r--r--apps/plugins/sliding_puzzle.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 78ec5aa5e5..af7fe83299 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -404,8 +404,9 @@ static void draw_spot(int p, int x, int y)
/* the bottom-right cell of the default sliding_puzzle image is
an appropriate hole graphic */
rb->lcd_bitmap_part(sliding_puzzle, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
- ((p-1)/SPOTS_X)*SPOTS_HEIGHT,
- IMAGE_WIDTH, x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
+ ((p-1)/SPOTS_X)*SPOTS_HEIGHT,
+ STRIDE(BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
+ x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
#else
/* just draw a black rectangle */
int old_fg = rb->lcd_get_foreground();
@@ -417,8 +418,9 @@ static void draw_spot(int p, int x, int y)
else if (picmode != PICMODE_NUMERALS)
{
rb->lcd_bitmap_part( puzzle_bmp_ptr, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
- ((p-1)/SPOTS_X)*SPOTS_HEIGHT,
- IMAGE_WIDTH, x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
+ ((p-1)/SPOTS_X)*SPOTS_HEIGHT,
+ STRIDE(BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
+ x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
} else {
rb->lcd_drawrect(x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);