1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Karl Kurbjun 2009-09-04 00:46:24 +00:00
parent f6025186fd
commit 25123570c7
28 changed files with 194 additions and 112 deletions

View file

@ -407,7 +407,8 @@ static void draw_spot(int p, int x, int y)
an appropriate hole graphic */
rb->lcd_bitmap_part(sliding_puzzle, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
((p-1)/SPOTS_X)*SPOTS_HEIGHT,
STRIDE(BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
STRIDE( SCREEN_MAIN,
BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
#else
/* just draw a black rectangle */
@ -421,7 +422,8 @@ static void draw_spot(int p, int x, int y)
{
rb->lcd_bitmap_part( puzzle_bmp_ptr, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
((p-1)/SPOTS_X)*SPOTS_HEIGHT,
STRIDE(BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
STRIDE( SCREEN_MAIN,
BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
} else {
rb->lcd_drawrect(x, y, SPOTS_WIDTH, SPOTS_HEIGHT);