343 }
else if (
id_ == 0x05) {
346 }
else if (
id_ == 0x06) {
349 }
else if (
id_ == 0x09) {
353 }
else if (
id_ == 0x14) {
385 }
else if (
id_ == 0x01) {
388 }
else if (
id_ == 0x02) {
390 }
else if (
id_ == 0x04) {
395 }
else if (
id_ == 0x05) {
400 }
else if (
id_ == 0x06) {
405 }
else if (
id_ == 0x07) {
410 }
else if (
id_ == 0x08) {
413 }
else if (
id_ == 0x09) {
427 }
else if (
id_ == 0x0A) {
430 }
else if (
id_ == 0x0B) {
432 }
else if (
id_ == 0x0C) {
435 }
else if (
id_ == 0x0D) {
437 }
else if (
id_ == 0x0E) {
439 }
else if (
id_ == 0x0F) {
442 }
else if (
id_ == 0x10) {
444 }
else if (
id_ == 0x11) {
453 }
else if (
id_ == 0x12) {
456 }
else if (
id_ == 0x13) {
458 }
else if (
id_ == 0x15) {
466 }
else if (
id_ == 0x16) {
469 }
else if (
id_ == 0x17)
472 }
else if (
id_ == 0x18)
482 }
else if (
id_ == 0x19)
485 }
else if (
id_ == 0x1A)
490 }
else if (
id_ == 0x1C)
495 }
else if (
id_ == 0x1E)
498 }
else if (
id_ == 0x1F)
506 }
else if (
id_ == 0x20) {
508 }
else if (
id_ == 0x21)
513 }
else if (
id_ == 0x22)
516 }
else if (
id_ == 0x23)
520 }
else if (
id_ == 0x24)
524 }
else if (
id_ == 0x25)
527 }
else if (
id_ == 0x26)
529 if ((
x & 0x01) == 0x00) {
536 }
else if (
id_ == 0x27)
539 }
else if (
id_ == 0x28)
542 }
else if (
id_ == 0x29)
545 }
else if (
id_ == 0x2A)
548 }
else if (
id_ == 0x2B)
551 }
else if (
id_ == 0x2C)
573 }
else if (
id_ == 0x2D)
576 }
else if (
id_ == 0x2E)
579 }
else if (
id_ == 0x2F)
582 }
else if (
id_ == 0x30)
585 }
else if (
id_ == 0x31)
588 }
else if (
id_ == 0x32)
598 else if (
id_ == 0x34)
601 }
else if (
id_ == 0x35)
604 }
else if (
id_ == 0x36)
614 else if (
id_ == 0x38)
617 }
else if (
id_ == 0x39)
620 }
else if (
id_ == 0x3A)
623 }
else if (
id_ == 0x3B)
625 }
else if (
id_ == 0x3C)
628 }
else if (
id_ == 0x3D)
631 }
else if (
id_ == 0x3E)
634 }
else if (
id_ == 0x3F)
637 }
else if (
id_ == 0x40)
644 }
else if (
id_ == 0x41)
653 }
else if (
id_ == 0x42)
662 }
else if (
id_ == 0x43)
671 }
else if (
id_ == 0x44)
678 }
else if (
id_ == 0x45)
687 }
else if (
id_ == 0x46)
696 }
else if (
id_ == 0x47)
704 }
else if (
id_ == 0x48)
711 }
else if (
id_ == 0x49)
719 }
else if (
id_ == 0x4A)
725 }
else if (
id_ == 0x4B)
730 }
else if (
id_ == 0x4C)
733 }
else if (
id_ == 0x4D)
736 }
else if (
id_ == 0x4E)
739 }
else if (
id_ == 0x4F)
742 }
else if (
id_ == 0x50)
745 }
else if (
id_ == 0x51)
748 }
else if (
id_ == 0x53)
751 }
else if (
id_ == 0x54) {
755 }
else if (
id_ == 0x55)
758 }
else if (
id_ == 0x56)
762 }
else if (
id_ == 0x57)
766 }
else if (
id_ == 0x58)
770 }
else if (
id_ == 0x5B)
773 }
else if (
id_ == 0x5C)
776 }
else if (
id_ == 0x5D)
779 if (((
y * 16) & 0x10) == 0x10) {
782 for (
int i = 0; i < 7; i++) {
794 }
else if (
id_ == 0x5E)
797 if (((
y * 16) & 0x10) == 0x10) {
800 for (
int i = 0; i < 7; i++) {
811 }
else if (
id_ == 0x5F)
813 if (((
x * 16) & 0x10) == 0x10) {
819 for (
int i = 0; i < 7; i++) {
826 }
else if (
id_ == 0x60)
829 if (((
x * 16) & 0x10) == 0x10) {
835 for (
int i = 0; i < 7; i++) {
843 }
else if (
id_ == 0x61)
847 }
else if (
id_ == 0x63)
854 }
else if (
id_ == 0x64)
861 }
else if (
id_ == 0x66)
864 }
else if (
id_ == 0x67)
867 }
else if (
id_ == 0x68)
870 }
else if (
id_ == 0x69)
873 }
else if (
id_ == 0x6A)
879 }
else if (
id_ == 0x6B)
885 }
else if (
id_ == 0x6C)
888 }
else if (
id_ == 0x6D)
891 }
else if (
id_ == 0x6E)
894 }
else if (
id_ == 0x6F) {
896 }
else if (
id_ == 0x70)
899 }
else if (
id_ == 0x71)
902 }
else if (
id_ == 0x73)
904 }
else if (
id_ == 0x79)
907 }
else if (
id_ == 0x7C)
910 }
else if (
id_ == 0x7D)
916 }
else if (
id_ == 0x7E)
922 }
else if (
id_ == 0x7F)
928 }
else if (
id_ == 0x80)
935 }
else if (
id_ == 0x81)
938 }
else if (
id_ == 0x82)
945 DrawSpriteTile((
x * 16 + 14) - 4, (
y * 16 + 8) - 16, 3, 30, 5,
false,
false,
947 DrawSpriteTile((
x * 16 + 8) - 4, (
y * 16 + 14) - 16, 3, 30, 5,
false,
false,
956 DrawSpriteTile((
x * 16 + 14) - 16, (
y * 16 + 8) - 4, 3, 30, 5,
false,
false,
958 DrawSpriteTile((
x * 16 + 8) - 16, (
y * 16 + 14) - 4, 3, 30, 5,
false,
false,
984 }
else if (
id_ == 0x83)
988 }
else if (
id_ == 0x84)
992 }
else if (
id_ == 0x85)
996 }
else if (
id_ == 0x86)
999 }
else if (
id_ == 0x88)
1003 }
else if (
id_ == 0x8A)
1006 }
else if (
id_ == 0x8B)
1010 }
else if (
id_ == 0x8C)
1014 }
else if (
id_ == 0x8D)
1017 }
else if (
id_ == 0x8E)
1025 }
else if (
id_ == 0x90)
1029 DrawSpriteTile((
x * 16) + 16, (
y * 16) + 8, 9, 26, 12,
false,
false, 1, 2);
1031 DrawSpriteTile((
x * 16) + 8, (
y * 16) + 16, 8, 27, 12,
false,
false, 1, 1);
1032 }
else if (
id_ == 0x91)
1034 DrawSpriteTile((
x * 16) - 2, (
y * 16) + 12, 4, 22, 12,
false,
false, 1, 2);
1035 DrawSpriteTile((
x * 16) + 10, (
y * 16) + 12, 4, 22, 12,
true,
false, 1, 2);
1037 DrawSpriteTile((
x * 16) + 12, (
y * 16) + 4, 3, 22, 12,
false,
false, 1, 2);
1039 }
else if (
id_ == 0x92)
1051 }
else if (
id_ == 0x93)
1057 }
else if (
id_ == 0x95)
1061 }
else if (
id_ == 0x96)
1065 }
else if (
id_ == 0x97)
1069 }
else if (
id_ == 0x98)
1073 }
else if (
id_ == 0x99) {
1076 }
else if (
id_ == 0x9A)
1079 }
else if (
id_ == 0x9B)
1083 }
else if (
id_ == 0x9C)
1087 }
else if (
id_ == 0x9D)
1091 }
else if (
id_ == 0xA1) {
1094 }
else if (
id_ == 0xA2) {
1096 }
else if (
id_ == 0xA5) {
1099 }
else if (
id_ == 0xA6) {
1102 }
else if (
id_ == 0xA7) {
1105 }
else if (
id_ == 0xAC) {
1107 }
else if (
id_ == 0xAD) {
1110 }
else if (
id_ == 0xBA) {
1112 }
else if (
id_ == 0xC1 ||
id_ == 0x7A) {
1114 DrawSpriteTile((
x * 16) + 16, (
y * 16) - 16, 2, 24, 12,
true,
false, 2, 4);
1115 }
else if (
id_ == 0xC3) {
1117 }
else if (
id_ == 0xC4) {
1120 }
else if (
id_ == 0xC5) {
1121 }
else if (
id_ == 0xC6) {
1122 DrawSpriteTile((
x * 16) + 4, (
y * 16) + 14, 3, 30, 14,
false,
false, 1, 1);
1123 DrawSpriteTile((
x * 16) + 14, (
y * 16) + 4, 3, 30, 14,
false,
false, 1, 1);
1127 }
else if (
id_ == 0xC7) {
1132 }
else if (
id_ == 0xC8) {
1135 }
else if (
id_ == 0xC9) {
1138 }
else if (
id_ == 0xCA) {
1140 }
else if (
id_ == 0xD0) {
1143 }
else if (
id_ == 0xD1) {
1151 }
else if (
id_ == 0xD4) {
1154 }
else if (
id_ == 0xE3)
1157 }
else if (
id_ == 0xE4)
1160 }
else if (
id_ == 0xE7)
1163 }
else if (
id_ == 0xE8)
1167 }
else if (
id_ == 0xEB) {
1169 }
else if (
id_ == 0xF2) {
1171 DrawSpriteTile((
x * 16) + 16, (
y * 16) - 16, 12, 24, 2,
true,
false, 2, 4);
1172 }
else if (
id_ == 0xF4) {
1185 bool mirror_x,
bool mirror_y,
int sizex,
1197 if (sizex <= 0 || sizey <= 0) {
1201 if (srcx < 0 || srcy < 0 || pal < 0) {
1207 int drawid_ = (srcx + (srcy * 16)) + 512;
1210 if (drawid_ < 0 || drawid_ > 4096) {
1214 for (
auto yl = 0; yl < sizey * 8; yl++) {
1215 for (
auto xl = 0; xl < (sizex * 8) / 2; xl++) {
1220 mx = (((sizex * 8) / 2) - 1) - xl;
1223 my = ((sizey * 8) - 1) - yl;
1229 int tx = ((drawid_ / 0x10) * 0x400) +
1230 ((drawid_ - ((drawid_ / 0x10) * 0x10)) * 8);
1233 int gfx_index = tx + (yl * 0x80) + xl;
1234 if (gfx_index < 0 || gfx_index >=
static_cast<int>(
current_gfx_.size())) {
1241 int index = (
x) + (
y * 64) + (mx + (my * 0x80));
1244 if (index >= 0 && index <
static_cast<int>(
preview_gfx_.size()) &&
1246 preview_gfx_[index] = (uint8_t)((pixel & 0x0F) + 112 + (pal * 8));
void DrawSpriteTile(int x, int y, int srcx, int srcy, int pal, bool mirror_x=false, bool mirror_y=false, int sizex=2, int sizey=2)