forked from len0rd/rockbox
Add some more explicit defines for my previous commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13561 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b5f4d90b4b
commit
887b31c01a
2 changed files with 18 additions and 14 deletions
|
|
@ -69,13 +69,6 @@ struct align_pos {
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
||||||
#define MAX_IMAGES (26*2) /* a-z and A-Z */
|
#define MAX_IMAGES (26*2) /* a-z and A-Z */
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
|
||||||
#define MAX_BITMAPS MAX_IMAGES+2 /* WPS images + pbar bitmap + backdrop */
|
|
||||||
#else
|
|
||||||
#define MAX_BITMAPS MAX_IMAGES+1 /* WPS images + pbar bitmap */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \
|
#define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \
|
||||||
+ (2*LCD_HEIGHT*LCD_WIDTH/8))
|
+ (2*LCD_HEIGHT*LCD_WIDTH/8))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,20 @@ static int numoptions[WPS_MAX_COND_LEVEL];
|
||||||
static int line;
|
static int line;
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
|
#define MAX_BITMAPS MAX_IMAGES+2 /* WPS images + pbar bitmap + backdrop */
|
||||||
|
#else
|
||||||
|
#define MAX_BITMAPS MAX_IMAGES+1 /* WPS images + pbar bitmap */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PROGRESSBAR_BMP MAX_IMAGES
|
||||||
|
#define BACKDROP_BMP MAX_IMAGES+1
|
||||||
|
|
||||||
/* pointers to the bitmap filenames in the WPS source */
|
/* pointers to the bitmap filenames in the WPS source */
|
||||||
static const char *bmp_names[MAX_BITMAPS];
|
static const char *bmp_names[MAX_BITMAPS];
|
||||||
#endif
|
|
||||||
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/* debugging function */
|
/* debugging function */
|
||||||
|
|
@ -468,13 +479,13 @@ static int parse_image_special(const char *wps_bufptr,
|
||||||
if (token->type == WPS_TOKEN_IMAGE_PROGRESS_BAR)
|
if (token->type == WPS_TOKEN_IMAGE_PROGRESS_BAR)
|
||||||
{
|
{
|
||||||
/* format: %P|filename.bmp| */
|
/* format: %P|filename.bmp| */
|
||||||
bmp_names[MAX_IMAGES] = wps_bufptr + 1;
|
bmp_names[PROGRESSBAR_BMP] = wps_bufptr + 1;
|
||||||
}
|
}
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
else if (token->type == WPS_TOKEN_IMAGE_BACKDROP)
|
else if (token->type == WPS_TOKEN_IMAGE_BACKDROP)
|
||||||
{
|
{
|
||||||
/* format: %X|filename.bmp| */
|
/* format: %X|filename.bmp| */
|
||||||
bmp_names[MAX_IMAGES + 1] = wps_bufptr + 1;
|
bmp_names[BACKDROP_BMP] = wps_bufptr + 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -921,14 +932,14 @@ static void load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
|
||||||
bool *loaded;
|
bool *loaded;
|
||||||
|
|
||||||
int n;
|
int n;
|
||||||
for (n = 0; n < MAX_BITMAPS - 1; n++)
|
for (n = 0; n < BACKDROP_BMP; n++)
|
||||||
{
|
{
|
||||||
if (bmp_names[n])
|
if (bmp_names[n])
|
||||||
{
|
{
|
||||||
get_image_filename(bmp_names[n], bmpdir,
|
get_image_filename(bmp_names[n], bmpdir,
|
||||||
img_path, sizeof(img_path));
|
img_path, sizeof(img_path));
|
||||||
|
|
||||||
if (n == MAX_IMAGES) {
|
if (n == PROGRESSBAR_BMP) {
|
||||||
/* progressbar bitmap */
|
/* progressbar bitmap */
|
||||||
bitmap = &wps_data->progressbar.bm;
|
bitmap = &wps_data->progressbar.bm;
|
||||||
loaded = &wps_data->progressbar.have_bitmap_pb;
|
loaded = &wps_data->progressbar.have_bitmap_pb;
|
||||||
|
|
@ -948,9 +959,9 @@ static void load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1))
|
#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1))
|
||||||
if (bmp_names[MAX_IMAGES + 1])
|
if (bmp_names[BACKDROP_BMP])
|
||||||
{
|
{
|
||||||
get_image_filename(bmp_names[MAX_IMAGES + 1], bmpdir,
|
get_image_filename(bmp_names[BACKDROP_BMP], bmpdir,
|
||||||
img_path, sizeof(img_path));
|
img_path, sizeof(img_path));
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
if (wps_data->remote_wps)
|
if (wps_data->remote_wps)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue