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:
parent
f6025186fd
commit
25123570c7
28 changed files with 194 additions and 112 deletions
|
@ -26,15 +26,15 @@ void picture_draw(struct screen* display, const struct picture* picture,
|
|||
display->bitmap(
|
||||
picture->data,
|
||||
x, y,
|
||||
picture->width, picture->height
|
||||
picture->width, picture->slide_height
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a part of the given picture on the given screen
|
||||
* Use it when the data contains multiple pictures from top to bottom.
|
||||
* In that case, picture.height represents the height of one picture,
|
||||
* not the whole set.
|
||||
* In that case, picture.slide_height represents the height of one picture,
|
||||
* not the whole set. picture.height represents the height of the whole image
|
||||
* @param display the screen where to display the picture
|
||||
* @param picture the picture's data, only a part will be displayed
|
||||
* @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
|
|||
picture->data,
|
||||
/*slice into picture->data */
|
||||
0, yoffset,
|
||||
picture->width,
|
||||
STRIDE(display->screen_type, picture->width, picture->height),
|
||||
/* Position on the screen */
|
||||
x, y, picture->width, picture->height
|
||||
x, y, picture->width, picture->slide_height
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -68,5 +68,6 @@ void vertical_picture_draw_part(struct screen* display, const struct picture* pi
|
|||
void vertical_picture_draw_sprite(struct screen* display, const struct picture* picture,
|
||||
int sprite_no,
|
||||
int x, int y){
|
||||
vertical_picture_draw_part(display, picture, sprite_no*picture->height, x, y);
|
||||
vertical_picture_draw_part( display, picture,
|
||||
sprite_no*picture->slide_height, x, y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue