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
25 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};
26 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};
28 UCHAR WSymbol::symbols[] = {
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
81 00000000 00000000 00000000 00000000
82 00000000 00000000 00000000 00000000
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,
95 0x00, 0x00, 0x00, 0x00,
96 0x00, 0x00, 0x00, 0x00,
99 00000000 00000000 00000000 00000011
100 00000000 00000000 00000000 00011111
101 00000000 00000000 00000000 11111111
102 00000000 00000000 00000011 11111111
103 00000000 00000000 00011111 11111111
104 00000000 00000000 11111111 11111111
105 00000000 00000011 11111111 11111111
106 00000000 00011111 11111111 11111111
107 00000000 11111111 11111111 11111111
108 00000011 11111111 11111111 11111111
109 00011111 11111111 11111111 11111111
110 11111111 11111111 11111111 11111111
113 0x00, 0x00, 0x00, 0x03,
114 0x00, 0x00, 0x00, 0x1F,
115 0x00, 0x00, 0x00, 0xFF,
116 0x00, 0x00, 0x03, 0xFF,
117 0x00, 0x00, 0x1F, 0xFF,
118 0x00, 0x00, 0xFF, 0xFF,
119 0x00, 0x03, 0xFF, 0xFF,
120 0x00, 0x1F, 0xFF, 0xFF,
121 0x00, 0xFF, 0xFF, 0xFF,
122 0x03, 0xFF, 0xFF, 0xFF,
123 0x1F, 0xFF, 0xFF, 0xFF,
124 0xFF, 0xFF, 0xFF, 0xFF,
191 11000000 00000000 00110000
192 11000000 00000000 11110000
193 11000000 00000011 11110000
194 11000000 00001111 11110000
195 11000000 00111111 11110000
196 11000000 11111111 11110000
197 11000011 11111111 11110000
198 11001111 11111111 11110000
199 11111111 11111111 11110000
201 11111111 11111111 11110000
202 11001111 11111111 11110000
203 11000011 11111111 11110000
204 11000000 11111111 11110000
205 11000000 00111111 11110000
206 11000000 00001111 11110000
207 11000000 00000011 11110000
208 11000000 00000000 11110000
209 11000000 00000000 00110000
233 11000000 00000000 00110000
234 11110000 00000000 00110000
235 11111100 00000000 00110000
236 11111111 00000000 00110000
237 11111111 11000000 00110000
238 11111111 11110000 00110000
239 11111111 11111100 00110000
240 11111111 11111111 00110000
241 11111111 11111111 11110000
243 11111111 11111111 11110000
244 11111111 11111111 00110000
245 11111111 11111100 00110000
246 11111111 11110000 00110000
247 11111111 11000000 00110000
248 11111111 00000000 00110000
249 11111100 00000000 00110000
250 11110000 00000000 00110000
251 11000000 00000000 00110000
275 00000000 00000000 00000000
276 00000000 00000000 00000000
277 00000000 00000000 00000000
278 00000000 00000000 00000000
279 00000000 01100000 00000000
280 00000000 11110000 00000000
281 00000001 11111000 00000000
282 00000001 11111000 00000000
283 00000011 11111100 00000000
285 00000111 11111110 00000000
286 00001111 11111111 00000000
287 00011111 11111111 10000000
288 00011111 11111111 10000000
289 00111111 11111111 11000000
290 01111111 11111111 11100000
291 11111111 11111111 11110000
292 00000000 00000000 00000000
293 00000000 00000000 00000000
317 00000000 00000000 00000000
318 00000000 00000000 00000000
319 00000000 00000000 00000000
320 00000000 00000000 00000000
321 11111111 11111111 11110000
322 01111111 11111111 11100000
323 00111111 11111111 11000000
324 00011111 11111111 10000000
325 00011111 11111111 10000000
327 00001111 11111111 00000000
328 00000111 11111110 00000000
329 00000011 11111100 00000000
330 00000001 11111000 00000000
331 00000001 11111000 00000000
332 00000000 11110000 00000000
333 00000000 01100000 00000000
334 00000000 00000000 00000000
335 00000000 00000000 00000000
360 11000000 00000000 00000000
361 11110000 00000000 00000000
362 11111100 00000000 00000000
363 11111111 00000000 00000000
364 11111111 11000000 00000000
365 11111111 11110000 00000000
366 11111111 11111100 00000000
367 11111111 11111111 00000000
368 11111111 11111111 11000000
370 11111111 11111111 11000000
371 11111111 11111111 00000000
372 11111111 11111100 00000000
373 11111111 11110000 00000000
374 11111111 11000000 00000000
375 11111111 00000000 00000000
376 11111100 00000000 00000000
377 11110000 00000000 00000000
378 11000000 00000000 00000000
402 11000000 00000000 00000000 00001100
403 01100000 00000000 11000000 00011000
404 00110000 00000001 11000000 00110000
405 00011000 00000011 11000000 01100000
406 00001100 00000111 11000000 11000000
407 00000110 00001111 11000001 10000000
408 00000011 00011111 11000011 00000000
409 00000001 10111111 11000110 00000000
410 00000000 11111111 11001100 00000000
411 00000000 11111111 11011000 00000000
412 00001111 11111111 11110000 00000000
413 00001111 11111111 11100000 00000000
414 00001111 11111111 11000000 00000000
415 00001111 11111111 11000000 00000000
416 00001111 11111111 11000000 00000000
417 00001111 11111111 11000000 00000000
418 00001111 11111111 11000000 00000000
419 00001111 11111111 11100000 00000000
420 00001111 11111111 11110000 00000000
421 00000000 11111111 11011000 00000000
422 00000000 11111111 11001100 00000000
423 00000001 10111111 11000110 00000000
424 00000011 00011111 11000011 00000000
425 00000110 00001111 11000001 10000000
426 00001100 00000111 11000000 11000000
427 00011000 00000011 11000000 01100000
428 00110000 00000001 11000000 00110000
429 01100000 00000000 11000000 00011000
430 11000000 00000000 00000000 00001100
431 00000000 00000000 00000000 00000000
434 0xC0, 0x00, 0x00, 0x0C,
435 0x60, 0x00, 0xC0, 0x18,
436 0x30, 0x01, 0xC0, 0x30,
437 0x18, 0x03, 0xC0, 0x60,
438 0x0C, 0x07, 0xC0, 0xC0,
439 0x06, 0x0F, 0xC1, 0x80,
440 0x03, 0x1F, 0xC3, 0x00,
441 0x01, 0xBF, 0xC6, 0x00,
442 0x00, 0xFF, 0xCC, 0x00,
443 0x00, 0xFF, 0xD8, 0x00,
444 0x0F, 0xFF, 0xF0, 0x00,
445 0x0F, 0xFF, 0xE0, 0x00,
446 0x0F, 0xFF, 0xC0, 0x00,
447 0x0F, 0xFF, 0xC0, 0x00,
448 0x0F, 0xFF, 0xC0, 0x00,
449 0x0F, 0xFF, 0xC0, 0x00,
450 0x0F, 0xFF, 0xC0, 0x00,
451 0x0F, 0xFF, 0xE0, 0x00,
452 0x0F, 0xFF, 0xF0, 0x00,
453 0x00, 0xFF, 0xD8, 0x00,
454 0x00, 0xFF, 0xCC, 0x00,
455 0x01, 0xBF, 0xC6, 0x00,
456 0x03, 0x1F, 0xC3, 0x00,
457 0x06, 0x0F, 0xC1, 0x80,
458 0x0C, 0x07, 0xC0, 0xC0,
459 0x18, 0x03, 0xC0, 0x60,
460 0x30, 0x01, 0xC0, 0x30,
461 0x60, 0x00, 0xC0, 0x18,
462 0xC0, 0x00, 0x00, 0x0C,
463 0x00, 0x00, 0x00, 0x00,
466 00000000 00000000 00000000 00000000
467 00000000 00000000 11000000 00000000
468 00000000 00000001 11000000 00000000
469 00000000 00000011 11011111 10000000
470 00000000 00000111 11011111 10000000
471 00000000 00001111 11000000 00000000
472 00000000 00011111 11000000 00000000
473 00000000 00111111 11000000 00000000
474 00000000 01111111 11011111 10000000
475 00000000 11111111 11011111 10000000
476 00001111 11111111 11000000 00000000
477 00001111 11111111 11000000 00000000
478 00001111 11111111 11000000 00000000
479 00001111 11111111 11011111 10000000
480 00001111 11111111 11011111 10000000
481 00001111 11111111 11000000 00000000
482 00001111 11111111 11000000 00000000
483 00001111 11111111 11000000 00000000
484 00001111 11111111 11011111 10000000
485 00000000 11111111 11011111 10000000
486 00000000 01111111 11000000 00000000
487 00000000 00111111 11000000 00000000
488 00000000 00011111 11000000 00000000
489 00000000 00001111 11011111 10000000
490 00000000 00000111 11011111 10000000
491 00000000 00000011 11000000 00000000
492 00000000 00000001 11000000 00000000
493 00000000 00000000 11000000 00000000
494 00000000 00000000 00000000 00000000
495 00000000 00000000 00000000 00000000
498 0x00, 0x00, 0x00, 0x00,
499 0x00, 0x00, 0xC0, 0x00,
500 0x00, 0x01, 0xC0, 0x00,
501 0x00, 0x03, 0xDF, 0x80,
502 0x00, 0x07, 0xDF, 0x80,
503 0x00, 0x0F, 0xC0, 0x00,
504 0x00, 0x1F, 0xC0, 0x00,
505 0x00, 0x3F, 0xC0, 0x00,
506 0x00, 0x7F, 0xDF, 0x80,
507 0x00, 0xFF, 0xDF, 0x80,
508 0x0F, 0xFF, 0xC0, 0x00,
509 0x0F, 0xFF, 0xC0, 0x00,
510 0x0F, 0xFF, 0xC0, 0x00,
511 0x0F, 0xFF, 0xDF, 0x80,
512 0x0F, 0xFF, 0xDF, 0x80,
513 0x0F, 0xFF, 0xC0, 0x00,
514 0x0F, 0xFF, 0xC0, 0x00,
515 0x0F, 0xFF, 0xC0, 0x00,
516 0x0F, 0xFF, 0xDF, 0x80,
517 0x00, 0xFF, 0xDF, 0x80,
518 0x00, 0x7F, 0xC0, 0x00,
519 0x00, 0x3F, 0xC0, 0x00,
520 0x00, 0x1F, 0xC0, 0x00,
521 0x00, 0x0F, 0xDF, 0x80,
522 0x00, 0x07, 0xDF, 0x80,
523 0x00, 0x03, 0xC0, 0x00,
524 0x00, 0x01, 0xC0, 0x00,
525 0x00, 0x00, 0xC0, 0x00,
526 0x00, 0x00, 0x00, 0x00,
527 0x00, 0x00, 0x00, 0x00,
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
609 11111100 00001111 11000000
610 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
619 11111100 00001111 11000000
620 11111100 00001111 11000000
644 11000000 00000000 00110000 00000000 00001100
645 11000000 00000000 11110000 00000000 00111100
646 11000000 00000011 11110000 00000000 11111100
647 11000000 00001111 11110000 00000011 11111100
648 11000000 00111111 11110000 00001111 11111100
649 11000000 11111111 11110000 00111111 11111100
650 11000011 11111111 11110000 11111111 11111100
651 11001111 11111111 11110011 11111111 11111100
652 11111111 11111111 11111111 11111111 11111100
654 11111111 11111111 11111111 11111111 11111100
655 11001111 11111111 11110011 11111111 11111100
656 11000011 11111111 11110000 11111111 11111100
657 11000000 11111111 11110000 00111111 11111100
658 11000000 00111111 11110000 00001111 11111100
659 11000000 00001111 11110000 00000011 11111100
660 11000000 00000011 11110000 00000000 11111100
661 11000000 00000000 11110000 00000000 00111100
662 11000000 00000000 00110000 00000000 00001100
665 0xC0, 0x00, 0x30, 0x00, 0x0C,
666 0xC0, 0x00, 0xF0, 0x00, 0x3C,
667 0xC0, 0x03, 0xF0, 0x00, 0xFC,
668 0xC0, 0x0F, 0xF0, 0x03, 0xFC,
669 0xC0, 0x3F, 0xF0, 0x0F, 0xFC,
670 0xC0, 0xFF, 0xF0, 0x3F, 0xFC,
671 0xC3, 0xFF, 0xF0, 0xFF, 0xFC,
672 0xCF, 0xFF, 0xF3, 0xFF, 0xFC,
673 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
675 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
676 0xCF, 0xFF, 0xF3, 0xFF, 0xFC,
677 0xC3, 0xFF, 0xF0, 0xFF, 0xFC,
678 0xC0, 0xFF, 0xF0, 0x3F, 0xFC,
679 0xC0, 0x3F, 0xF0, 0x0F, 0xFC,
680 0xC0, 0x0F, 0xF0, 0x03, 0xFC,
681 0xC0, 0x03, 0xF0, 0x00, 0xFC,
682 0xC0, 0x00, 0xF0, 0x00, 0x3C,
683 0xC0, 0x00, 0x30, 0x00, 0x0C,
686 00110000 00000000 00001100 00000000 00000011
687 00111100 00000000 00001111 00000000 00000011
688 00111111 00000000 00001111 11000000 00000011
689 00111111 11000000 00001111 11110000 00000011
690 00111111 11110000 00001111 11111100 00000011
691 00111111 11111100 00001111 11111111 00000011
692 00111111 11111111 00001111 11111111 11000011
693 00111111 11111111 11001111 11111111 11110011
694 00111111 11111111 11111111 11111111 11111111
696 00111111 11111111 11111111 11111111 11111111
697 00111111 11111111 11001111 11111111 11110011
698 00111111 11111111 00001111 11111111 11000011
699 00111111 11111100 00001111 11111111 00000011
700 00111111 11110000 00001111 11111100 00000011
701 00111111 11000000 00001111 11110000 00000011
702 00111111 00000000 00001111 11000000 00000011
703 00111100 00000000 00001111 00000000 00000011
704 00110000 00000000 00001100 00000000 00000011
707 0x30, 0x00, 0x0C, 0x00, 0x03,
708 0x3C, 0x00, 0x0F, 0x00, 0x03,
709 0x3F, 0x00, 0x0F, 0xC0, 0x03,
710 0x3F, 0xC0, 0x0F, 0xF0, 0x03,
711 0x3F, 0xF0, 0x0F, 0xFC, 0x03,
712 0x3F, 0xFC, 0x0F, 0xFF, 0x03,
713 0x3F, 0xFF, 0x0F, 0xFF, 0xC3,
714 0x3F, 0xFF, 0xCF, 0xFF, 0xF3,
715 0x3F, 0xFF, 0xFF, 0xFF, 0xFF,
717 0x3F, 0xFF, 0xFF, 0xFF, 0xFF,
718 0x3F, 0xFF, 0xCF, 0xFF, 0xF3,
719 0x3F, 0xFF, 0x0F, 0xFF, 0xC3,
720 0x3F, 0xFC, 0x0F, 0xFF, 0x03,
721 0x3F, 0xF0, 0x0F, 0xFC, 0x03,
722 0x3F, 0xC0, 0x0F, 0xF0, 0x03,
723 0x3F, 0x00, 0x0F, 0xC0, 0x03,
724 0x3C, 0x00, 0x0F, 0x00, 0x03,
725 0x30, 0x00, 0x0C, 0x00, 0x03,
728 00000000 00000011 00000000 00000011
729 00000000 00001111 00000000 00001111
730 00000000 00111111 00000000 00111111
731 00000000 11111111 00000000 11111111
732 00000011 11111111 00000011 11111111
733 00001111 11111111 00001111 11111111
734 00111111 11111111 00111111 11111111
735 11111111 11111111 11111111 11111111
736 11111111 11111111 11111111 11111111
737 00111111 11111111 00111111 11111111
738 00001111 11111111 00001111 11111111
739 00000011 11111111 00000011 11111111
740 00000000 11111111 00000000 11111111
741 00000000 00111111 00000000 00111111
742 00000000 00001111 00000000 00001111
743 00000000 00000011 00000000 00000011
746 0x00, 0x03, 0x00, 0x03,
747 0x00, 0x07, 0x00, 0x07,
748 0x00, 0x3F, 0x00, 0x3F,
749 0x00, 0xFF, 0x00, 0xFF,
750 0x03, 0xFF, 0x03, 0xFF,
751 0x07, 0xFF, 0x07, 0xFF,
752 0x3F, 0xFF, 0x3F, 0xFF,
753 0xFF, 0xFF, 0xFF, 0xFF,
754 0xFF, 0xFF, 0xFF, 0xFF,
755 0x3F, 0xFF, 0x3F, 0xFF,
756 0x07, 0xFF, 0x07, 0xFF,
757 0x03, 0xFF, 0x03, 0xFF,
758 0x00, 0xFF, 0x00, 0xFF,
759 0x00, 0x3F, 0x00, 0x3F,
760 0x00, 0x07, 0x00, 0x07,
761 0x00, 0x03, 0x00, 0x03,
764 11000000 00000000 11000000 00000000
765 11110000 00000000 11110000 00000000
766 11111100 00000000 11111100 00000000
767 11111111 00000000 11111111 00000000
768 11111111 11000000 11111111 11000000
769 11111111 11110000 11111111 11110000
770 11111111 11111100 11111111 11111100
771 11111111 11111111 11111111 11111111
772 11111111 11111111 11111111 11111111
773 11111111 11111100 11111111 11111100
774 11111111 11110000 11111111 11110000
775 11111111 11000000 11111111 11000000
776 11111111 00000000 11111111 00000000
777 11111100 00000000 11111100 00000000
778 11110000 00000000 11110000 00000000
779 11000000 00000000 11000000 00000000
782 0xC0, 0x00, 0xC0, 0x00,
783 0xF0, 0x00, 0xF0, 0x00,
784 0xFC, 0x00, 0xFC, 0x00,
785 0xFF, 0x00, 0xFF, 0x00,
786 0xFF, 0xC0, 0xFF, 0xC0,
787 0xFF, 0xF0, 0xFF, 0xF0,
788 0xFF, 0xFC, 0xFF, 0xFC,
789 0xFF, 0xFF, 0xFF, 0xFF,
790 0xFF, 0xFF, 0xFF, 0xFF,
791 0xFF, 0xFC, 0xFF, 0xFC,
792 0xFF, 0xF0, 0xFF, 0xF0,
793 0xFF, 0xC0, 0xFF, 0xC0,
794 0xFF, 0x00, 0xFF, 0x00,
795 0xFC, 0x00, 0xFC, 0x00,
796 0xF0, 0x00, 0xF0, 0x00,
797 0xC0, 0x00, 0xC0, 0x00,
844 nextColour = Colour::LIGHTTEXT;
850 for(int i = 0; i < nextSymbol; i++)
852 offset += (widths[i]) * heights[i];
855 UCHAR* base = symbols + offset;
856 int widthBytes = widths[nextSymbol];
857 int widthBits = widthBytes * 8;
858 int sHeight = heights[nextSymbol];
860 int x, y, bytesIn, bitsIn;
862 for (y = 0; y < sHeight; y++)
864 for (x = 0; x < widthBits; x++)
866 bytesIn = (y * widthBytes) + (int)(x / 8);
869 if ((base[bytesIn] >> (7 - bitsIn)) & 0x01)
871 drawPixel(x, y, nextColour);
877 bool WSymbol::mouseLBDOWN(int x, int y)
879 if ((x-getRootBoxOffsetX())>=0 && (y-getRootBoxOffsetY())>=0
880 && (x-getRootBoxOffsetX())<=32&& (y-getRootBoxOffsetY())<=32)