diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-07-06 13:23:28 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-07-06 13:23:28 +0000 |
| commit | d035f255c95d69c342d3ecbcf4cc88c1f1c01af2 (patch) | |
| tree | b12499b9c893086b12c03684986ee80a1abc1472 | |
| parent | feeac4f15fdd6e680522b172f7217ab0a98ad0f7 (diff) | |
| download | rockbox-d035f255c95d69c342d3ecbcf4cc88c1f1c01af2.zip rockbox-d035f255c95d69c342d3ecbcf4cc88c1f1c01af2.tar.gz rockbox-d035f255c95d69c342d3ecbcf4cc88c1f1c01af2.tar.bz2 rockbox-d035f255c95d69c342d3ecbcf4cc88c1f1c01af2.tar.xz | |
get checkwps building again (FS#9150) - still doesnt compile on d2 and mr500 though
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17957 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/gui/wps_parser.c | 6 | ||||
| -rw-r--r-- | apps/misc.c | 1 | ||||
| -rw-r--r-- | tools/checkwps/checkwps.c | 49 | ||||
| -rw-r--r-- | tools/checkwps/checkwps.h | 42 |
4 files changed, 84 insertions, 14 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 73516f6..682ff68 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c @@ -31,6 +31,8 @@ #define DEBUGF printf #define FONT_SYSFIXED 0 #define FONT_UI 1 +#define SYSFONT_HEIGHT 8 +#include "checkwps.h" #else #include "debug.h" #endif @@ -818,7 +820,11 @@ static int parse_progressbar(const char *wps_bufptr, const char *ptr = wps_bufptr; struct progressbar *pb; struct viewport *vp = &wps_data->viewports[wps_data->num_viewports].vp; +#ifndef __PCTOOL__ int font_height = font_get(vp->font)->height; +#else + int font_height = 8; +#endif int line_y_pos = font_height*(wps_data->num_lines - wps_data->viewports[wps_data->num_viewports].first_line); diff --git a/apps/misc.c b/apps/misc.c index f37bd5f..60955b9 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -24,6 +24,7 @@ #include "lcd.h" #include "file.h" #ifdef __PCTOOL__ +#include <stdint.h> #include <stdarg.h> #else #include "sprintf.h" diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 409a62c..2a6327d 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c @@ -1,8 +1,30 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2008 by Dave Chapman + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include "config.h" #include "gwps.h" +#include "checkwps.h" #define MIN(x,y) ((x) > (y) ? (y) : (x)) @@ -89,11 +111,6 @@ bool load_remote_wps_backdrop(const char* filename) static char pluginbuf[PLUGIN_BUFFER_SIZE]; -static int dummy_func1(void) -{ - return 0; -} - static unsigned dummy_func2(void) { return 0; @@ -104,21 +121,27 @@ void* plugin_get_buffer(size_t *buffer_size) *buffer_size = PLUGIN_BUFFER_SIZE; return pluginbuf; } - +struct user_settings global_settings = { + .statusbar = true, +#ifdef HAVE_LCD_COLOR + .bg_color = LCD_DEFAULT_BG, + .fg_color = LCD_DEFAULT_FG, +#endif +}; + + struct screen screens[NB_SCREENS] = { { .screen_type=SCREEN_MAIN, - .width=LCD_WIDTH, - .height=LCD_HEIGHT, + .lcdwidth=LCD_WIDTH, + .lcdheight=LCD_HEIGHT, .depth=LCD_DEPTH, #ifdef HAVE_LCD_COLOR .is_color=true, #else .is_color=false, #endif - .getxmargin=dummy_func1, - .getymargin=dummy_func1, #if LCD_DEPTH > 1 .get_foreground=dummy_func2, .get_background=dummy_func2, @@ -127,12 +150,10 @@ struct screen screens[NB_SCREENS] = #ifdef HAVE_REMOTE_LCD { .screen_type=SCREEN_REMOTE, - .width=LCD_REMOTE_WIDTH, - .height=LCD_REMOTE_HEIGHT, + .lcdwidth=LCD_REMOTE_WIDTH, + .lcdheight=LCD_REMOTE_HEIGHT, .depth=LCD_REMOTE_DEPTH, .is_color=false,/* No color remotes yet */ - .getxmargin=dummy_func1, - .getymargin=dummy_func1, #if LCD_REMOTE_DEPTH > 1 .get_foreground=dummy_func2, .get_background=dummy_func2, diff --git a/tools/checkwps/checkwps.h b/tools/checkwps/checkwps.h new file mode 100644 index 0000000..fa3b425 --- /dev/null +++ b/tools/checkwps/checkwps.h @@ -0,0 +1,42 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2008 by Jonathan Gordon + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _CHECKWPS_H_ +#define _CHECKWPS_H_ +#include <stdio.h> +#include <stdlib.h> +#include <fcntl.h> + +/* subset of global_settings needed to build checkwps. */ +struct user_settings { + bool statusbar; +#ifdef HAVE_LCD_COLOR + int bg_color; /* background color native format */ + int fg_color; /* foreground color native format */ +#endif +}; + +extern struct user_settings global_settings; + + + + +#endif |