summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-03-25 21:09:58 +0000
committerDave Chapman <dave@dchapman.com>2008-03-25 21:09:58 +0000
commit7418c357c35c1813d0ed0cec427eb98768b4c68c (patch)
tree390081d494196ee1da0281ead5b6235c21f4f69c /tools
parentffa304865ed0eb0175a741d171f89cc069f71e5d (diff)
Make checkwps compile again. Still more work is needed though, as checkwps is compiled to emulate an iPod Color - this needs changing to allow the LCD (and remote LCD) dimensions/depth to be specified on the commandline - the new %V tags are validated against the LCD characteristics
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16807 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile4
-rw-r--r--tools/checkwps.c52
2 files changed, 53 insertions, 3 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 6351e5bec4..4db43c1b6c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -64,9 +64,9 @@ database: database.c ../apps/tagcache.c ../apps/metadata.c \
-D__PCTOOL__ -DHAVE_TAGCACHE -DROCKBOX_HAS_LOGF -DSIMULATOR \
-DCONFIG_CODEC=1 -ldl -I../apps $+ -o $@
-checkwps: checkwps.c ../apps/gui/wps_parser.c ../apps/gui/wps_debug.c ../firmware/common/ctype.c
+checkwps: checkwps.c ../apps/gui/wps_parser.c ../apps/gui/wps_debug.c ../firmware/common/ctype.c ../apps/misc.c
$(SILENT)$(CC) -g -I ../apps/gui -I../firmware/export \
--D__PCTOOL__ -DDEBUG -DROCKBOX_HAS_LOGF -DIPOD_COLOR -D ROCKBOX_DIR_LEN=255 -D WPS_DIR=\".\" \
+-D__PCTOOL__ -DDEBUG -DROCKBOX_HAS_LOGF -DIPOD_COLOR -D ROCKBOX_DIR_LEN -D WPS_DIR=\".\" \
-I../apps -I../firmware/target/arm/ipod -I../firmware/include $+ -o $@
convbdf: convbdf.c
diff --git a/tools/checkwps.c b/tools/checkwps.c
index 950c341bfc..92e7a5db94 100644
--- a/tools/checkwps.c
+++ b/tools/checkwps.c
@@ -54,12 +54,62 @@ bool load_wps_backdrop(char* filename)
static char pluginbuf[PLUGIN_BUFFER_SIZE];
+static int dummy_func1(void)
+{
+ return 0;
+}
+
+static unsigned dummy_func2(void)
+{
+ return 0;
+}
+
void* plugin_get_buffer(size_t *buffer_size)
{
*buffer_size = PLUGIN_BUFFER_SIZE;
return pluginbuf;
}
+struct screen screens[NB_SCREENS] =
+{
+ {
+ .screen_type=SCREEN_MAIN,
+ .width=LCD_WIDTH,
+ .height=LCD_HEIGHT,
+ .depth=LCD_DEPTH,
+ .is_color=true,
+ .has_disk_led=false,
+ .getxmargin=dummy_func1,
+ .getymargin=dummy_func1,
+ .get_foreground=dummy_func2,
+ .get_background=dummy_func2,
+ },
+#ifdef HAVE_REMOTE_LCD
+ {
+ .screen_type=SCREEN_REMOTE,
+ .width=LCD_REMOTE_WIDTH,
+ .height=LCD_REMOTE_HEIGHT,
+ .depth=LCD_REMOTE_DEPTH,
+ .is_color=false,/* No color remotes yet */
+ .getxmargin=dummy_func,
+ .getymargin=dummy_func,
+ .get_foreground=dummy_func,
+ .get_background=dummy_func,
+ }
+#endif
+};
+
+#ifdef HAVE_LCD_BITMAP
+void screen_clear_area(struct screen * display, int xstart, int ystart,
+ int width, int height)
+{
+ display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ display->fillrect(xstart, ystart, width, height);
+ display->set_drawmode(DRMODE_SOLID);
+}
+#endif
+
+
int main(int argc, char **argv)
{
int res;
@@ -93,7 +143,7 @@ int main(int argc, char **argv)
}
close(fd);
- res = wps_data_load(&wps, argv[filearg], true);
+ res = wps_data_load(&wps, &screens[0], argv[filearg], true);
if (!res) {
printf("WPS parsing failure\n");