summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/picture.c13
-rw-r--r--apps/plugins/lib/picture.h1
2 files changed, 8 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
68void vertical_picture_draw_sprite(struct screen* display, const struct picture* picture, 68void 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}
diff --git a/apps/plugins/lib/picture.h b/apps/plugins/lib/picture.h
index 0013489039..7aa9899018 100644
--- a/apps/plugins/lib/picture.h
+++ b/apps/plugins/lib/picture.h
@@ -27,6 +27,7 @@ struct picture{
27 const void* data; 27 const void* data;
28 int width; 28 int width;
29 int height; 29 int height;
30 int slide_height;
30}; 31};
31 32
32void picture_draw(struct screen* display, const struct picture* picture, 33void picture_draw(struct screen* display, const struct picture* picture,