diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-09-04 00:46:24 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-09-04 00:46:24 +0000 |
commit | 25123570c76f2055d3ae05d79741038c0e23c536 (patch) | |
tree | a2edd8351a611b9cef0aef08c880a994d9e1d75e /apps/plugins/lib/picture.c | |
parent | f6025186fd1f6d9083c07568bc3d160f3e8774f8 (diff) | |
download | rockbox-25123570c76f2055d3ae05d79741038c0e23c536.tar.gz 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/lib/picture.c')
-rw-r--r-- | apps/plugins/lib/picture.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/plugins/lib/picture.c b/apps/plugins/lib/picture.c index a759b945b6..7717b76eeb 100644 --- a/apps/plugins/lib/picture.c +++ b/apps/plugins/lib/picture.c | |||
@@ -26,15 +26,15 @@ void picture_draw(struct screen* display, const struct picture* picture, | |||
26 | display->bitmap( | 26 | display->bitmap( |
27 | picture->data, | 27 | picture->data, |
28 | x, y, | 28 | x, y, |
29 | picture->width, picture->height | 29 | picture->width, picture->slide_height |
30 | ); | 30 | ); |
31 | } | 31 | } |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Draws a part of the given picture on the given screen | 34 | * Draws a part of the given picture on the given screen |
35 | * Use it when the data contains multiple pictures from top to bottom. | 35 | * Use it when the data contains multiple pictures from top to bottom. |
36 | * In that case, picture.height represents the height of one picture, | 36 | * In that case, picture.slide_height represents the height of one picture, |
37 | * not the whole set. | 37 | * not the whole set. picture.height represents the height of the whole image |
38 | * @param display the screen where to display the picture | 38 | * @param display the screen where to display the picture |
39 | * @param picture the picture's data, only a part will be displayed | 39 | * @param picture the picture's data, only a part will be displayed |
40 | * @param yoffset display the data in the picture from yoffset to | 40 | * @param yoffset display the data in the picture from yoffset to |
@@ -49,9 +49,9 @@ void vertical_picture_draw_part(struct screen* display, const struct picture* pi | |||
49 | picture->data, | 49 | picture->data, |
50 | /*slice into picture->data */ | 50 | /*slice into picture->data */ |
51 | 0, yoffset, | 51 | 0, yoffset, |
52 | picture->width, | 52 | STRIDE(display->screen_type, picture->width, picture->height), |
53 | /* Position on the screen */ | 53 | /* Position on the screen */ |
54 | x, y, picture->width, picture->height | 54 | x, y, picture->width, picture->slide_height |
55 | ); | 55 | ); |
56 | } | 56 | } |
57 | 57 | ||
@@ -68,5 +68,6 @@ void vertical_picture_draw_part(struct screen* display, const struct picture* pi | |||
68 | void vertical_picture_draw_sprite(struct screen* display, const struct picture* picture, | 68 | void vertical_picture_draw_sprite(struct screen* display, const struct picture* picture, |
69 | int sprite_no, | 69 | int sprite_no, |
70 | int x, int y){ | 70 | int x, int y){ |
71 | vertical_picture_draw_part(display, picture, sprite_no*picture->height, x, y); | 71 | vertical_picture_draw_part( display, picture, |
72 | sprite_no*picture->slide_height, x, y); | ||
72 | } | 73 | } |