diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-02-20 00:31:10 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-02-20 00:31:10 +0000 |
commit | 3e496e3ecf60db743cfe82e57b82b72764e20f39 (patch) | |
tree | 833798e58b5bfd3428cfaaa6d8d1c95ba8681a8a /uisimulator/common | |
parent | da8db11e2872904c842454443475dcca98366a7e (diff) | |
download | rockbox-3e496e3ecf60db743cfe82e57b82b72764e20f39.tar.gz rockbox-3e496e3ecf60db743cfe82e57b82b72764e20f39.zip |
Reworked player simulator icons to fit the changed charcell scale factor and look more like the actual icons. Adapted player sim display sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8745 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common')
-rw-r--r-- | uisimulator/common/lcd-playersim.c | 8 | ||||
-rw-r--r-- | uisimulator/common/sim_icons.c | 379 |
2 files changed, 122 insertions, 265 deletions
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c index 156f83e639..0e10acf437 100644 --- a/uisimulator/common/lcd-playersim.c +++ b/uisimulator/common/lcd-playersim.c | |||
@@ -34,9 +34,9 @@ | |||
34 | 34 | ||
35 | #define CHAR_WIDTH 6 | 35 | #define CHAR_WIDTH 6 |
36 | #define CHAR_HEIGHT 8 | 36 | #define CHAR_HEIGHT 8 |
37 | #define ICON_HEIGHT 24 | 37 | #define ICON_HEIGHT 12 |
38 | #define CHAR_PIXEL 2 | 38 | #define CHAR_PIXEL 2 |
39 | #define BORDER_MARGIN 2 | 39 | #define BORDER_MARGIN 1 |
40 | 40 | ||
41 | static int double_height=1; | 41 | static int double_height=1; |
42 | extern bool lcd_display_redraw; | 42 | extern bool lcd_display_redraw; |
@@ -47,13 +47,13 @@ extern unsigned char hardware_buffer_lcd[11][2]; | |||
47 | void lcd_print_icon(int x, int icon_line, bool enable, char **icon) | 47 | void lcd_print_icon(int x, int icon_line, bool enable, char **icon) |
48 | { | 48 | { |
49 | int xpos = x; | 49 | int xpos = x; |
50 | int ypos = icon_line*(ICON_HEIGHT+CHAR_HEIGHT*2*4); | 50 | int ypos = icon_line*(ICON_HEIGHT+(CHAR_HEIGHT*2+2)*CHAR_PIXEL); |
51 | int row=0, col; | 51 | int row=0, col; |
52 | 52 | ||
53 | int p=0, cp=0; | 53 | int p=0, cp=0; |
54 | struct coordinate points[LCD_WIDTH * LCD_HEIGHT]; | 54 | struct coordinate points[LCD_WIDTH * LCD_HEIGHT]; |
55 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; | 55 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; |
56 | 56 | ||
57 | while (icon[row]) { | 57 | while (icon[row]) { |
58 | col=0; | 58 | col=0; |
59 | while (icon[row][col]) { | 59 | while (icon[row][col]) { |
diff --git a/uisimulator/common/sim_icons.c b/uisimulator/common/sim_icons.c index cb0aad0809..bd81e11fbf 100644 --- a/uisimulator/common/sim_icons.c +++ b/uisimulator/common/sim_icons.c | |||
@@ -31,73 +31,46 @@ extern void lcd_print_icon(int x, int icon_line, bool enable, char **icon); | |||
31 | 31 | ||
32 | static char* icon_battery_bit[]= | 32 | static char* icon_battery_bit[]= |
33 | { | 33 | { |
34 | "------", | 34 | "-----", |
35 | "------", | 35 | " ", |
36 | "------", | 36 | "*****", |
37 | "******", | 37 | "*****", |
38 | "******", | 38 | "*****", |
39 | "******", | 39 | "*****", |
40 | "******", | 40 | "*****", |
41 | "******", | 41 | "*****", |
42 | "******", | 42 | " ", |
43 | "******", | 43 | "-----", |
44 | "******", | ||
45 | "******", | ||
46 | "******", | ||
47 | "******", | ||
48 | "******", | ||
49 | "******", | ||
50 | "------", | ||
51 | "------", | ||
52 | "------", | ||
53 | NULL | 44 | NULL |
54 | }; | 45 | }; |
55 | 46 | ||
56 | static char* icon_battery[]= | 47 | static char* icon_battery[]= |
57 | { | 48 | { |
58 | " ********************************** ", | 49 | "********************* ", |
59 | "*..................................* ", | 50 | "* * ", |
60 | "*..................................* ", | 51 | "* * ", |
61 | "*..................................* ", | 52 | "* ***", |
62 | "*..................................* ", | 53 | "* * *", |
63 | "*..................................*****", | 54 | "* * *", |
64 | "*..................................*****", | 55 | "* ***", |
65 | "*..................................*****", | 56 | "* * ", |
66 | "*..................................*****", | 57 | "* * ", |
67 | "*..................................*****", | 58 | "********************* ", |
68 | "*..................................*****", | ||
69 | "*..................................*****", | ||
70 | "*..................................*****", | ||
71 | "*..................................*****", | ||
72 | "*..................................* ", | ||
73 | "*..................................* ", | ||
74 | "*..................................* ", | ||
75 | "*..................................* ", | ||
76 | " ********************************** ", | ||
77 | NULL | 59 | NULL |
78 | }; | 60 | }; |
79 | 61 | ||
80 | static char* icon_volume[]= | 62 | static char* icon_volume[]= |
81 | { | 63 | { |
82 | " ", | 64 | " ", |
83 | " ", | 65 | " ", |
84 | " ", | 66 | " ", |
85 | " ", | 67 | " ", |
86 | " ", | 68 | "* * * ", |
87 | " ", | 69 | "* * * ", |
88 | "* * * ", | 70 | " * * *** * ", |
89 | "* * * ", | 71 | " * * * * * ", |
90 | " * * * ", | 72 | " * * * * ", |
91 | " * * * ", | 73 | " * *** * ", |
92 | " * * * ", | ||
93 | " * * * ", | ||
94 | " * * * ", | ||
95 | " * * ** * ", | ||
96 | " * * * * * ", | ||
97 | " * * * * * ", | ||
98 | " * * * * * ", | ||
99 | " * * * * * ", | ||
100 | " * ** * ", | ||
101 | NULL | 74 | NULL |
102 | }; | 75 | }; |
103 | 76 | ||
@@ -107,18 +80,9 @@ static char* icon_volume_1[]= | |||
107 | " ", | 80 | " ", |
108 | " ", | 81 | " ", |
109 | " ", | 82 | " ", |
110 | " ", | 83 | "**", |
111 | " ", | 84 | "**", |
112 | " ", | 85 | "**", |
113 | " ", | ||
114 | " ", | ||
115 | " ", | ||
116 | " ", | ||
117 | " ", | ||
118 | " ", | ||
119 | " ", | ||
120 | " ", | ||
121 | " ", | ||
122 | "**", | 86 | "**", |
123 | "**", | 87 | "**", |
124 | "**", | 88 | "**", |
@@ -130,16 +94,7 @@ static char* icon_volume_2[]= | |||
130 | " ", | 94 | " ", |
131 | " ", | 95 | " ", |
132 | " ", | 96 | " ", |
133 | " ", | 97 | "**", |
134 | " ", | ||
135 | " ", | ||
136 | " ", | ||
137 | " ", | ||
138 | " ", | ||
139 | " ", | ||
140 | " ", | ||
141 | " ", | ||
142 | " ", | ||
143 | "**", | 98 | "**", |
144 | "**", | 99 | "**", |
145 | "**", | 100 | "**", |
@@ -153,15 +108,6 @@ static char* icon_volume_3[]= | |||
153 | { | 108 | { |
154 | " ", | 109 | " ", |
155 | " ", | 110 | " ", |
156 | " ", | ||
157 | " ", | ||
158 | " ", | ||
159 | " ", | ||
160 | " ", | ||
161 | " ", | ||
162 | " ", | ||
163 | " ", | ||
164 | "**", | ||
165 | "**", | 111 | "**", |
166 | "**", | 112 | "**", |
167 | "**", | 113 | "**", |
@@ -176,15 +122,6 @@ static char* icon_volume_3[]= | |||
176 | static char* icon_volume_4[]= | 122 | static char* icon_volume_4[]= |
177 | { | 123 | { |
178 | " ", | 124 | " ", |
179 | " ", | ||
180 | " ", | ||
181 | " ", | ||
182 | " ", | ||
183 | " ", | ||
184 | " ", | ||
185 | "**", | ||
186 | "**", | ||
187 | "**", | ||
188 | "**", | 125 | "**", |
189 | "**", | 126 | "**", |
190 | "**", | 127 | "**", |
@@ -199,15 +136,6 @@ static char* icon_volume_4[]= | |||
199 | 136 | ||
200 | static char* icon_volume_5[]= | 137 | static char* icon_volume_5[]= |
201 | { | 138 | { |
202 | " ", | ||
203 | " ", | ||
204 | " ", | ||
205 | " ", | ||
206 | "**", | ||
207 | "**", | ||
208 | "**", | ||
209 | "**", | ||
210 | "**", | ||
211 | "**", | 139 | "**", |
212 | "**", | 140 | "**", |
213 | "**", | 141 | "**", |
@@ -223,174 +151,112 @@ static char* icon_volume_5[]= | |||
223 | 151 | ||
224 | static char* icon_pause[]= | 152 | static char* icon_pause[]= |
225 | { | 153 | { |
226 | "**** ****", | 154 | " **** **** ", |
227 | "**** ****", | 155 | " **** **** ", |
228 | "**** ****", | 156 | " **** **** ", |
229 | "**** ****", | 157 | " **** **** ", |
230 | "**** ****", | 158 | " **** **** ", |
231 | "**** ****", | 159 | " **** **** ", |
232 | "**** ****", | 160 | " **** **** ", |
233 | "**** ****", | 161 | " **** **** ", |
234 | "**** ****", | 162 | " **** **** ", |
235 | "**** ****", | 163 | " **** **** ", |
236 | "**** ****", | ||
237 | "**** ****", | ||
238 | "**** ****", | ||
239 | "**** ****", | ||
240 | "**** ****", | ||
241 | "**** ****", | ||
242 | "**** ****", | ||
243 | "**** ****", | ||
244 | "**** ****", | ||
245 | NULL | 164 | NULL |
246 | }; | 165 | }; |
247 | 166 | ||
248 | static char* icon_play[]= | 167 | static char* icon_play[]= |
249 | { | 168 | { |
250 | "** ", | 169 | "** ", |
251 | "**** ", | 170 | "***** ", |
252 | "****** ", | 171 | "******* ", |
253 | "******** ", | 172 | "********* ", |
254 | "********** ", | 173 | "*********** ", |
255 | "************ ", | 174 | "********* ", |
256 | "************** ", | 175 | "******* ", |
257 | "**************** ", | 176 | "***** ", |
258 | "****************** ", | 177 | "** ", |
259 | "******************** ", | 178 | " ", |
260 | "****************** ", | ||
261 | "**************** ", | ||
262 | "************** ", | ||
263 | "************ ", | ||
264 | "********** ", | ||
265 | "******** ", | ||
266 | "****** ", | ||
267 | "**** ", | ||
268 | "** ", | ||
269 | NULL | 179 | NULL |
270 | }; | 180 | }; |
271 | 181 | ||
272 | static char* icon_record[]= | 182 | static char* icon_record[]= |
273 | { | 183 | { |
274 | " ", | 184 | " *** ", |
275 | " ", | 185 | " ***** ", |
276 | " ", | 186 | " ******* ", |
277 | " ", | 187 | " ********* ", |
278 | " *** ", | 188 | " ********* ", |
279 | " ********* ", | 189 | " ********* ", |
280 | " ************* ", | 190 | " ******* ", |
281 | " *************** ", | 191 | " ***** ", |
282 | "*****************", | 192 | " *** ", |
283 | "*****************", | 193 | " ", |
284 | "*****************", | ||
285 | " *************** ", | ||
286 | " ************* ", | ||
287 | " ********* ", | ||
288 | " *** ", | ||
289 | " ", | ||
290 | " ", | ||
291 | " ", | ||
292 | " ", | ||
293 | NULL | 194 | NULL |
294 | }; | 195 | }; |
295 | 196 | ||
296 | static char* icon_usb[]= | 197 | static char* icon_usb[]= |
297 | { | 198 | { |
298 | " ", | 199 | " ********* ", |
299 | " ", | 200 | " ** ** ", |
300 | " ************************** ", | 201 | " * ", |
301 | " ** **** ", | 202 | " ** * ** ", |
302 | " ** ", | 203 | "***********************", |
303 | " ** ", | 204 | " ** * ** ", |
304 | " ** ", | 205 | " * ", |
305 | " ** ", | 206 | " ** ** ", |
306 | " ** ", | 207 | " ******** ", |
307 | " **** ** **** ", | 208 | " ** ", |
308 | "***************************************************", | ||
309 | " **** ** **** ", | ||
310 | " ** ", | ||
311 | " ** ", | ||
312 | " ** ", | ||
313 | " ** ", | ||
314 | " *** *** ", | ||
315 | " ***************** ", | ||
316 | " ", | ||
317 | NULL | 209 | NULL |
318 | }; | 210 | }; |
319 | 211 | ||
320 | static char* icon_audio[]= | 212 | static char* icon_audio[]= |
321 | { | 213 | { |
322 | " ************************************** ", | 214 | " *************************** ", |
323 | " ****************************************** ", | 215 | " ** ** ", |
324 | " ** ** ", | 216 | "* ** * * **** * *** *", |
325 | " ** ** ", | 217 | "* * * * * * * * * * *", |
326 | " ** **** ** ** ****** ** **** ** ", | 218 | "* * * * * * * * * * *", |
327 | "** ****** ** ** ******* ** ****** **", | 219 | "* ****** * * * * * * * *", |
328 | "** ** ** ** ** ** ** ** ** ** **", | 220 | "* * * * * * * * * * *", |
329 | "** ** ** ** ** ** ** ** ** ** **", | 221 | "* * * *** **** * *** *", |
330 | "** ** ** ** ** ** ** ** ** ** **", | 222 | " ** ** ", |
331 | "** ** ** ** ** ** ** ** ** ** **", | 223 | " *************************** ", |
332 | "** ******** ** ** ** ** ** ** ** **", | ||
333 | "** ******** ** ** ** ** ** ** ** **", | ||
334 | "** ** ** ** ** ** ** ** ** ** **", | ||
335 | "** ** ** ****** ******* ** ****** **", | ||
336 | " ** ** ** **** ****** ** **** ** ", | ||
337 | " ** ** ", | ||
338 | " ** ** ", | ||
339 | " ****************************************** ", | ||
340 | " ************************************** ", | ||
341 | NULL | 224 | NULL |
342 | }; | 225 | }; |
343 | 226 | ||
344 | static char* icon_param[]= | 227 | static char* icon_param[]= |
345 | { | 228 | { |
346 | " ********************************************** ", | 229 | " ********************************* ", |
347 | " ************************************************** ", | 230 | " ** ** ", |
348 | " ** ** ", | 231 | "* **** ** **** ** ** ** *", |
349 | " ** ** ", | 232 | "* * * * * * * * * ** ** *", |
350 | " ** ******* **** ******* ***** ** ** ** ", | 233 | "* * * * * * * * * * * * * *", |
351 | "** ******** ****** ******** ******* ** ** **", | 234 | "* **** ****** **** ****** * * * * *", |
352 | "** ** ** ** ** ** ** ** ** *** *** **", | 235 | "* * * * * * * * * * * *", |
353 | "** ** ** ** ** ** ** ** ** *** *** **", | 236 | "* * * * * * * * * * * *", |
354 | "** ** ** ** ** ** ** ** ** **** **** **", | 237 | " ** ** ", |
355 | "** ** ** ** ** ** ** ** ** ** **** ** **", | 238 | " ********************************* ", |
356 | "** ******** ******** ******** ******** ** **** ** **", | ||
357 | "** ******* ******** ******* ******** ** ** ** **", | ||
358 | "** ** ** ** ** *** ** ** ** ** **", | ||
359 | "** ** ** ** ** *** ** ** ** ** **", | ||
360 | " ** ** ** ** ** *** ** ** ** ** ** ", | ||
361 | " ** ** ", | ||
362 | " ** ** ", | ||
363 | " ************************************************** ", | ||
364 | " ********************************************** ", | ||
365 | NULL | 239 | NULL |
366 | }; | 240 | }; |
367 | 241 | ||
368 | static char* icon_repeat[]= | 242 | static char* icon_repeat[]= |
369 | { | 243 | { |
370 | " ************************* ", | 244 | " ", |
371 | " *************************** ", | 245 | " *************", |
372 | " *** ", | 246 | " * ", |
373 | " ** ", | 247 | " * ", |
374 | " ** ", | 248 | "* ", |
375 | " ** ", | 249 | "* ", |
376 | " ** ", | 250 | "* ** ", |
377 | "** ", | 251 | " * **** ", |
378 | "** ", | 252 | " * ****** ", |
379 | "** ", | 253 | " *************", |
380 | "** ", | ||
381 | "** ", | ||
382 | " ** ** ", | ||
383 | " ** **** ", | ||
384 | " ** ****** ", | ||
385 | " ** ******** ", | ||
386 | " *** ********** ", | ||
387 | " ***************************** ", | ||
388 | " *****************************", | ||
389 | NULL | 254 | NULL |
390 | }; | 255 | }; |
391 | 256 | ||
392 | static char* icon_repeat2[]= | 257 | static char* icon_repeat2[]= |
393 | { | 258 | { |
259 | " ", | ||
394 | " *", | 260 | " *", |
395 | " **", | 261 | " **", |
396 | "***", | 262 | "***", |
@@ -400,16 +266,6 @@ static char* icon_repeat2[]= | |||
400 | " *", | 266 | " *", |
401 | " *", | 267 | " *", |
402 | " *", | 268 | " *", |
403 | " *", | ||
404 | " *", | ||
405 | " *", | ||
406 | " *", | ||
407 | " *", | ||
408 | " *", | ||
409 | " *", | ||
410 | " *", | ||
411 | " *", | ||
412 | " *", | ||
413 | NULL | 269 | NULL |
414 | }; | 270 | }; |
415 | 271 | ||
@@ -421,30 +277,31 @@ struct icon_info | |||
421 | int row; | 277 | int row; |
422 | }; | 278 | }; |
423 | 279 | ||
424 | #define ICON_VOLUME_POS 224 | 280 | #define ICON_VOLUME_POS 102 |
425 | #define ICON_VOLUME_SIZE 20 | 281 | #define ICON_VOLUME_SIZE 14 |
426 | #define ICON_VOLUME_X_SIZE 2 | 282 | #define ICON_VOLUME_X_SIZE 2 |
427 | 283 | ||
428 | static struct icon_info icons [] = | 284 | static struct icon_info icons [] = |
429 | { | 285 | { |
286 | |||
430 | {icon_battery, 0, 0}, | 287 | {icon_battery, 0, 0}, |
431 | {icon_battery_bit, 5, 0}, | 288 | {icon_battery_bit, 2, 0}, |
432 | {icon_battery_bit, 15, 0}, | 289 | {icon_battery_bit, 8, 0}, |
433 | {icon_battery_bit, 25, 0}, | 290 | {icon_battery_bit, 14, 0}, |
434 | {icon_usb, 0, 1}, | 291 | {icon_usb, 0, 1}, |
435 | {icon_play, 55, 0}, | 292 | {icon_play, 36, 0}, |
436 | {icon_record, 75, 0}, | 293 | {icon_record, 48, 0}, |
437 | {icon_pause, 100, 0}, | 294 | {icon_pause, 60, 0}, |
438 | {icon_audio, 90, 1}, | 295 | {icon_audio, 37, 1}, |
439 | {icon_repeat, 170, 0}, | 296 | {icon_repeat, 74, 0}, |
440 | {icon_repeat2, 170+35+4, 0}, | 297 | {icon_repeat2, 94, 0}, |
441 | {icon_volume, ICON_VOLUME_POS, 0}, | 298 | {icon_volume, ICON_VOLUME_POS, 0}, |
442 | {icon_volume_1, ICON_VOLUME_POS+ICON_VOLUME_SIZE, 0}, | 299 | {icon_volume_1, ICON_VOLUME_POS+ICON_VOLUME_SIZE, 0}, |
443 | {icon_volume_2, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(1*ICON_VOLUME_X_SIZE)+1, 0}, | 300 | {icon_volume_2, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(1*ICON_VOLUME_X_SIZE)+1, 0}, |
444 | {icon_volume_3, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(2*ICON_VOLUME_X_SIZE)+2, 0}, | 301 | {icon_volume_3, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(2*ICON_VOLUME_X_SIZE)+2, 0}, |
445 | {icon_volume_4, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(3*ICON_VOLUME_X_SIZE)+3, 0}, | 302 | {icon_volume_4, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(3*ICON_VOLUME_X_SIZE)+3, 0}, |
446 | {icon_volume_5, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(4*ICON_VOLUME_X_SIZE)+4, 0}, | 303 | {icon_volume_5, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(4*ICON_VOLUME_X_SIZE)+4, 0}, |
447 | {icon_param, 170, 1} | 304 | {icon_param, 90, 1} |
448 | }; | 305 | }; |
449 | 306 | ||
450 | void | 307 | void |