2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2};
24 UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8};
26 UCHAR WSymbol::symbols[] = {
69 00000000 00000000 00000000 00000000
70 00000000 00000000 00000000 00000000
71 00000000 00000000 00000000 00000000
72 00000000 00000000 00000000 00000000
73 00000000 00000000 00000000 00000000
74 00000000 00000000 00000000 00000000
75 00000000 00000000 00000000 00000000
76 00000000 00000000 00000000 00000000
77 00000000 00000000 00000000 00000000
78 00000000 00000000 00000000 00000000
79 00000000 00000000 00000000 00000000
80 00000000 00000000 00000000 00000000
83 0x00, 0x00, 0x00, 0x00,
84 0x00, 0x00, 0x00, 0x00,
85 0x00, 0x00, 0x00, 0x00,
86 0x00, 0x00, 0x00, 0x00,
87 0x00, 0x00, 0x00, 0x00,
88 0x00, 0x00, 0x00, 0x00,
89 0x00, 0x00, 0x00, 0x00,
90 0x00, 0x00, 0x00, 0x00,
91 0x00, 0x00, 0x00, 0x00,
92 0x00, 0x00, 0x00, 0x00,
93 0x00, 0x00, 0x00, 0x00,
94 0x00, 0x00, 0x00, 0x00,
97 00000000 00000000 00000000 00000011
98 00000000 00000000 00000000 00011111
99 00000000 00000000 00000000 11111111
100 00000000 00000000 00000011 11111111
101 00000000 00000000 00011111 11111111
102 00000000 00000000 11111111 11111111
103 00000000 00000011 11111111 11111111
104 00000000 00011111 11111111 11111111
105 00000000 11111111 11111111 11111111
106 00000011 11111111 11111111 11111111
107 00011111 11111111 11111111 11111111
108 11111111 11111111 11111111 11111111
111 0x00, 0x00, 0x00, 0x03,
112 0x00, 0x00, 0x00, 0x1F,
113 0x00, 0x00, 0x00, 0xFF,
114 0x00, 0x00, 0x03, 0xFF,
115 0x00, 0x00, 0x1F, 0xFF,
116 0x00, 0x00, 0xFF, 0xFF,
117 0x00, 0x03, 0xFF, 0xFF,
118 0x00, 0x1F, 0xFF, 0xFF,
119 0x00, 0xFF, 0xFF, 0xFF,
120 0x03, 0xFF, 0xFF, 0xFF,
121 0x1F, 0xFF, 0xFF, 0xFF,
122 0xFF, 0xFF, 0xFF, 0xFF,
189 11000000 00000000 00110000
190 11000000 00000000 11110000
191 11000000 00000011 11110000
192 11000000 00001111 11110000
193 11000000 00111111 11110000
194 11000000 11111111 11110000
195 11000011 11111111 11110000
196 11001111 11111111 11110000
197 11111111 11111111 11110000
199 11111111 11111111 11110000
200 11001111 11111111 11110000
201 11000011 11111111 11110000
202 11000000 11111111 11110000
203 11000000 00111111 11110000
204 11000000 00001111 11110000
205 11000000 00000011 11110000
206 11000000 00000000 11110000
207 11000000 00000000 00110000
231 11000000 00000000 00110000
232 11110000 00000000 00110000
233 11111100 00000000 00110000
234 11111111 00000000 00110000
235 11111111 11000000 00110000
236 11111111 11110000 00110000
237 11111111 11111100 00110000
238 11111111 11111111 00110000
239 11111111 11111111 11110000
241 11111111 11111111 11110000
242 11111111 11111111 00110000
243 11111111 11111100 00110000
244 11111111 11110000 00110000
245 11111111 11000000 00110000
246 11111111 00000000 00110000
247 11111100 00000000 00110000
248 11110000 00000000 00110000
249 11000000 00000000 00110000
273 00000000 00000000 00000000
274 00000000 00000000 00000000
275 00000000 00000000 00000000
276 00000000 00000000 00000000
277 00000000 01100000 00000000
278 00000000 11110000 00000000
279 00000001 11111000 00000000
280 00000001 11111000 00000000
281 00000011 11111100 00000000
283 00000111 11111110 00000000
284 00001111 11111111 00000000
285 00011111 11111111 10000000
286 00011111 11111111 10000000
287 00111111 11111111 11000000
288 01111111 11111111 11100000
289 11111111 11111111 11110000
290 00000000 00000000 00000000
291 00000000 00000000 00000000
315 00000000 00000000 00000000
316 00000000 00000000 00000000
317 00000000 00000000 00000000
318 00000000 00000000 00000000
319 11111111 11111111 11110000
320 01111111 11111111 11100000
321 00111111 11111111 11000000
322 00011111 11111111 10000000
323 00011111 11111111 10000000
325 00001111 11111111 00000000
326 00000111 11111110 00000000
327 00000011 11111100 00000000
328 00000001 11111000 00000000
329 00000001 11111000 00000000
330 00000000 11110000 00000000
331 00000000 01100000 00000000
332 00000000 00000000 00000000
333 00000000 00000000 00000000
358 11000000 00000000 00000000
359 11110000 00000000 00000000
360 11111100 00000000 00000000
361 11111111 00000000 00000000
362 11111111 11000000 00000000
363 11111111 11110000 00000000
364 11111111 11111100 00000000
365 11111111 11111111 00000000
366 11111111 11111111 11000000
368 11111111 11111111 11000000
369 11111111 11111111 00000000
370 11111111 11111100 00000000
371 11111111 11110000 00000000
372 11111111 11000000 00000000
373 11111111 00000000 00000000
374 11111100 00000000 00000000
375 11110000 00000000 00000000
376 11000000 00000000 00000000
400 11000000 00000000 00000000 00001100
401 01100000 00000000 11000000 00011000
402 00110000 00000001 11000000 00110000
403 00011000 00000011 11000000 01100000
404 00001100 00000111 11000000 11000000
405 00000110 00001111 11000001 10000000
406 00000011 00011111 11000011 00000000
407 00000001 10111111 11000110 00000000
408 00000000 11111111 11001100 00000000
409 00000000 11111111 11011000 00000000
410 00001111 11111111 11110000 00000000
411 00001111 11111111 11100000 00000000
412 00001111 11111111 11000000 00000000
413 00001111 11111111 11000000 00000000
414 00001111 11111111 11000000 00000000
415 00001111 11111111 11000000 00000000
416 00001111 11111111 11000000 00000000
417 00001111 11111111 11100000 00000000
418 00001111 11111111 11110000 00000000
419 00000000 11111111 11011000 00000000
420 00000000 11111111 11001100 00000000
421 00000001 10111111 11000110 00000000
422 00000011 00011111 11000011 00000000
423 00000110 00001111 11000001 10000000
424 00001100 00000111 11000000 11000000
425 00011000 00000011 11000000 01100000
426 00110000 00000001 11000000 00110000
427 01100000 00000000 11000000 00011000
428 11000000 00000000 00000000 00001100
429 00000000 00000000 00000000 00000000
432 0xC0, 0x00, 0x00, 0x0C,
433 0x60, 0x00, 0xC0, 0x18,
434 0x30, 0x01, 0xC0, 0x30,
435 0x18, 0x03, 0xC0, 0x60,
436 0x0C, 0x07, 0xC0, 0xC0,
437 0x06, 0x0F, 0xC1, 0x80,
438 0x03, 0x1F, 0xC3, 0x00,
439 0x01, 0xBF, 0xC6, 0x00,
440 0x00, 0xFF, 0xCC, 0x00,
441 0x00, 0xFF, 0xD8, 0x00,
442 0x0F, 0xFF, 0xF0, 0x00,
443 0x0F, 0xFF, 0xE0, 0x00,
444 0x0F, 0xFF, 0xC0, 0x00,
445 0x0F, 0xFF, 0xC0, 0x00,
446 0x0F, 0xFF, 0xC0, 0x00,
447 0x0F, 0xFF, 0xC0, 0x00,
448 0x0F, 0xFF, 0xC0, 0x00,
449 0x0F, 0xFF, 0xE0, 0x00,
450 0x0F, 0xFF, 0xF0, 0x00,
451 0x00, 0xFF, 0xD8, 0x00,
452 0x00, 0xFF, 0xCC, 0x00,
453 0x01, 0xBF, 0xC6, 0x00,
454 0x03, 0x1F, 0xC3, 0x00,
455 0x06, 0x0F, 0xC1, 0x80,
456 0x0C, 0x07, 0xC0, 0xC0,
457 0x18, 0x03, 0xC0, 0x60,
458 0x30, 0x01, 0xC0, 0x30,
459 0x60, 0x00, 0xC0, 0x18,
460 0xC0, 0x00, 0x00, 0x0C,
461 0x00, 0x00, 0x00, 0x00,
464 00000000 00000000 00000000 00000000
465 00000000 00000000 11000000 00000000
466 00000000 00000001 11000000 00000000
467 00000000 00000011 11011111 10000000
468 00000000 00000111 11011111 10000000
469 00000000 00001111 11000000 00000000
470 00000000 00011111 11000000 00000000
471 00000000 00111111 11000000 00000000
472 00000000 01111111 11011111 10000000
473 00000000 11111111 11011111 10000000
474 00001111 11111111 11000000 00000000
475 00001111 11111111 11000000 00000000
476 00001111 11111111 11000000 00000000
477 00001111 11111111 11011111 10000000
478 00001111 11111111 11011111 10000000
479 00001111 11111111 11000000 00000000
480 00001111 11111111 11000000 00000000
481 00001111 11111111 11000000 00000000
482 00001111 11111111 11011111 10000000
483 00000000 11111111 11011111 10000000
484 00000000 01111111 11000000 00000000
485 00000000 00111111 11000000 00000000
486 00000000 00011111 11000000 00000000
487 00000000 00001111 11011111 10000000
488 00000000 00000111 11011111 10000000
489 00000000 00000011 11000000 00000000
490 00000000 00000001 11000000 00000000
491 00000000 00000000 11000000 00000000
492 00000000 00000000 00000000 00000000
493 00000000 00000000 00000000 00000000
496 0x00, 0x00, 0x00, 0x00,
497 0x00, 0x00, 0xC0, 0x00,
498 0x00, 0x01, 0xC0, 0x00,
499 0x00, 0x03, 0xDF, 0x80,
500 0x00, 0x07, 0xDF, 0x80,
501 0x00, 0x0F, 0xC0, 0x00,
502 0x00, 0x1F, 0xC0, 0x00,
503 0x00, 0x3F, 0xC0, 0x00,
504 0x00, 0x7F, 0xDF, 0x80,
505 0x00, 0xFF, 0xDF, 0x80,
506 0x0F, 0xFF, 0xC0, 0x00,
507 0x0F, 0xFF, 0xC0, 0x00,
508 0x0F, 0xFF, 0xC0, 0x00,
509 0x0F, 0xFF, 0xDF, 0x80,
510 0x0F, 0xFF, 0xDF, 0x80,
511 0x0F, 0xFF, 0xC0, 0x00,
512 0x0F, 0xFF, 0xC0, 0x00,
513 0x0F, 0xFF, 0xC0, 0x00,
514 0x0F, 0xFF, 0xDF, 0x80,
515 0x00, 0xFF, 0xDF, 0x80,
516 0x00, 0x7F, 0xC0, 0x00,
517 0x00, 0x3F, 0xC0, 0x00,
518 0x00, 0x1F, 0xC0, 0x00,
519 0x00, 0x0F, 0xDF, 0x80,
520 0x00, 0x07, 0xDF, 0x80,
521 0x00, 0x03, 0xC0, 0x00,
522 0x00, 0x01, 0xC0, 0x00,
523 0x00, 0x00, 0xC0, 0x00,
524 0x00, 0x00, 0x00, 0x00,
525 0x00, 0x00, 0x00, 0x00,
600 11111100 00001111 11000000
601 11111100 00001111 11000000
602 11111100 00001111 11000000
603 11111100 00001111 11000000
604 11111100 00001111 11000000
605 11111100 00001111 11000000
606 11111100 00001111 11000000
607 11111100 00001111 11000000
608 11111100 00001111 11000000
610 11111100 00001111 11000000
611 11111100 00001111 11000000
612 11111100 00001111 11000000
613 11111100 00001111 11000000
614 11111100 00001111 11000000
615 11111100 00001111 11000000
616 11111100 00001111 11000000
617 11111100 00001111 11000000
618 11111100 00001111 11000000
642 11000000 00000000 00110000 00000000 00001100
643 11000000 00000000 11110000 00000000 00111100
644 11000000 00000011 11110000 00000000 11111100
645 11000000 00001111 11110000 00000011 11111100
646 11000000 00111111 11110000 00001111 11111100
647 11000000 11111111 11110000 00111111 11111100
648 11000011 11111111 11110000 11111111 11111100
649 11001111 11111111 11110011 11111111 11111100
650 11111111 11111111 11111111 11111111 11111100
652 11111111 11111111 11111111 11111111 11111100
653 11001111 11111111 11110011 11111111 11111100
654 11000011 11111111 11110000 11111111 11111100
655 11000000 11111111 11110000 00111111 11111100
656 11000000 00111111 11110000 00001111 11111100
657 11000000 00001111 11110000 00000011 11111100
658 11000000 00000011 11110000 00000000 11111100
659 11000000 00000000 11110000 00000000 00111100
660 11000000 00000000 00110000 00000000 00001100
663 0xC0, 0x00, 0x30, 0x00, 0x0C,
664 0xC0, 0x00, 0xF0, 0x00, 0x3C,
665 0xC0, 0x03, 0xF0, 0x00, 0xFC,
666 0xC0, 0x0F, 0xF0, 0x03, 0xFC,
667 0xC0, 0x3F, 0xF0, 0x0F, 0xFC,
668 0xC0, 0xFF, 0xF0, 0x3F, 0xFC,
669 0xC3, 0xFF, 0xF0, 0xFF, 0xFC,
670 0xCF, 0xFF, 0xF3, 0xFF, 0xFC,
671 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
673 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
674 0xCF, 0xFF, 0xF3, 0xFF, 0xFC,
675 0xC3, 0xFF, 0xF0, 0xFF, 0xFC,
676 0xC0, 0xFF, 0xF0, 0x3F, 0xFC,
677 0xC0, 0x3F, 0xF0, 0x0F, 0xFC,
678 0xC0, 0x0F, 0xF0, 0x03, 0xFC,
679 0xC0, 0x03, 0xF0, 0x00, 0xFC,
680 0xC0, 0x00, 0xF0, 0x00, 0x3C,
681 0xC0, 0x00, 0x30, 0x00, 0x0C,
684 00110000 00000000 00001100 00000000 00000011
685 00111100 00000000 00001111 00000000 00000011
686 00111111 00000000 00001111 11000000 00000011
687 00111111 11000000 00001111 11110000 00000011
688 00111111 11110000 00001111 11111100 00000011
689 00111111 11111100 00001111 11111111 00000011
690 00111111 11111111 00001111 11111111 11000011
691 00111111 11111111 11001111 11111111 11110011
692 00111111 11111111 11111111 11111111 11111111
694 00111111 11111111 11111111 11111111 11111111
695 00111111 11111111 11001111 11111111 11110011
696 00111111 11111111 00001111 11111111 11000011
697 00111111 11111100 00001111 11111111 00000011
698 00111111 11110000 00001111 11111100 00000011
699 00111111 11000000 00001111 11110000 00000011
700 00111111 00000000 00001111 11000000 00000011
701 00111100 00000000 00001111 00000000 00000011
702 00110000 00000000 00001100 00000000 00000011
705 0x30, 0x00, 0x0C, 0x00, 0x03,
706 0x3C, 0x00, 0x0F, 0x00, 0x03,
707 0x3F, 0x00, 0x0F, 0xC0, 0x03,
708 0x3F, 0xC0, 0x0F, 0xF0, 0x03,
709 0x3F, 0xF0, 0x0F, 0xFC, 0x03,
710 0x3F, 0xFC, 0x0F, 0xFF, 0x03,
711 0x3F, 0xFF, 0x0F, 0xFF, 0xC3,
712 0x3F, 0xFF, 0xCF, 0xFF, 0xF3,
713 0x3F, 0xFF, 0xFF, 0xFF, 0xFF,
715 0x3F, 0xFF, 0xFF, 0xFF, 0xFF,
716 0x3F, 0xFF, 0xCF, 0xFF, 0xF3,
717 0x3F, 0xFF, 0x0F, 0xFF, 0xC3,
718 0x3F, 0xFC, 0x0F, 0xFF, 0x03,
719 0x3F, 0xF0, 0x0F, 0xFC, 0x03,
720 0x3F, 0xC0, 0x0F, 0xF0, 0x03,
721 0x3F, 0x00, 0x0F, 0xC0, 0x03,
722 0x3C, 0x00, 0x0F, 0x00, 0x03,
723 0x30, 0x00, 0x0C, 0x00, 0x03,
726 00000000 00000011 00000000 00000011
727 00000000 00001111 00000000 00001111
728 00000000 00111111 00000000 00111111
729 00000000 11111111 00000000 11111111
730 00000011 11111111 00000011 11111111
731 00001111 11111111 00001111 11111111
732 00111111 11111111 00111111 11111111
733 11111111 11111111 11111111 11111111
734 11111111 11111111 11111111 11111111
735 00111111 11111111 00111111 11111111
736 00001111 11111111 00001111 11111111
737 00000011 11111111 00000011 11111111
738 00000000 11111111 00000000 11111111
739 00000000 00111111 00000000 00111111
740 00000000 00001111 00000000 00001111
741 00000000 00000011 00000000 00000011
744 0x00, 0x03, 0x00, 0x03,
745 0x00, 0x07, 0x00, 0x07,
746 0x00, 0x3F, 0x00, 0x3F,
747 0x00, 0xFF, 0x00, 0xFF,
748 0x03, 0xFF, 0x03, 0xFF,
749 0x07, 0xFF, 0x07, 0xFF,
750 0x3F, 0xFF, 0x3F, 0xFF,
751 0xFF, 0xFF, 0xFF, 0xFF,
752 0xFF, 0xFF, 0xFF, 0xFF,
753 0x3F, 0xFF, 0x3F, 0xFF,
754 0x07, 0xFF, 0x07, 0xFF,
755 0x03, 0xFF, 0x03, 0xFF,
756 0x00, 0xFF, 0x00, 0xFF,
757 0x00, 0x3F, 0x00, 0x3F,
758 0x00, 0x07, 0x00, 0x07,
759 0x00, 0x03, 0x00, 0x03,
762 11000000 00000000 11000000 00000000
763 11110000 00000000 11110000 00000000
764 11111100 00000000 11111100 00000000
765 11111111 00000000 11111111 00000000
766 11111111 11000000 11111111 11000000
767 11111111 11110000 11111111 11110000
768 11111111 11111100 11111111 11111100
769 11111111 11111111 11111111 11111111
770 11111111 11111111 11111111 11111111
771 11111111 11111100 11111111 11111100
772 11111111 11110000 11111111 11110000
773 11111111 11000000 11111111 11000000
774 11111111 00000000 11111111 00000000
775 11111100 00000000 11111100 00000000
776 11110000 00000000 11110000 00000000
777 11000000 00000000 11000000 00000000
780 0xC0, 0x00, 0xC0, 0x00,
781 0xF0, 0x00, 0xF0, 0x00,
782 0xFC, 0x00, 0xFC, 0x00,
783 0xFF, 0x00, 0xFF, 0x00,
784 0xFF, 0xC0, 0xFF, 0xC0,
785 0xFF, 0xF0, 0xFF, 0xF0,
786 0xFF, 0xFC, 0xFF, 0xFC,
787 0xFF, 0xFF, 0xFF, 0xFF,
788 0xFF, 0xFF, 0xFF, 0xFF,
789 0xFF, 0xFC, 0xFF, 0xFC,
790 0xFF, 0xF0, 0xFF, 0xF0,
791 0xFF, 0xC0, 0xFF, 0xC0,
792 0xFF, 0x00, 0xFF, 0x00,
793 0xFC, 0x00, 0xFC, 0x00,
794 0xF0, 0x00, 0xF0, 0x00,
795 0xC0, 0x00, 0xC0, 0x00,
842 nextColour = Colour::LIGHTTEXT;
848 for(int i = 0; i < nextSymbol; i++)
850 offset += (widths[i]) * heights[i];
853 UCHAR* base = symbols + offset;
854 int widthBytes = widths[nextSymbol];
855 int widthBits = widthBytes * 8;
856 int sHeight = heights[nextSymbol];
858 int x, y, bytesIn, bitsIn;
860 for (y = 0; y < sHeight; y++)
862 for (x = 0; x < widthBits; x++)
864 bytesIn = (y * widthBytes) + (int)(x / 8);
867 if ((base[bytesIn] >> (7 - bitsIn)) & 0x01)
869 drawPixel(x, y, nextColour);