Use DBOP to check for left button on C200v2 like we are supposed to instead of right...
[kugel-rb.git] / uisimulator / common / sim_icons.c
blobb72f6003e8d9dd1fe258d9f7d438128fdd764835
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 Mats Lidell <matsl@contactor.se>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #include <stdio.h>
22 #include "config.h"
24 #include <lcd.h>
25 #include <kernel.h>
26 #include <string.h>
27 #include <debug.h>
29 extern void lcd_print_icon(int x, int icon_line, bool enable, char **icon);
31 static char* icon_battery_bit[]=
33 "-----",
34 " ",
35 "*****",
36 "*****",
37 "*****",
38 "*****",
39 "*****",
40 "*****",
41 " ",
42 "-----",
43 NULL
46 static char* icon_battery[]=
48 "********************* ",
49 "* * ",
50 "* ----- ----- ----- * ",
51 "* ----- ----- ----- ***",
52 "* ----- ----- ----- * *",
53 "* ----- ----- ----- * *",
54 "* ----- ----- ----- ***",
55 "* ----- ----- ----- * ",
56 "* * ",
57 "********************* ",
58 NULL
61 static char* icon_volume[]=
63 " ",
64 " ",
65 " ",
66 " ",
67 "* * * ",
68 "* * * ",
69 " * * *** * ",
70 " * * * * * ",
71 " * * * * ",
72 " * *** * ",
73 NULL
76 static char* icon_volume_1[]=
78 " ",
79 " ",
80 " ",
81 " ",
82 "**",
83 "**",
84 "**",
85 "**",
86 "**",
87 "**",
88 NULL
91 static char* icon_volume_2[]=
93 " ",
94 " ",
95 " ",
96 "**",
97 "**",
98 "**",
99 "**",
100 "**",
101 "**",
102 "**",
103 NULL
106 static char* icon_volume_3[]=
108 " ",
109 " ",
110 "**",
111 "**",
112 "**",
113 "**",
114 "**",
115 "**",
116 "**",
117 "**",
118 NULL
121 static char* icon_volume_4[]=
123 " ",
124 "**",
125 "**",
126 "**",
127 "**",
128 "**",
129 "**",
130 "**",
131 "**",
132 "**",
133 NULL
136 static char* icon_volume_5[]=
138 "**",
139 "**",
140 "**",
141 "**",
142 "**",
143 "**",
144 "**",
145 "**",
146 "**",
147 "**",
148 NULL
151 static char* icon_pause[]=
153 " **** **** ",
154 " **** **** ",
155 " **** **** ",
156 " **** **** ",
157 " **** **** ",
158 " **** **** ",
159 " **** **** ",
160 " **** **** ",
161 " **** **** ",
162 " **** **** ",
163 NULL
166 static char* icon_play[]=
168 "** ",
169 "***** ",
170 "******* ",
171 "********* ",
172 "*********** ",
173 "********* ",
174 "******* ",
175 "***** ",
176 "** ",
177 " ",
178 NULL
181 static char* icon_record[]=
183 " *** ",
184 " ***** ",
185 " ******* ",
186 " ********* ",
187 " ********* ",
188 " ********* ",
189 " ******* ",
190 " ***** ",
191 " *** ",
192 " ",
193 NULL
196 static char* icon_usb[]=
198 " ********* ",
199 " ** ** ",
200 " * ",
201 " ** * ** ",
202 "***********************",
203 " ** * ** ",
204 " * ",
205 " ** ** ",
206 " ******** ",
207 " ** ",
208 NULL
211 static char* icon_audio[]=
213 " *************************** ",
214 " ** ** ",
215 "* ** * * **** * *** *",
216 "* * * * * * * * * * *",
217 "* * * * * * * * * * *",
218 "* ****** * * * * * * * *",
219 "* * * * * * * * * * *",
220 "* * * *** **** * *** *",
221 " ** ** ",
222 " *************************** ",
223 NULL
226 static char* icon_param[]=
228 " ********************************* ",
229 " ** ** ",
230 "* **** ** **** ** ** ** *",
231 "* * * * * * * * * ** ** *",
232 "* * * * * * * * * * * * * *",
233 "* **** ****** **** ****** * * * * *",
234 "* * * * * * * * * * * *",
235 "* * * * * * * * * * * *",
236 " ** ** ",
237 " ********************************* ",
238 NULL
241 static char* icon_repeat[]=
243 " ",
244 " *************",
245 " * ",
246 " * ",
247 "* ",
248 "* ",
249 "* ** ",
250 " * **** ",
251 " * ****** ",
252 " *************",
253 NULL
256 static char* icon_repeat2[]=
258 " ",
259 " *",
260 " **",
261 "***",
262 " *",
263 " *",
264 " *",
265 " *",
266 " *",
267 " *",
268 NULL
272 struct icon_info
274 char** bitmap;
275 int xpos;
276 int row;
279 #define ICON_VOLUME_POS 102
280 #define ICON_VOLUME_SIZE 14
281 #define ICON_VOLUME_X_SIZE 2
283 static struct icon_info icons [] =
286 {icon_battery, 0, 0},
287 {icon_battery_bit, 2, 0},
288 {icon_battery_bit, 8, 0},
289 {icon_battery_bit, 14, 0},
290 {icon_usb, 0, 1},
291 {icon_play, 36, 0},
292 {icon_record, 48, 0},
293 {icon_pause, 60, 0},
294 {icon_audio, 37, 1},
295 {icon_repeat, 74, 0},
296 {icon_repeat2, 94, 0},
297 {icon_volume, ICON_VOLUME_POS, 0},
298 {icon_volume_1, ICON_VOLUME_POS+ICON_VOLUME_SIZE, 0},
299 {icon_volume_2, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(1*ICON_VOLUME_X_SIZE)+1, 0},
300 {icon_volume_3, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(2*ICON_VOLUME_X_SIZE)+2, 0},
301 {icon_volume_4, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(3*ICON_VOLUME_X_SIZE)+3, 0},
302 {icon_volume_5, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(4*ICON_VOLUME_X_SIZE)+4, 0},
303 {icon_param, 90, 1}
306 void
307 lcd_icon(int icon, bool enable)
309 lcd_print_icon(icons[icon].xpos, icons[icon].row, enable,
310 icons[icon].bitmap);