diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-01-29 20:49:43 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-01-29 20:49:43 +0000 |
commit | 36c71a60ca82f9777fbdd239f63f62ccf68cf3f5 (patch) | |
tree | 06518f1485a9899da1015445623256721435323e /tools/checkwps | |
parent | d4b99fdfe06bf5f30f4c3a68f08aedaaa6f432f9 (diff) | |
download | rockbox-36c71a60ca82f9777fbdd239f63f62ccf68cf3f5.tar.gz rockbox-36c71a60ca82f9777fbdd239f63f62ccf68cf3f5.zip |
Get checkwps working again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps')
-rw-r--r-- | tools/checkwps/Makefile | 3 | ||||
-rw-r--r-- | tools/checkwps/checkwps.c | 52 | ||||
-rw-r--r-- | tools/checkwps/checkwps.h | 8 |
3 files changed, 57 insertions, 6 deletions
diff --git a/tools/checkwps/Makefile b/tools/checkwps/Makefile index cde80b0dde..1bdf3580f9 100644 --- a/tools/checkwps/Makefile +++ b/tools/checkwps/Makefile | |||
@@ -27,9 +27,10 @@ COMMON=$(ROOT)/apps/gui/wps_parser.c \ | |||
27 | INCLUDE=-I $(ROOT)/apps/gui \ | 27 | INCLUDE=-I $(ROOT)/apps/gui \ |
28 | -I $(ROOT)/firmware/export \ | 28 | -I $(ROOT)/firmware/export \ |
29 | -I $(ROOT)/apps \ | 29 | -I $(ROOT)/apps \ |
30 | -I $(ROOT)/apps/recorder \ | ||
30 | -I . | 31 | -I . |
31 | 32 | ||
32 | CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\" | 33 | CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\" |
33 | 34 | ||
34 | all: | 35 | all: |
35 | @echo To build, run the buildall.sh script | 36 | @echo To build, run the buildall.sh script |
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 2981303701..17098d2b06 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c | |||
@@ -25,14 +25,16 @@ | |||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "gwps.h" | 26 | #include "gwps.h" |
27 | #include "checkwps.h" | 27 | #include "checkwps.h" |
28 | 28 | #include "resize.h" | |
29 | #define MIN(x,y) ((x) > (y) ? (y) : (x)) | ||
30 | 29 | ||
31 | bool debug_wps = true; | 30 | bool debug_wps = true; |
32 | int wps_verbose_level = 0; | 31 | int wps_verbose_level = 0; |
33 | 32 | ||
34 | int errno; | 33 | int errno; |
35 | 34 | ||
35 | const struct settings_list *settings; | ||
36 | const int nb_settings = 0; | ||
37 | |||
36 | /* static endianness conversion */ | 38 | /* static endianness conversion */ |
37 | #define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \ | 39 | #define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \ |
38 | ((unsigned short)(x) << 8))) | 40 | ((unsigned short)(x) << 8))) |
@@ -55,6 +57,20 @@ unsigned short letoh16(unsigned short x) | |||
55 | } | 57 | } |
56 | } | 58 | } |
57 | 59 | ||
60 | unsigned short letoh32(unsigned short x) | ||
61 | { | ||
62 | unsigned short n = 0x1234; | ||
63 | unsigned char* ch = (unsigned char*)&n; | ||
64 | |||
65 | if (*ch == 0x34) | ||
66 | { | ||
67 | /* Little-endian */ | ||
68 | return x; | ||
69 | } else { | ||
70 | return SWAP_32(x); | ||
71 | } | ||
72 | } | ||
73 | |||
58 | unsigned int htole32(unsigned int x) | 74 | unsigned int htole32(unsigned int x) |
59 | { | 75 | { |
60 | unsigned short n = 0x1234; | 76 | unsigned short n = 0x1234; |
@@ -109,6 +125,38 @@ bool load_remote_wps_backdrop(const char* filename) | |||
109 | return true; | 125 | return true; |
110 | } | 126 | } |
111 | 127 | ||
128 | int recalc_dimension(struct dim *dst, struct dim *src) | ||
129 | { | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, | ||
134 | struct rowset *rset, unsigned char *buf, unsigned int len, | ||
135 | const struct custom_format *format, | ||
136 | struct img_part* (*store_part)(void *args), | ||
137 | void *args) | ||
138 | { | ||
139 | return 0; | ||
140 | } | ||
141 | |||
142 | int audio_status(void) | ||
143 | { | ||
144 | return 0; | ||
145 | } | ||
146 | |||
147 | struct mp3entry* audio_current_track(void) | ||
148 | { | ||
149 | return NULL; | ||
150 | } | ||
151 | |||
152 | void audio_stop(void) | ||
153 | { | ||
154 | } | ||
155 | |||
156 | void audio_play(long offset) | ||
157 | { | ||
158 | } | ||
159 | |||
112 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; | 160 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; |
113 | 161 | ||
114 | static unsigned dummy_func2(void) | 162 | static unsigned dummy_func2(void) |
diff --git a/tools/checkwps/checkwps.h b/tools/checkwps/checkwps.h index fa3b425500..2ba8f5f59e 100644 --- a/tools/checkwps/checkwps.h +++ b/tools/checkwps/checkwps.h | |||
@@ -23,20 +23,22 @@ | |||
23 | #define _CHECKWPS_H_ | 23 | #define _CHECKWPS_H_ |
24 | #include <stdio.h> | 24 | #include <stdio.h> |
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include <stdbool.h> | ||
26 | #include <fcntl.h> | 27 | #include <fcntl.h> |
27 | 28 | ||
28 | /* subset of global_settings needed to build checkwps. */ | 29 | /* subset of global_settings needed to build checkwps. */ |
29 | struct user_settings { | 30 | struct user_settings { |
30 | bool statusbar; | 31 | bool statusbar; |
31 | #ifdef HAVE_LCD_COLOR | ||
32 | int bg_color; /* background color native format */ | 32 | int bg_color; /* background color native format */ |
33 | int fg_color; /* foreground color native format */ | 33 | int fg_color; /* foreground color native format */ |
34 | #endif | ||
35 | }; | 34 | }; |
36 | 35 | ||
37 | extern struct user_settings global_settings; | 36 | extern struct user_settings global_settings; |
38 | 37 | ||
38 | #define FONT_SYSFIXED 0 | ||
39 | #define FONT_UI 1 | ||
40 | #define SYSFONT_HEIGHT 8 | ||
39 | 41 | ||
40 | 42 | #define MIN(x,y) ((x) > (y) ? (y) : (x)) | |
41 | 43 | ||
42 | #endif | 44 | #endif |