remove some really old and out of date code... (drawing API changed about 3 times...
[Rockbox.git] / uisimulator / common / sim_icons.c
blobf24fce2ca56c01a0d103e1ac4e7641bc41fb34bd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 Mats Lidell <matsl@contactor.se>
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #include "config.h"
20 #ifdef HAVE_LCD_CHARCELLS
22 #include <lcd.h>
23 #include <kernel.h>
24 #include <sprintf.h>
25 #include <string.h>
26 #include <debug.h>
28 extern void lcd_print_icon(int x, int icon_line, bool enable, char **icon);
30 static char* icon_battery_bit[]=
32 "-----",
33 " ",
34 "*****",
35 "*****",
36 "*****",
37 "*****",
38 "*****",
39 "*****",
40 " ",
41 "-----",
42 NULL
45 static char* icon_battery[]=
47 "********************* ",
48 "* * ",
49 "* ----- ----- ----- * ",
50 "* ----- ----- ----- ***",
51 "* ----- ----- ----- * *",
52 "* ----- ----- ----- * *",
53 "* ----- ----- ----- ***",
54 "* ----- ----- ----- * ",
55 "* * ",
56 "********************* ",
57 NULL
60 static char* icon_volume[]=
62 " ",
63 " ",
64 " ",
65 " ",
66 "* * * ",
67 "* * * ",
68 " * * *** * ",
69 " * * * * * ",
70 " * * * * ",
71 " * *** * ",
72 NULL
75 static char* icon_volume_1[]=
77 " ",
78 " ",
79 " ",
80 " ",
81 "**",
82 "**",
83 "**",
84 "**",
85 "**",
86 "**",
87 NULL
90 static char* icon_volume_2[]=
92 " ",
93 " ",
94 " ",
95 "**",
96 "**",
97 "**",
98 "**",
99 "**",
100 "**",
101 "**",
102 NULL
105 static char* icon_volume_3[]=
107 " ",
108 " ",
109 "**",
110 "**",
111 "**",
112 "**",
113 "**",
114 "**",
115 "**",
116 "**",
117 NULL
120 static char* icon_volume_4[]=
122 " ",
123 "**",
124 "**",
125 "**",
126 "**",
127 "**",
128 "**",
129 "**",
130 "**",
131 "**",
132 NULL
135 static char* icon_volume_5[]=
137 "**",
138 "**",
139 "**",
140 "**",
141 "**",
142 "**",
143 "**",
144 "**",
145 "**",
146 "**",
147 NULL
150 static char* icon_pause[]=
152 " **** **** ",
153 " **** **** ",
154 " **** **** ",
155 " **** **** ",
156 " **** **** ",
157 " **** **** ",
158 " **** **** ",
159 " **** **** ",
160 " **** **** ",
161 " **** **** ",
162 NULL
165 static char* icon_play[]=
167 "** ",
168 "***** ",
169 "******* ",
170 "********* ",
171 "*********** ",
172 "********* ",
173 "******* ",
174 "***** ",
175 "** ",
176 " ",
177 NULL
180 static char* icon_record[]=
182 " *** ",
183 " ***** ",
184 " ******* ",
185 " ********* ",
186 " ********* ",
187 " ********* ",
188 " ******* ",
189 " ***** ",
190 " *** ",
191 " ",
192 NULL
195 static char* icon_usb[]=
197 " ********* ",
198 " ** ** ",
199 " * ",
200 " ** * ** ",
201 "***********************",
202 " ** * ** ",
203 " * ",
204 " ** ** ",
205 " ******** ",
206 " ** ",
207 NULL
210 static char* icon_audio[]=
212 " *************************** ",
213 " ** ** ",
214 "* ** * * **** * *** *",
215 "* * * * * * * * * * *",
216 "* * * * * * * * * * *",
217 "* ****** * * * * * * * *",
218 "* * * * * * * * * * *",
219 "* * * *** **** * *** *",
220 " ** ** ",
221 " *************************** ",
222 NULL
225 static char* icon_param[]=
227 " ********************************* ",
228 " ** ** ",
229 "* **** ** **** ** ** ** *",
230 "* * * * * * * * * ** ** *",
231 "* * * * * * * * * * * * * *",
232 "* **** ****** **** ****** * * * * *",
233 "* * * * * * * * * * * *",
234 "* * * * * * * * * * * *",
235 " ** ** ",
236 " ********************************* ",
237 NULL
240 static char* icon_repeat[]=
242 " ",
243 " *************",
244 " * ",
245 " * ",
246 "* ",
247 "* ",
248 "* ** ",
249 " * **** ",
250 " * ****** ",
251 " *************",
252 NULL
255 static char* icon_repeat2[]=
257 " ",
258 " *",
259 " **",
260 "***",
261 " *",
262 " *",
263 " *",
264 " *",
265 " *",
266 " *",
267 NULL
271 struct icon_info
273 char** bitmap;
274 int xpos;
275 int row;
278 #define ICON_VOLUME_POS 102
279 #define ICON_VOLUME_SIZE 14
280 #define ICON_VOLUME_X_SIZE 2
282 static struct icon_info icons [] =
285 {icon_battery, 0, 0},
286 {icon_battery_bit, 2, 0},
287 {icon_battery_bit, 8, 0},
288 {icon_battery_bit, 14, 0},
289 {icon_usb, 0, 1},
290 {icon_play, 36, 0},
291 {icon_record, 48, 0},
292 {icon_pause, 60, 0},
293 {icon_audio, 37, 1},
294 {icon_repeat, 74, 0},
295 {icon_repeat2, 94, 0},
296 {icon_volume, ICON_VOLUME_POS, 0},
297 {icon_volume_1, ICON_VOLUME_POS+ICON_VOLUME_SIZE, 0},
298 {icon_volume_2, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(1*ICON_VOLUME_X_SIZE)+1, 0},
299 {icon_volume_3, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(2*ICON_VOLUME_X_SIZE)+2, 0},
300 {icon_volume_4, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(3*ICON_VOLUME_X_SIZE)+3, 0},
301 {icon_volume_5, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(4*ICON_VOLUME_X_SIZE)+4, 0},
302 {icon_param, 90, 1}
305 void
306 lcd_icon(int icon, bool enable)
308 lcd_print_icon(icons[icon].xpos, icons[icon].row, enable,
309 icons[icon].bitmap);
312 #endif /* HAVE_LCD_CHARCELLS */