summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-08-31 04:21:21 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-08-31 04:21:21 +0000
commit5fc5b5093a9f916150a50e7c28dfc7298108a115 (patch)
tree118eb9e983be6aaf77979968854104cbcf329893
parent09ecdd2d2f80769ab41d140e38f935417813b102 (diff)
Chessbox and Flipit: Add support for vertical strides.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22570 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/chessbox/chessbox.c6
-rw-r--r--apps/plugins/flipit.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c
index c1e6092f3a..0369eda174 100644
--- a/apps/plugins/chessbox/chessbox.c
+++ b/apps/plugins/chessbox/chessbox.c
@@ -134,7 +134,8 @@ static void cb_drawboard (void) {
if ( piece == no_piece ) {
rb->lcd_bitmap_part ( chessbox_pieces , 0 ,
TILE_HEIGHT * b_color ,
- TILE_WIDTH ,
+ STRIDE( BMPWIDTH_chessbox_pieces,
+ BMPHEIGHT_chessbox_pieces) ,
XOFS + x*TILE_WIDTH ,
YOFS + ( 7 - y )*TILE_HEIGHT ,
TILE_WIDTH ,
@@ -146,7 +147,8 @@ static void cb_drawboard (void) {
4 * TILE_HEIGHT * ( piece - 1 ) +
2 * TILE_HEIGHT * p_color +
TILE_HEIGHT * b_color ,
- TILE_WIDTH ,
+ STRIDE( BMPWIDTH_chessbox_pieces,
+ BMPHEIGHT_chessbox_pieces) ,
XOFS + x*TILE_WIDTH ,
YOFS + (7 - y)*TILE_HEIGHT ,
TILE_WIDTH ,
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 1023d3ac54..9a79be6acb 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -349,7 +349,8 @@ static int cursor_pos, moves;
/* draw a spot at the coordinates (x,y), range of p is 0-19 */
static void draw_spot(int p)
{
- rb->lcd_bitmap_part( flipit_tokens, 0, spots[p] * TK_HEIGHT, TK_WIDTH,
+ rb->lcd_bitmap_part( flipit_tokens, 0, spots[p] * TK_HEIGHT,
+ STRIDE(BMPWIDTH_flipit_tokens, BMPHEIGHT_flipit_tokens),
GRID_LEFT + (p%5) * (TK_WIDTH+TK_SPACE),
GRID_TOP + (p/5) * (TK_HEIGHT+TK_SPACE),
TK_WIDTH, TK_HEIGHT );