61 #define DEBUG_VARS_PROTOTYPES()
68 #define DPRINT_NOTAB( ... )
70 #define DRETURN( ... )
71 #define DENTER_ARG( ... )
72 #define DRETURN_ARG( ... )
74 #define show_frame_sprite( ... )
75 #define show_pixels( ... )
100 #define FONT_HEIGHT 10
409 int print(
int origin_h,
int origin_w,
char c,
Color background,
Color foreground );
411 int print(
int origin_h,
int origin_w,
char c,
Color foreground );
413 int print(
int origin_h,
int origin_w,
char c );
415 int print(
int origin_h,
int origin_w,
const char *str,
Color background,
Color foreground );
417 int print(
int origin_h,
int origin_w,
const char *str,
Color foreground );
419 int print(
int origin_h,
int origin_w,
const char *str );
421 int print(
int origin_h,
int origin_w,
int num,
Color background,
Color foreground );
423 int print(
int origin_h,
int origin_w,
int num,
Color foreground );
425 int print(
int origin_h,
int origin_w,
int num );
429 int print_err(
int origin_h,
int origin_w );
544 DPRINT(
"update: %d | index: %5d | background: %5d | foreground: %5d |\n", sprite_tmp.f_update, sprite_tmp.sprite_index, sprite_tmp.background_color, sprite_tmp.foreground_color );
545 DPRINT(
"decoded background color: %6x | decoded foreground color: %6x |\n",
g_palette[sprite_tmp.background_color], sprite_tmp.foreground_color );
567 void show_palette(
void )
570 for (
int t = 0;t < Config::PALETTE_SIZE;t++)
607 #if FONT_HEIGHT == 10
612 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
613 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00,
614 0x6C, 0x6C, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
615 0x48, 0x24, 0x7E, 0x24, 0x24, 0x7E, 0x24, 0x12, 0x12, 0x00,
616 0x38, 0x24, 0x04, 0x18, 0x20, 0x24, 0x1C, 0x10, 0x10, 0x00,
617 0x04, 0x0A, 0x04, 0x30, 0x0E, 0x10, 0x28, 0x10, 0x00, 0x00,
618 0x00, 0x70, 0x08, 0x08, 0x18, 0x54, 0x24, 0x78, 0x00, 0x00,
619 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
620 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20,
621 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04,
622 0x10, 0x7C, 0x10, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
623 0x00, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x00, 0x00,
624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x0C, 0x04,
625 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
626 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
627 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x00,
628 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00,
629 0x10, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7C, 0x00, 0x00,
630 0x1C, 0x22, 0x20, 0x10, 0x08, 0x04, 0x22, 0x3E, 0x00, 0x00,
631 0x1C, 0x22, 0x20, 0x18, 0x20, 0x20, 0x22, 0x1C, 0x00, 0x00,
632 0x30, 0x28, 0x24, 0x24, 0x7E, 0x20, 0x20, 0x70, 0x00, 0x00,
633 0x7C, 0x04, 0x04, 0x3C, 0x40, 0x40, 0x42, 0x3C, 0x00, 0x00,
634 0x70, 0x08, 0x04, 0x3C, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00,
635 0x7E, 0x42, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, 0x00, 0x00,
636 0x3C, 0x42, 0x42, 0x3C, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00,
637 0x3C, 0x42, 0x42, 0x42, 0x7C, 0x40, 0x20, 0x1E, 0x00, 0x00,
638 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
639 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x04, 0x00,
640 0x00, 0x40, 0x30, 0x08, 0x06, 0x08, 0x30, 0x40, 0x00, 0x00,
641 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
642 0x00, 0x02, 0x0C, 0x10, 0x60, 0x10, 0x0C, 0x02, 0x00, 0x00,
643 0x38, 0x44, 0x40, 0x40, 0x20, 0x10, 0x00, 0x18, 0x00, 0x00,
644 0x22, 0x22, 0x32, 0x2A, 0x2A, 0x32, 0x02, 0x22, 0x1C, 0x00,
645 0x18, 0x10, 0x28, 0x28, 0x28, 0x38, 0x44, 0xEE, 0x00, 0x00,
646 0x3E, 0x44, 0x44, 0x3C, 0x44, 0x44, 0x44, 0x3E, 0x00, 0x00,
647 0x78, 0x44, 0x02, 0x02, 0x02, 0x02, 0x44, 0x38, 0x00, 0x00,
648 0x1E, 0x24, 0x44, 0x44, 0x44, 0x44, 0x24, 0x1E, 0x00, 0x00,
649 0x7E, 0x44, 0x14, 0x1C, 0x14, 0x04, 0x44, 0x7E, 0x00, 0x00,
650 0x7E, 0x44, 0x14, 0x1C, 0x14, 0x04, 0x04, 0x0E, 0x00, 0x00,
651 0x78, 0x44, 0x02, 0x02, 0xE2, 0x42, 0x44, 0x38, 0x00, 0x00,
652 0xEE, 0x44, 0x44, 0x7C, 0x44, 0x44, 0x44, 0xEE, 0x00, 0x00,
653 0x7C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7C, 0x00, 0x00,
654 0x78, 0x20, 0x20, 0x20, 0x22, 0x22, 0x22, 0x1C, 0x00, 0x00,
655 0xEE, 0x44, 0x24, 0x14, 0x1C, 0x24, 0x44, 0xCE, 0x00, 0x00,
656 0x0E, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x7E, 0x00, 0x00,
657 0xEE, 0x6C, 0x6C, 0x54, 0x54, 0x44, 0x44, 0xEE, 0x00, 0x00,
658 0xE7, 0x46, 0x4A, 0x4A, 0x52, 0x52, 0x62, 0x67, 0x00, 0x00,
659 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00,
660 0x3E, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x04, 0x0E, 0x00, 0x00,
661 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0xF8, 0x00,
662 0x3E, 0x44, 0x44, 0x44, 0x3C, 0x24, 0x44, 0x8E, 0x00, 0x00,
663 0x5C, 0x62, 0x02, 0x3C, 0x40, 0x40, 0x46, 0x3A, 0x00, 0x00,
664 0xFE, 0x92, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
665 0xEE, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00,
666 0xE7, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x18, 0x00, 0x00,
667 0xEE, 0x44, 0x44, 0x54, 0x54, 0x54, 0x54, 0x28, 0x00, 0x00,
668 0xEE, 0x44, 0x28, 0x10, 0x10, 0x28, 0x44, 0xEE, 0x00, 0x00,
669 0xEE, 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
670 0x7C, 0x44, 0x20, 0x10, 0x10, 0x08, 0x44, 0x7C, 0x00, 0x00,
671 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38,
672 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x00,
673 0x0E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0E,
674 0x08, 0x14, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
675 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
676 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
677 0x00, 0x00, 0x3C, 0x42, 0x7C, 0x42, 0x62, 0xDC, 0x00, 0x00,
678 0x03, 0x02, 0x3A, 0x46, 0x42, 0x42, 0x46, 0x3B, 0x00, 0x00,
679 0x00, 0x00, 0x5C, 0x62, 0x02, 0x02, 0x42, 0x3C, 0x00, 0x00,
680 0x60, 0x40, 0x5C, 0x62, 0x42, 0x42, 0x62, 0xDC, 0x00, 0x00,
681 0x00, 0x00, 0x3C, 0x42, 0x7E, 0x02, 0x02, 0x7C, 0x00, 0x00,
682 0x70, 0x08, 0x7E, 0x08, 0x08, 0x08, 0x08, 0x7E, 0x00, 0x00,
683 0x00, 0x00, 0xDC, 0x62, 0x42, 0x42, 0x62, 0x5C, 0x40, 0x3C,
684 0x06, 0x04, 0x34, 0x4C, 0x44, 0x44, 0x44, 0xEE, 0x00, 0x00,
685 0x10, 0x00, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x7C, 0x00, 0x00,
686 0x10, 0x00, 0x3C, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x1E,
687 0x06, 0x04, 0xF4, 0x24, 0x1C, 0x14, 0x24, 0xE6, 0x00, 0x00,
688 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7C, 0x00, 0x00,
689 0x00, 0x00, 0x4B, 0xB6, 0x92, 0x92, 0x92, 0xB7, 0x00, 0x00,
690 0x00, 0x00, 0x36, 0x4C, 0x44, 0x44, 0x44, 0xEE, 0x00, 0x00,
691 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00,
692 0x00, 0x00, 0x36, 0x4C, 0x44, 0x44, 0x44, 0x3C, 0x04, 0x0E,
693 0x00, 0x00, 0xDC, 0x62, 0x42, 0x42, 0x62, 0x5C, 0x40, 0xE0,
694 0x00, 0x00, 0x76, 0x0C, 0x04, 0x04, 0x04, 0x3E, 0x00, 0x00,
695 0x00, 0x00, 0x7C, 0x42, 0x3C, 0x40, 0x42, 0x3E, 0x00, 0x00,
696 0x00, 0x04, 0x3E, 0x04, 0x04, 0x04, 0x44, 0x38, 0x00, 0x00,
697 0x00, 0x00, 0x66, 0x44, 0x44, 0x44, 0x64, 0xD8, 0x00, 0x00,
698 0x00, 0x00, 0xE7, 0x42, 0x24, 0x24, 0x18, 0x18, 0x00, 0x00,
699 0x00, 0x00, 0xEE, 0x44, 0x54, 0x54, 0x54, 0x28, 0x00, 0x00,
700 0x00, 0x00, 0x66, 0x24, 0x18, 0x18, 0x24, 0x66, 0x00, 0x00,
701 0x00, 0x00, 0xEE, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x1C,
702 0x00, 0x00, 0x7C, 0x24, 0x10, 0x08, 0x44, 0x7C, 0x00, 0x00,
703 0x10, 0x08, 0x08, 0x08, 0x04, 0x08, 0x08, 0x08, 0x10, 0x00,
704 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
705 0x04, 0x08, 0x08, 0x08, 0x10, 0x08, 0x08, 0x08, 0x04, 0x00,
706 0x00, 0x00, 0x00, 0x4C, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
707 0xC6, 0xBA, 0xBE, 0xBE, 0xDE, 0xEE, 0xFE, 0xEE, 0xEE, 0x7C,
711 #elif FONT_HEIGHT == 16
716 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
717 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08, 0x00, 0x00,
718 0x00, 0x00, 0x28, 0x14, 0x14, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
719 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x7E, 0x24, 0x24, 0x24, 0x7E, 0x24, 0x24, 0x24, 0x00, 0x00,
720 0x00, 0x00, 0x00, 0x10, 0x3C, 0x52, 0x52, 0x14, 0x18, 0x30, 0x50, 0x52, 0x52, 0x3C, 0x10, 0x10,
721 0x00, 0x00, 0x00, 0x00, 0x22, 0x25, 0x15, 0x15, 0x2D, 0x5A, 0x54, 0x54, 0x52, 0x22, 0x00, 0x00,
722 0x00, 0x00, 0x00, 0x00, 0x0C, 0x12, 0x12, 0x0A, 0x66, 0x25, 0x25, 0x29, 0x91, 0x6E, 0x00, 0x00,
723 0x00, 0x00, 0x06, 0x04, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
724 0x00, 0x00, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0x00,
725 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x00,
726 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x1C, 0x1C, 0x6B, 0x08, 0x08, 0x00, 0x00, 0x00,
727 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
728 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x04, 0x02,
729 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
730 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00,
731 0x00, 0x00, 0x40, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x00,
732 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00,
733 0x00, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00, 0x00,
734 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x40, 0x20, 0x10, 0x08, 0x04, 0x42, 0x7E, 0x00, 0x00,
735 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x20, 0x18, 0x20, 0x40, 0x42, 0x42, 0x3C, 0x00, 0x00,
736 0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x30, 0x28, 0x24, 0x22, 0xFE, 0x20, 0x20, 0x78, 0x00, 0x00,
737 0x00, 0x00, 0x00, 0x00, 0x7E, 0x02, 0x02, 0x3E, 0x42, 0x40, 0x40, 0x42, 0x42, 0x3C, 0x00, 0x00,
738 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x02, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x44, 0x38, 0x00, 0x00,
739 0x00, 0x00, 0x00, 0x00, 0x7E, 0x42, 0x20, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
740 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x3C, 0x24, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00,
741 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x62, 0x5C, 0x40, 0x40, 0x24, 0x18, 0x00, 0x00,
742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
743 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08,
744 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00,
745 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
746 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00,
747 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x20, 0x10, 0x10, 0x00, 0x18, 0x18, 0x00, 0x00,
748 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x59, 0x55, 0x55, 0x55, 0x55, 0x39, 0x42, 0x3C, 0x00, 0x00,
749 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x14, 0x14, 0x14, 0x14, 0x3E, 0x22, 0x22, 0x77, 0x00, 0x00,
750 0x00, 0x00, 0x00, 0x00, 0x3F, 0x42, 0x42, 0x22, 0x1E, 0x22, 0x42, 0x42, 0x42, 0x3F, 0x00, 0x00,
751 0x00, 0x00, 0x00, 0x00, 0x7C, 0x42, 0x41, 0x01, 0x01, 0x01, 0x01, 0x41, 0x22, 0x1C, 0x00, 0x00,
752 0x00, 0x00, 0x00, 0x00, 0x1F, 0x22, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x22, 0x1F, 0x00, 0x00,
753 0x00, 0x00, 0x00, 0x00, 0x3F, 0x42, 0x12, 0x12, 0x1E, 0x12, 0x12, 0x02, 0x42, 0x3F, 0x00, 0x00,
754 0x00, 0x00, 0x00, 0x00, 0x3F, 0x42, 0x12, 0x12, 0x1E, 0x12, 0x12, 0x02, 0x02, 0x07, 0x00, 0x00,
755 0x00, 0x00, 0x00, 0x00, 0x3C, 0x22, 0x21, 0x01, 0x01, 0x01, 0x71, 0x21, 0x22, 0x1C, 0x00, 0x00,
756 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x22, 0x22, 0x3E, 0x22, 0x22, 0x22, 0x22, 0x77, 0x00, 0x00,
757 0x00, 0x00, 0x00, 0x00, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00, 0x00,
758 0x00, 0x00, 0x00, 0x00, 0x7C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x0F,
759 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x12, 0x0A, 0x0E, 0x0A, 0x12, 0x12, 0x22, 0x77, 0x00, 0x00,
760 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x7F, 0x00, 0x00,
761 0x00, 0x00, 0x00, 0x00, 0x77, 0x36, 0x36, 0x36, 0x36, 0x2A, 0x2A, 0x2A, 0x2A, 0x6B, 0x00, 0x00,
762 0x00, 0x00, 0x00, 0x00, 0x77, 0x26, 0x26, 0x2A, 0x2A, 0x2A, 0x32, 0x32, 0x32, 0x27, 0x00, 0x00,
763 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x22, 0x1C, 0x00, 0x00,
764 0x00, 0x00, 0x00, 0x00, 0x3F, 0x42, 0x42, 0x42, 0x3E, 0x02, 0x02, 0x02, 0x02, 0x07, 0x00, 0x00,
765 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x41, 0x41, 0x41, 0x41, 0x4D, 0x32, 0x1C, 0x60, 0x00,
766 0x00, 0x00, 0x00, 0x00, 0x1F, 0x22, 0x22, 0x22, 0x1E, 0x0A, 0x12, 0x12, 0x22, 0x67, 0x00, 0x00,
767 0x00, 0x00, 0x00, 0x00, 0x7C, 0x42, 0x42, 0x02, 0x0C, 0x30, 0x40, 0x42, 0x42, 0x3E, 0x00, 0x00,
768 0x00, 0x00, 0x00, 0x00, 0x7F, 0x49, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1C, 0x00, 0x00,
769 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x1C, 0x00, 0x00,
770 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x22, 0x22, 0x14, 0x14, 0x14, 0x14, 0x08, 0x08, 0x00, 0x00,
771 0x00, 0x00, 0x00, 0x00, 0x6B, 0x2A, 0x2A, 0x2A, 0x2A, 0x36, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00,
772 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x14, 0x14, 0x08, 0x08, 0x14, 0x14, 0x22, 0x77, 0x00, 0x00,
773 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, 0x08, 0x08, 0x1C, 0x00, 0x00,
774 0x00, 0x00, 0x00, 0x00, 0x7C, 0x22, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x44, 0x7E, 0x00, 0x00,
775 0x00, 0x00, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x00,
776 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x20, 0x40,
777 0x00, 0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1E, 0x00,
778 0x00, 0x00, 0x18, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
779 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F,
780 0x00, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x30, 0x2C, 0x22, 0x32, 0x6C, 0x00, 0x00,
782 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x42, 0x3E, 0x00, 0x00,
783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x02, 0x02, 0x02, 0x44, 0x38, 0x00, 0x00,
784 0x00, 0x00, 0x00, 0x60, 0x40, 0x40, 0x40, 0x7C, 0x42, 0x42, 0x42, 0x42, 0x62, 0xDC, 0x00, 0x00,
785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x7E, 0x02, 0x42, 0x3C, 0x00, 0x00,
786 0x00, 0x00, 0x00, 0x30, 0x48, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00, 0x00,
787 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x22, 0x22, 0x1C, 0x02, 0x3C, 0x42, 0x42, 0x3C,
788 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x42, 0xE7, 0x00, 0x00,
789 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00, 0x00,
790 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x38, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x1E,
791 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x72, 0x12, 0x0A, 0x16, 0x12, 0x22, 0x77, 0x00, 0x00,
792 0x00, 0x00, 0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3E, 0x00, 0x00,
793 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x6B, 0x00, 0x00,
794 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x46, 0x42, 0x42, 0x42, 0x42, 0xE7, 0x00, 0x00,
795 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00,
796 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x46, 0x42, 0x42, 0x42, 0x46, 0x3A, 0x02, 0x07,
797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x62, 0x42, 0x42, 0x42, 0x62, 0x5C, 0x40, 0xE0,
798 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x4C, 0x04, 0x04, 0x04, 0x04, 0x1F, 0x00, 0x00,
799 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x22, 0x02, 0x1C, 0x20, 0x22, 0x1E, 0x00, 0x00,
800 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x08, 0x08, 0x48, 0x30, 0x00, 0x00,
801 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x42, 0x42, 0x42, 0x42, 0x62, 0xDC, 0x00, 0x00,
802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, 0x00, 0x00,
803 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x2A, 0x2A, 0x2A, 0x14, 0x14, 0x14, 0x00, 0x00,
804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x24, 0x18, 0x18, 0x18, 0x24, 0x76, 0x00, 0x00,
805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x42, 0x24, 0x24, 0x18, 0x18, 0x08, 0x08, 0x06,
806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x22, 0x10, 0x08, 0x08, 0x44, 0x7E, 0x00, 0x00,
807 0x00, 0x00, 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x60, 0x00,
808 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
809 0x00, 0x00, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x00,
810 0x00, 0x04, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
811 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
814 #error "ERR: Font size not supported"
994 if ((origin_h < 0) || (origin_h >= Config::FRAME_BUFFER_HEIGHT) || (origin_w < 0) || (origin_w >= Config::FRAME_BUFFER_WIDTH))
996 DRETURN_ARG(
"ERR: out of the sprite table %5d %5d\n", origin_h, origin_w);
1000 if ((background >= (
Color)Config::PALETTE_SIZE) || (foreground >= (
Color)Config::PALETTE_SIZE))
1002 DRETURN_ARG(
"ERR: bad default colors | Back: %3d | Fore: %3d |\n", background, foreground );
1011 bool f_changed =
false;
1031 if (f_changed ==
true)
1034 ret =
this ->
update_sprite( origin_h, origin_w, sprite_tmp );
1064 if ((new_background >= (
Color)Config::PALETTE_SIZE) || (new_foreground >= (
Color)Config::PALETTE_SIZE))
1066 DRETURN_ARG(
"ERR: bad default colors | Back: %3d | Fore: %3d |\n", new_background, new_foreground );
1084 int num_changed_sprites = 0;
1091 if ( (f_background_change ==
false) && (f_foreground_change ==
false))
1096 if ( (f_background_change ==
true) && (f_foreground_change ==
false))
1101 for (uint8_t th = 0;th < Config::FRAME_BUFFER_HEIGHT;th++)
1104 for (uint8_t tw = 0;tw < Config::FRAME_BUFFER_WIDTH;tw++)
1116 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
1125 num_changed_sprites += ret;
1132 else if ( (f_background_change ==
false) && (f_foreground_change ==
true))
1137 for (uint8_t th = 0;th < Config::FRAME_BUFFER_HEIGHT;th++)
1140 for (uint8_t tw = 0;tw < Config::FRAME_BUFFER_WIDTH;tw++)
1152 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
1161 num_changed_sprites += ret;
1171 bool f_changed =
false;
1176 for (uint8_t th = 0;th < Config::FRAME_BUFFER_HEIGHT;th++)
1179 for (uint8_t tw = 0;tw < Config::FRAME_BUFFER_WIDTH;tw++)
1198 if (f_changed ==
true)
1205 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
1214 num_changed_sprites += ret;
1225 return num_changed_sprites;
1250 if ((Config::PEDANTIC_CHECKS ==
true) && (palette_index >= (
Color)Config::PALETTE_SIZE))
1252 DRETURN_ARG(
"ERR: bad palette index | source: %d |\n", palette_index );
1263 if (
this ->
g_palette[ palette_index ] == new_color)
1269 this ->
g_palette[ palette_index ] = new_color;
1279 bool f_sprite_changed;
1280 int num_changed_sprites = 0;
1282 for (uint8_t th = 0;th < Config::FRAME_BUFFER_HEIGHT;th++)
1285 for (uint8_t tw = 0;tw < Config::FRAME_BUFFER_WIDTH;tw++)
1290 f_sprite_changed =
false;
1294 f_sprite_changed =
true;
1299 f_sprite_changed =
true;
1302 if (f_sprite_changed ==
true)
1307 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
1316 num_changed_sprites += ret;
1326 return num_changed_sprites;
1348 DENTER_ARG(
"number_size: %d |align: %d | format: %d\n", number_size, (
int)align, (
int)format );
1353 if (number_size <= 0)
1355 DENTER_ARG(
"ERR: bad number_size: %d\n", number_size );
1395 DENTER_ARG(
"number_size: %d |align: %d | format: %d | ENG exponent: %d\n", number_size, (
int)align, (
int)format, exp );
1400 if (number_size <= 0)
1402 DENTER_ARG(
"ERR: bad number_size: %d\n", number_size );
1406 if ((exp < -6) || (exp > 6))
1408 DENTER_ARG(
"ERR: bad ENG exponent: %d\n", exp );
1498 bool f_continue =
true;
1509 while (f_continue ==
true)
1513 if (status.
phase == Fsm_state::SCAN_SPRITE)
1525 else if (sprite_tmp.
f_update ==
true)
1530 if ((Config::PEDANTIC_CHECKS ==
true) && (
this ->
g_pending_cnt == 0))
1533 this ->
report_error( Screen::Error::PENDING_UNDERFLOW );
1555 status.
phase = Fsm_state::SEND_SPRITE;
1562 DPRINT(
"ERR: Failed to register sprite\n");
1570 if (status.
scan_w < Config::FRAME_BUFFER_WIDTH -1)
1576 else if (status.
scan_h < Config::FRAME_BUFFER_HEIGHT -1)
1592 else if (status.
cnt < Config::SPRITE_SCAN_LIMIT -1)
1596 if (status.
scan_w < Config::FRAME_BUFFER_WIDTH -1)
1602 else if (status.
scan_h < Config::FRAME_BUFFER_HEIGHT -1)
1629 else if (status.
phase == Fsm_state::SEND_SPRITE)
1631 DPRINT(
"Execute display FSM: step: %d\n", status.
cnt);
1644 DPRINT(
"Display FSM IDLE\n");
1648 status.
phase = Fsm_state::SCAN_SPRITE;
1685 DENTER_ARG(
"source: %d | dest: %d |\n", source, dest);
1690 if ((Config::PEDANTIC_CHECKS ==
true) && ((source >= (
Color)Config::PALETTE_SIZE) || (dest >= (
Color)Config::PALETTE_SIZE)) )
1692 DRETURN_ARG(
"ERR: bad colors | source: %d | dest: %d |\n", source, dest );
1704 bool f_sprite_changed;
1706 for (uint8_t th = 0;th < Config::FRAME_BUFFER_HEIGHT;th++)
1709 for (uint8_t tw = 0;tw < Config::FRAME_BUFFER_WIDTH;tw++)
1714 f_sprite_changed =
false;
1720 f_sprite_changed =
true;
1727 f_sprite_changed =
true;
1730 if (f_sprite_changed ==
true)
1768 int num_sprites_updated = 0;
1783 for (th = 0;th < Screen::Config::FRAME_BUFFER_HEIGHT;th++)
1786 for (tw = 0;tw < Screen::Config::FRAME_BUFFER_WIDTH;tw++)
1791 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
1799 num_sprites_updated += ret;
1808 return num_sprites_updated;
1829 if (color_tmp >= (
Color)Screen::Config::PALETTE_SIZE)
1831 DRETURN_ARG(
"ERR: palette index outside the palette\n");
1844 int num_sprites_updated = 0;
1860 for (th = 0;th < Screen::Config::FRAME_BUFFER_HEIGHT;th++)
1863 for (tw = 0;tw < Screen::Config::FRAME_BUFFER_WIDTH;tw++)
1868 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
1876 num_sprites_updated += ret;
1885 return num_sprites_updated;
1906 DENTER_ARG(
"h: %5d, w: %5d, c: %d %d\n", origin_h, origin_w, (
int)background, (
int)foreground);
1912 if ((origin_h < 0) || (origin_h >= Config::FRAME_BUFFER_HEIGHT) || (origin_w < 0) || (origin_w >= Config::FRAME_BUFFER_WIDTH))
1918 if ((background >= (
Color)Config::PALETTE_SIZE) || (foreground >= (
Color)Config::PALETTE_SIZE))
1920 DRETURN_ARG(
"ERR: bad default colors | Back: %3d | Fore: %3d |\n", background, foreground );
1926 DRETURN_ARG(
"ERR: character not on the char table\n");
1950 int ret =
this ->
update_sprite( origin_h, origin_w, sprite_tmp );
1988 return num_changed_sprites;
2018 return num_changed_sprites;
2039 DENTER_ARG(
"h: %5d, w: %5d, c: %p %s\n", origin_h, origin_w, str, str);
2045 if ((origin_h < 0) || (origin_h >= Config::FRAME_BUFFER_HEIGHT) || (origin_w < 0) || (origin_w >= Config::FRAME_BUFFER_WIDTH))
2047 DRETURN_ARG(
"ERR: out of the sprite table %5d %5d\n", origin_h, origin_w);
2051 if ((background >= (
Color)Config::PALETTE_SIZE) || (foreground >= (
Color)Config::PALETTE_SIZE))
2053 DRETURN_ARG(
"ERR: bad default colors | Back: %3d | Fore: %3d |\n", background, foreground );
2078 int num_changed_sprites = 0;
2081 uint8_t tw = origin_w;
2084 while ((str[t] !=
'\0') && (tw < Config::FRAME_BUFFER_WIDTH))
2088 DPRINT(
"t: %5d | tw: %5d | ", t, tw);
2093 DPRINT_NOTAB(
"H: %5d | W: %5d | non printable\n", origin_h, tw );
2100 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2108 num_changed_sprites += ret;
2121 return num_changed_sprites;
2153 return num_changed_sprites;
2184 return num_changed_sprites;
2218 if ((background >= (
Color)Config::PALETTE_SIZE) || (foreground >= (
Color)Config::PALETTE_SIZE))
2220 DRETURN_ARG(
"ERR: bad default colors | Back: %3d | Fore: %3d |\n", background, foreground );
2224 if ((origin_h < 0) || (origin_h >= Config::FRAME_BUFFER_HEIGHT))
2226 DRETURN_ARG(
"ERR: Height out of range: %d\n", origin_h);
2232 uint8_t start_w = ((format_tmp.
align == Format_align::ADJ_LEFT)?(origin_w):(origin_w -format_tmp.
size +1));
2233 uint8_t stop_w = ((format_tmp.
align == Format_align::ADJ_LEFT)?(origin_w +format_tmp.
size -1):(origin_w));
2234 DPRINT(
"start_w: %3d | stop_w: %3d\n", start_w, stop_w );
2236 if ( (stop_w < 0) || (start_w >= Config::FRAME_BUFFER_WIDTH) )
2242 start_w = ((start_w < 0)?(0):(start_w));
2243 stop_w = ((stop_w >= Config::FRAME_BUFFER_WIDTH)?(Config::FRAME_BUFFER_WIDTH -1):(stop_w));
2250 int num_changed_sprites = 0;
2252 char str[User::String::Config::STRING_SIZE_S32];
2258 if (format_tmp.
format == Format_format::NUM)
2265 DRETURN_ARG(
"ERR: Failed to convert NUM number: %d", num);
2277 DRETURN_ARG(
"ERR: Failed to convert ENG number: %d", num);
2300 if (num_digit > format_tmp.
size)
2305 for (t = start_w;t <= stop_w;t++)
2310 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2318 num_changed_sprites += ret;
2321 DRETURN_ARG(
"ERR: Width partially out of range | LEFT | start %d | stop %d |\n", start_w, stop_w );
2322 return num_changed_sprites;
2325 else if ( (format_tmp.
align == Format_align::ADJ_LEFT) && ((origin_w < 0) || ((origin_w +num_digit -1) >= Config::FRAME_BUFFER_WIDTH)) )
2330 for (t = start_w;t <= stop_w;t++)
2335 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2343 num_changed_sprites += ret;
2346 DRETURN_ARG(
"ERR: Width partially out of range | LEFT | start %d | stop %d |\n", start_w, stop_w );
2347 return num_changed_sprites;
2350 else if ( (format_tmp.
align == Format_align::ADJ_RIGHT) && ((origin_w -num_digit +1 < 0) || (origin_w >= Config::FRAME_BUFFER_WIDTH)) )
2355 for (t = start_w;t <= stop_w;t++)
2360 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2368 num_changed_sprites += ret;
2371 DRETURN_ARG(
"ERR: Width partially out of range | RIGHT | start %d | stop %d |\n", start_w, stop_w );
2372 return num_changed_sprites;
2381 if (format_tmp.
align == Format_align::ADJ_LEFT)
2385 for (t = 0;t < num_digit; t++)
2392 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2400 num_changed_sprites += ret;
2407 for (;t <= stop_w; t++)
2412 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2420 num_changed_sprites += ret;
2431 for (t = start_w;t < stop_w -num_digit +1; t++)
2436 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2444 num_changed_sprites += ret;
2450 for (t = 0;t < num_digit; t++)
2455 ret =
this ->
update_sprite( origin_h, start_w +t, sprite_tmp );
2457 if ((Config::PEDANTIC_CHECKS ==
true) && (ret < 0))
2465 num_changed_sprites += ret;
2474 return num_changed_sprites;
2498 DRETURN_ARG(
"Success: %d\n", num_changed_sprites );
2499 return num_changed_sprites;
2538 DENTER_ARG(
"H: %d, W: %d, color index: %d\n", origin_h, origin_w, (
int)
color );
2550 if ((origin_h < 0) || (origin_h >= Config::FRAME_BUFFER_HEIGHT))
2552 DRETURN_ARG(
"ERR: Height out of range: %d\n", origin_h);
2556 if ((origin_w < 0) || (origin_w >= Config::FRAME_BUFFER_WIDTH))
2558 DRETURN_ARG(
"ERR: Height out of range: %d\n", origin_w);
2579 int ret =
this ->
update_sprite( origin_h, origin_w, sprite_tmp );
2609 int num_changed_sprites;
2613 num_changed_sprites =
print( origin_h, origin_w,
"OK", Color::GREEN );
2618 num_changed_sprites =
print( origin_h, origin_w,
"ERR", Color::RED );
2619 this ->
set_format(2, Format_align::ADJ_LEFT, Format_format::NUM );
2620 num_changed_sprites +=
print( origin_h, origin_w +3, (
int)
this ->
g_error_code, Color::RED );
2627 return num_changed_sprites;
2658 this ->
set_format( Screen::Config::FRAME_BUFFER_WIDTH, Format_align::ADJ_LEFT, Format_format::NUM, 0 );
2701 for (th = 0;th < Screen::Config::FRAME_BUFFER_HEIGHT;th++)
2704 for (tw = 0;tw < Screen::Config::FRAME_BUFFER_WIDTH;tw++)
2783 this -> show_palette();
2846 if ((Config::PEDANTIC_CHECKS ==
true) && (error_code >= Screen::Error::NUM_ERROR_CODES))
2883 return ((c >= Config::ASCII_START) && (c <= Config::ASCII_STOP));
2901 if (sprite < Config::NUM_SPECIAL_SPRITES)
2904 if (sprite == Config::SPRITE_BACKGROUND)
2945 if (sprite < Config::NUM_SPECIAL_SPRITES)
2948 if (sprite == Config::SPRITE_FOREGROUND)
2998 bool f_special_a = (sprite_a.
sprite_index < Config::NUM_SPECIAL_SPRITES);
3000 bool f_special_b = (sprite_b.
sprite_index < Config::NUM_SPECIAL_SPRITES);
3007 if ((f_special_a ==
true) && (f_special_b ==
true))
3019 else if (sprite_a.
sprite_index == Config::SPRITE_BACKGROUND)
3035 else if (sprite_a.
sprite_index == Config::SPRITE_FOREGROUND)
3067 else if ((f_ascii_a ==
true) && (f_ascii_b ==
true))
3116 DENTER_ARG(
"index_h : %5d | index_w %5d\n", index_h, index_w);
3122 uint16_t foreground_color, background_color;
3133 if ((Config::PEDANTIC_CHECKS ==
true) && ((index_w >= Config::FRAME_BUFFER_WIDTH) || (index_h >= Config::FRAME_BUFFER_HEIGHT)) )
3149 DPRINT(
"sprite: %d | background color: %6x | foreground_color: %6x |\n", sprite_tmp.
sprite_index, background_color, foreground_color );
3151 const uint8_t *sprite_ptr =
nullptr;
3154 if (sprite_tmp.
sprite_index < Config::NUM_SPECIAL_SPRITES)
3159 f_solid_color =
true;
3163 else if (sprite_tmp.
sprite_index == Config::SPRITE_WHITE)
3165 f_solid_color =
true;
3169 else if (sprite_tmp.
sprite_index == Config::SPRITE_BACKGROUND)
3171 f_solid_color =
true;
3172 color = background_color;
3175 else if (sprite_tmp.
sprite_index == Config::SPRITE_FOREGROUND)
3177 f_solid_color =
true;
3178 color = foreground_color;
3181 else if (sprite_tmp.
sprite_index == Config::SPRITE_TRANSPARENT)
3199 if (background_color != foreground_color)
3202 f_solid_color =
false;
3210 f_solid_color =
true;
3211 color = background_color;
3230 if (f_solid_color ==
false)
3235 uint32_t sprite_width_slice;
3236 DPRINT(
"sprite table index: %c %5d | width slice | ", sprite_index, sprite_index-
' ' );
3238 for (th = 0;th < Config::SPRITE_HEIGHT;th++)
3241 sprite_width_slice = sprite_ptr[ th ];
3244 for (tw = 0;tw < Config::SPRITE_WIDTH;tw++)
3247 color = ((sprite_width_slice & 0x01) == 0x00)?(background_color):(foreground_color);
3249 sprite_width_slice = sprite_width_slice >> 1;
3276 ret =
this ->
Display::register_sprite( index_h *Config::SPRITE_HEIGHT, index_w *Config::SPRITE_WIDTH, Config::SPRITE_HEIGHT, Config::SPRITE_WIDTH,
color );
3316 DENTER_ARG(
"H: %d | W: %d |\n", index_h, index_w );
3322 if ((Config::PEDANTIC_CHECKS ==
true) && ((index_h >= Config::FRAME_BUFFER_HEIGHT) || (index_w >= Config::FRAME_BUFFER_WIDTH)) )
3324 DRETURN_ARG(
"ERR: bad index H: %d | W: %d |\n", index_h, index_w);
3332 int8_t num_updated_sprites;
3339 num_updated_sprites = 0;
3348 if ((Config::PEDANTIC_CHECKS ==
true) && (
this ->
g_pending_cnt >= Config::FRAME_BUFFER_SIZE))
3350 this ->
report_error( Screen::Error::PENDING_OVERFLOW );
3374 num_updated_sprites = 1;
3381 return num_updated_sprites;
3391 #warning "Multiple inclusion of hader file"