comparison tools/lib64fmts.c @ 2599:c3c1d3c75f53

s/DM_PROBE_SCORE_false/DM_PROBE_SCORE_FALSE/g
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 19 Nov 2023 18:33:52 +0200
parents 353192a5100a
children 8b99ddcc9fde
comparison
equal deleted inserted replaced
2598:bf43bf9d6556 2599:c3c1d3c75f53
17 { 17 {
18 if (buf->len == fmt->size && 18 if (buf->len == fmt->size &&
19 dmCompareAddr16(buf, 0, fmt->addr)) 19 dmCompareAddr16(buf, 0, fmt->addr))
20 return DM_PROBE_SCORE_MAX; 20 return DM_PROBE_SCORE_MAX;
21 21
22 return DM_PROBE_SCORE_false; 22 return DM_PROBE_SCORE_FALSE;
23 } 23 }
24 24
25 25
26 // XXX TODO: Research what these values actually mean. It would seem probable 26 // XXX TODO: Research what these values actually mean. It would seem probable
27 // that these may not be static values at all, as there are 8 more that change 27 // that these may not be static values at all, as there are 8 more that change
43 && 43 &&
44 DM_MEMCMP_SIZE(buf->data + 9, fmtMicroIllustrator_MagicID_2) == 0 44 DM_MEMCMP_SIZE(buf->data + 9, fmtMicroIllustrator_MagicID_2) == 0
45 ) 45 )
46 return DM_PROBE_SCORE_MAX; 46 return DM_PROBE_SCORE_MAX;
47 47
48 return DM_PROBE_SCORE_false; 48 return DM_PROBE_SCORE_FALSE;
49 } 49 }
50 50
51 51
52 static int fmtEncodeMicroIllustrator(const DMC64EncDecOp *op, DMGrowBuf *buf, 52 static int fmtEncodeMicroIllustrator(const DMC64EncDecOp *op, DMGrowBuf *buf,
53 const DMC64Image *img, const DMC64ImageCommonFormat *fmt) 53 const DMC64Image *img, const DMC64ImageCommonFormat *fmt)
76 { 76 {
77 if (buf->data[3] == fmt->extra) 77 if (buf->data[3] == fmt->extra)
78 return DM_PROBE_SCORE_MAX; 78 return DM_PROBE_SCORE_MAX;
79 } 79 }
80 80
81 return DM_PROBE_SCORE_false; 81 return DM_PROBE_SCORE_FALSE;
82 } 82 }
83 83
84 84
85 typedef struct 85 typedef struct
86 { 86 {
412 DM_MEMCMP_SIZE(buf->data + sizeof(fmtMarqPETSCII_ID1) + 412 DM_MEMCMP_SIZE(buf->data + sizeof(fmtMarqPETSCII_ID1) +
413 sizeof(fmtMarqPETSCII_ID2), fmtMarqPETSCII_ID3) == 0 413 sizeof(fmtMarqPETSCII_ID2), fmtMarqPETSCII_ID3) == 0
414 ) 414 )
415 return DM_PROBE_SCORE_MAX; 415 return DM_PROBE_SCORE_MAX;
416 416
417 return DM_PROBE_SCORE_false; 417 return DM_PROBE_SCORE_FALSE;
418 } 418 }
419 419
420 420
421 static int fmtDecodeHiresPETSCIICharsetData(const DMC64EncDecOp *op, DMC64Image *img, 421 static int fmtDecodeHiresPETSCIICharsetData(const DMC64EncDecOp *op, DMC64Image *img,
422 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt) 422 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
496 DM_MEMCMP_SIZE(buf->data, fmtPetsciiKrisszHu_ID1) == 0 && 496 DM_MEMCMP_SIZE(buf->data, fmtPetsciiKrisszHu_ID1) == 0 &&
497 DM_MEMCMP_SIZE(buf->data + 0x10, fmtPetsciiKrisszHu_ID2) == 0 497 DM_MEMCMP_SIZE(buf->data + 0x10, fmtPetsciiKrisszHu_ID2) == 0
498 ) 498 )
499 return DM_PROBE_SCORE_MAX; 499 return DM_PROBE_SCORE_MAX;
500 500
501 return DM_PROBE_SCORE_false; 501 return DM_PROBE_SCORE_FALSE;
502 } 502 }
503 503
504 504
505 static int fmtDecodePetsciiKrisszHuData(const DMC64EncDecOp *op, DMC64Image *img, 505 static int fmtDecodePetsciiKrisszHuData(const DMC64EncDecOp *op, DMC64Image *img,
506 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt) 506 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
587 if (buf->len == 2115 && 587 if (buf->len == 2115 &&
588 DM_MEMCMP_SIZE(buf->data, fmtCocaPETSCII_ID1) == 0 && 588 DM_MEMCMP_SIZE(buf->data, fmtCocaPETSCII_ID1) == 0 &&
589 buf->data[0x0c44 - 0x0801 + 2] == 0x14) 589 buf->data[0x0c44 - 0x0801 + 2] == 0x14)
590 return DM_PROBE_SCORE_MAX; 590 return DM_PROBE_SCORE_MAX;
591 591
592 return DM_PROBE_SCORE_false; 592 return DM_PROBE_SCORE_FALSE;
593 } 593 }
594 594
595 595
596 static int fmtEncodeCocaPETSCIIData(const DMC64EncDecOp *op, DMGrowBuf *buf, 596 static int fmtEncodeCocaPETSCIIData(const DMC64EncDecOp *op, DMGrowBuf *buf,
597 const DMC64Image *img, const DMC64ImageCommonFormat *fmt) 597 const DMC64Image *img, const DMC64ImageCommonFormat *fmt)
603 } 603 }
604 604
605 605
606 static int fmtProbeKoalaPainter(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 606 static int fmtProbeKoalaPainter(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
607 { 607 {
608 int score = DM_PROBE_SCORE_false; 608 int score = DM_PROBE_SCORE_FALSE;
609 609
610 if (buf->len >= 10002 && 610 if (buf->len >= 10002 &&
611 buf->len <= 10004) 611 buf->len <= 10004)
612 score += DM_PROBE_SCORE_MAYBE; 612 score += DM_PROBE_SCORE_MAYBE;
613 613
624 if (buf->len > 30 && 624 if (buf->len > 30 &&
625 buf->len < 10002 && 625 buf->len < 10002 &&
626 dmCompareAddr16(buf, 0, fmt->addr)) 626 dmCompareAddr16(buf, 0, fmt->addr))
627 return DM_PROBE_SCORE_GOOD; 627 return DM_PROBE_SCORE_GOOD;
628 628
629 return DM_PROBE_SCORE_false; 629 return DM_PROBE_SCORE_FALSE;
630 } 630 }
631 631
632 632
633 static int fmtProbeDoodle(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 633 static int fmtProbeDoodle(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
634 { 634 {
643 // Unpacked variant 643 // Unpacked variant
644 if (fmt->extra != 0xfe && buf->len == fmt->size) 644 if (fmt->extra != 0xfe && buf->len == fmt->size)
645 return DM_PROBE_SCORE_MAX; 645 return DM_PROBE_SCORE_MAX;
646 } 646 }
647 647
648 return DM_PROBE_SCORE_false; 648 return DM_PROBE_SCORE_FALSE;
649 } 649 }
650 650
651 651
652 static int fmtProbeArtStudio(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 652 static int fmtProbeArtStudio(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
653 { 653 {
654 if ((buf->len == fmt->size || buf->len == 9002) && 654 if ((buf->len == fmt->size || buf->len == 9002) &&
655 dmCompareAddr16(buf, 0, 0x2000)) 655 dmCompareAddr16(buf, 0, 0x2000))
656 return DM_PROBE_SCORE_MAX; 656 return DM_PROBE_SCORE_MAX;
657 657
658 return DM_PROBE_SCORE_false; 658 return DM_PROBE_SCORE_FALSE;
659 } 659 }
660 660
661 661
662 static int fmtDecodeStaticRLEMarkerMode2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 662 static int fmtDecodeStaticRLEMarkerMode2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
663 { 663 {
716 (ident[10] == '1' && ident[12] == '4') || 716 (ident[10] == '1' && ident[12] == '4') ||
717 (ident[10] == '2' && ident[12] == '0') 717 (ident[10] == '2' && ident[12] == '0')
718 )) 718 ))
719 return DM_PROBE_SCORE_MAX; 719 return DM_PROBE_SCORE_MAX;
720 720
721 return DM_PROBE_SCORE_false; 721 return DM_PROBE_SCORE_FALSE;
722 } 722 }
723 723
724 724
725 static int fmtDecodeDrazPaintPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 725 static int fmtDecodeDrazPaintPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
726 { 726 {
788 if (buf->len > 22 && 788 if (buf->len > 22 &&
789 dmCompareAddr16(buf, 0, fmt->addr) && 789 dmCompareAddr16(buf, 0, fmt->addr) &&
790 DM_MEMCMP_LEN(buf->data + 2, "DRAZLACE! 1.0") == 0) 790 DM_MEMCMP_LEN(buf->data + 2, "DRAZLACE! 1.0") == 0)
791 return DM_PROBE_SCORE_MAX; 791 return DM_PROBE_SCORE_MAX;
792 792
793 return DM_PROBE_SCORE_false; 793 return DM_PROBE_SCORE_FALSE;
794 } 794 }
795 795
796 796
797 static int fmtDrazLaceGetLaceType(const DMC64EncDecOp *op, DMC64Image *img, 797 static int fmtDrazLaceGetLaceType(const DMC64EncDecOp *op, DMC64Image *img,
798 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt) 798 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
833 if (buf->len > 20 && 833 if (buf->len > 20 &&
834 dmCompareAddr16(buf, 0, fmt->addr) && 834 dmCompareAddr16(buf, 0, fmt->addr) &&
835 DM_MEMCMP_LEN(buf->data + 2, fmtBDP5_MagicID) == 0) 835 DM_MEMCMP_LEN(buf->data + 2, fmtBDP5_MagicID) == 0)
836 return DM_PROBE_SCORE_MAX; 836 return DM_PROBE_SCORE_MAX;
837 837
838 return DM_PROBE_SCORE_false; 838 return DM_PROBE_SCORE_FALSE;
839 } 839 }
840 840
841 841
842 static int fmtDecodeBDP5Packed(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 842 static int fmtDecodeBDP5Packed(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
843 { 843 {
920 if (buf->len > fmtGunPaint_MagicOffs + fmtGunPaint_MagicLen && 920 if (buf->len > fmtGunPaint_MagicOffs + fmtGunPaint_MagicLen &&
921 dmCompareAddr16(buf, 0, fmt->addr) && 921 dmCompareAddr16(buf, 0, fmt->addr) &&
922 memcmp(buf->data + fmtGunPaint_MagicOffs + 2, fmtGunPaint_MagicID, fmtGunPaint_MagicLen) == 0) 922 memcmp(buf->data + fmtGunPaint_MagicOffs + 2, fmtGunPaint_MagicID, fmtGunPaint_MagicLen) == 0)
923 return DM_PROBE_SCORE_MAX; 923 return DM_PROBE_SCORE_MAX;
924 924
925 return DM_PROBE_SCORE_false; 925 return DM_PROBE_SCORE_FALSE;
926 } 926 }
927 927
928 928
929 static int fmtEncodeGunPaint(const DMC64EncDecOp *op, DMGrowBuf *buf, 929 static int fmtEncodeGunPaint(const DMC64EncDecOp *op, DMGrowBuf *buf,
930 const DMC64Image *img, const DMC64ImageCommonFormat *fmt) 930 const DMC64Image *img, const DMC64ImageCommonFormat *fmt)
944 static int fmtProbeAmicaPaintPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 944 static int fmtProbeAmicaPaintPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
945 { 945 {
946 size_t i, n; 946 size_t i, n;
947 947
948 if (buf->len < 256 || !dmCompareAddr16(buf, 0, fmt->addr)) 948 if (buf->len < 256 || !dmCompareAddr16(buf, 0, fmt->addr))
949 return DM_PROBE_SCORE_false; 949 return DM_PROBE_SCORE_FALSE;
950 950
951 // Interpaint Hi-Res gives a false positive 951 // Interpaint Hi-Res gives a false positive
952 // as do some GunPaint images .. 952 // as do some GunPaint images ..
953 if (buf->len == 9002 || 953 if (buf->len == 9002 ||
954 fmtProbeGunPaint(buf, fmt) > DM_PROBE_SCORE_GOOD) 954 fmtProbeGunPaint(buf, fmt) > DM_PROBE_SCORE_GOOD)
955 return DM_PROBE_SCORE_false; 955 return DM_PROBE_SCORE_FALSE;
956 956
957 for (n = 0, i = 2; i < buf->len; i++) 957 for (n = 0, i = 2; i < buf->len; i++)
958 if (buf->data[i] == 0xC2) n++; 958 if (buf->data[i] == 0xC2) n++;
959 959
960 if (n > 50) 960 if (n > 50)
962 if (n > 25) 962 if (n > 25)
963 return DM_PROBE_SCORE_AVG; 963 return DM_PROBE_SCORE_AVG;
964 if (n > 10) 964 if (n > 10)
965 return DM_PROBE_SCORE_MAYBE; 965 return DM_PROBE_SCORE_MAYBE;
966 966
967 return DM_PROBE_SCORE_false; 967 return DM_PROBE_SCORE_FALSE;
968 } 968 }
969 969
970 970
971 static int fmtDecodeAmicaPaintPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 971 static int fmtDecodeAmicaPaintPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
972 { 972 {
1030 { 1030 {
1031 if ((buf->len == 10219 || buf->len == 10220) && 1031 if ((buf->len == 10219 || buf->len == 10220) &&
1032 dmCompareAddr16(buf, 0, fmt->addr)) 1032 dmCompareAddr16(buf, 0, fmt->addr))
1033 return DM_PROBE_SCORE_GOOD; 1033 return DM_PROBE_SCORE_GOOD;
1034 1034
1035 return DM_PROBE_SCORE_false; 1035 return DM_PROBE_SCORE_FALSE;
1036 } 1036 }
1037 1037
1038 1038
1039 static int fmtGetPixelFLIDesigner(DMC64ScanLine *scan, 1039 static int fmtGetPixelFLIDesigner(DMC64ScanLine *scan,
1040 const DMC64Image *img, const int rasterX, const int rasterY) 1040 const DMC64Image *img, const int rasterX, const int rasterY)
1054 dmCompareAddr16(buf, 0, fmt->addr) && 1054 dmCompareAddr16(buf, 0, fmt->addr) &&
1055 dmCompareAddr16(buf, 2 + 1, fmt->addr + buf->len - 3) && 1055 dmCompareAddr16(buf, 2 + 1, fmt->addr + buf->len - 3) &&
1056 dmCompareAddr16(buf, 2 + 3, 0x7f3f)) 1056 dmCompareAddr16(buf, 2 + 3, 0x7f3f))
1057 return DM_PROBE_SCORE_MAX; 1057 return DM_PROBE_SCORE_MAX;
1058 1058
1059 return DM_PROBE_SCORE_false; 1059 return DM_PROBE_SCORE_FALSE;
1060 } 1060 }
1061 1061
1062 1062
1063 static int fmtDecodeBlackMailFLIPacked(DMC64Image *img, const DMGrowBuf *psrc, const DMC64ImageFormat *fmt) 1063 static int fmtDecodeBlackMailFLIPacked(DMC64Image *img, const DMGrowBuf *psrc, const DMC64ImageFormat *fmt)
1064 { 1064 {
1174 if (buf->len >= 320 && 1174 if (buf->len >= 320 &&
1175 dmCompareAddr16(buf, 0, fmt->addr) && 1175 dmCompareAddr16(buf, 0, fmt->addr) &&
1176 DM_MEMCMP_SIZE(buf->data + 2, magicID) == 0) 1176 DM_MEMCMP_SIZE(buf->data + 2, magicID) == 0)
1177 return DM_PROBE_SCORE_MAX; 1177 return DM_PROBE_SCORE_MAX;
1178 1178
1179 return DM_PROBE_SCORE_false; 1179 return DM_PROBE_SCORE_FALSE;
1180 } 1180 }
1181 1181
1182 1182
1183 // 1183 //
1184 // Based on disassembly of the depacker routine. Encoding seems to be 1184 // Based on disassembly of the depacker routine. Encoding seems to be
1388 if (buf->len >= XX2_MIN_SIZE && 1388 if (buf->len >= XX2_MIN_SIZE &&
1389 buf->len <= XX2_MIN_SIZE + 8 && 1389 buf->len <= XX2_MIN_SIZE + 8 &&
1390 dmCompareAddr16(buf, 0, fmt->addr)) 1390 dmCompareAddr16(buf, 0, fmt->addr))
1391 return DM_PROBE_SCORE_MAYBE; 1391 return DM_PROBE_SCORE_MAYBE;
1392 1392
1393 return DM_PROBE_SCORE_false; 1393 return DM_PROBE_SCORE_FALSE;
1394 } 1394 }
1395 1395
1396 1396
1397 static int fmtDecodeFormatXX2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 1397 static int fmtDecodeFormatXX2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
1398 { 1398 {
1425 if (buf->len == fmt->size && 1425 if (buf->len == fmt->size &&
1426 DM_MEMCMP_SIZE(buf->data, fmtFormatXX3_MagicID_1) == 0 1426 DM_MEMCMP_SIZE(buf->data, fmtFormatXX3_MagicID_1) == 0
1427 ) 1427 )
1428 return DM_PROBE_SCORE_MAX; 1428 return DM_PROBE_SCORE_MAX;
1429 1429
1430 return DM_PROBE_SCORE_false; 1430 return DM_PROBE_SCORE_FALSE;
1431 } 1431 }
1432 1432
1433 1433
1434 static const Uint8 fmtFormatXX4_MagicID_1[] = 1434 static const Uint8 fmtFormatXX4_MagicID_1[] =
1435 { 1435 {
1442 if (buf->len >= fmt->size && 1442 if (buf->len >= fmt->size &&
1443 DM_MEMCMP_SIZE(buf->data, fmtFormatXX4_MagicID_1) == 0 1443 DM_MEMCMP_SIZE(buf->data, fmtFormatXX4_MagicID_1) == 0
1444 ) 1444 )
1445 return DM_PROBE_SCORE_MAX; 1445 return DM_PROBE_SCORE_MAX;
1446 1446
1447 return DM_PROBE_SCORE_false; 1447 return DM_PROBE_SCORE_FALSE;
1448 } 1448 }
1449 1449
1450 1450
1451 static const Uint8 fmtFormatXX5_MagicID_1[] = 1451 static const Uint8 fmtFormatXX5_MagicID_1[] =
1452 { 1452 {
1459 if (buf->len >= fmt->size && 1459 if (buf->len >= fmt->size &&
1460 DM_MEMCMP_SIZE(buf->data, fmtFormatXX5_MagicID_1) == 0 1460 DM_MEMCMP_SIZE(buf->data, fmtFormatXX5_MagicID_1) == 0
1461 ) 1461 )
1462 return DM_PROBE_SCORE_MAX; 1462 return DM_PROBE_SCORE_MAX;
1463 1463
1464 return DM_PROBE_SCORE_false; 1464 return DM_PROBE_SCORE_FALSE;
1465 } 1465 }
1466 1466
1467 1467
1468 static int fmtGetPixelXX5(DMC64ScanLine *scan, 1468 static int fmtGetPixelXX5(DMC64ScanLine *scan,
1469 const DMC64Image *img, const int rasterX, const int rasterY) 1469 const DMC64Image *img, const int rasterX, const int rasterY)
1498 DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX6_MagicID_1) == 0 && 1498 DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX6_MagicID_1) == 0 &&
1499 DM_MEMCMP_SIZE(buf->data + 0x0800, fmtFormatXX6_MagicID_2) == 0 1499 DM_MEMCMP_SIZE(buf->data + 0x0800, fmtFormatXX6_MagicID_2) == 0
1500 ) 1500 )
1501 return DM_PROBE_SCORE_MAX; 1501 return DM_PROBE_SCORE_MAX;
1502 1502
1503 return DM_PROBE_SCORE_false; 1503 return DM_PROBE_SCORE_FALSE;
1504 } 1504 }
1505 1505
1506 1506
1507 static const Uint8 fmtFormatXX7_MagicID_1[] = 1507 static const Uint8 fmtFormatXX7_MagicID_1[] =
1508 { 1508 {
1522 DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX7_MagicID_1) == 0 && 1522 DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX7_MagicID_1) == 0 &&
1523 DM_MEMCMP_SIZE(buf->data + 0x0100, fmtFormatXX7_MagicID_2) == 0 1523 DM_MEMCMP_SIZE(buf->data + 0x0100, fmtFormatXX7_MagicID_2) == 0
1524 ) 1524 )
1525 return DM_PROBE_SCORE_MAX; 1525 return DM_PROBE_SCORE_MAX;
1526 1526
1527 return DM_PROBE_SCORE_false; 1527 return DM_PROBE_SCORE_FALSE;
1528 } 1528 }
1529 1529
1530 1530
1531 static int fmtProbeCosmosDesignsHiresManager(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 1531 static int fmtProbeCosmosDesignsHiresManager(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
1532 { 1532 {
1548 1548
1549 return DM_PROBE_SCORE_MAX; 1549 return DM_PROBE_SCORE_MAX;
1550 } 1550 }
1551 } 1551 }
1552 1552
1553 return DM_PROBE_SCORE_false; 1553 return DM_PROBE_SCORE_FALSE;
1554 } 1554 }
1555 1555
1556 1556
1557 static int fmtDecodeCosmosDesignsHiresManagerPacked(DMC64Image *img, const DMGrowBuf *psrc, const DMC64ImageFormat *fmt) 1557 static int fmtDecodeCosmosDesignsHiresManagerPacked(DMC64Image *img, const DMGrowBuf *psrc, const DMC64ImageFormat *fmt)
1558 { 1558 {
1657 // Packed variant 1657 // Packed variant
1658 if (fmt->size == 0 && buf->data[14 + 2] != 0) 1658 if (fmt->size == 0 && buf->data[14 + 2] != 0)
1659 return DM_PROBE_SCORE_MAX; 1659 return DM_PROBE_SCORE_MAX;
1660 } 1660 }
1661 1661
1662 return DM_PROBE_SCORE_false; 1662 return DM_PROBE_SCORE_FALSE;
1663 } 1663 }
1664 1664
1665 1665
1666 static int fmtDecodeFunPaint2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 1666 static int fmtDecodeFunPaint2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
1667 { 1667 {
1854 if (dmCompareAddr16(buf, 0, fmt->addr) && 1854 if (dmCompareAddr16(buf, 0, fmt->addr) &&
1855 buf->len > sizeof(fmtCrestSHFLI_MagicID_Packed) && 1855 buf->len > sizeof(fmtCrestSHFLI_MagicID_Packed) &&
1856 DM_MEMCMP_SIZE(buf->data + buf->len - sizeof(fmtCrestSHFLI_MagicID_Packed), fmtCrestSHFLI_MagicID_Packed) == 0) 1856 DM_MEMCMP_SIZE(buf->data + buf->len - sizeof(fmtCrestSHFLI_MagicID_Packed), fmtCrestSHFLI_MagicID_Packed) == 0)
1857 return DM_PROBE_SCORE_MAX; 1857 return DM_PROBE_SCORE_MAX;
1858 1858
1859 return DM_PROBE_SCORE_false; 1859 return DM_PROBE_SCORE_FALSE;
1860 } 1860 }
1861 1861
1862 1862
1863 static int fmtDecodeCrestSHFLIPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 1863 static int fmtDecodeCrestSHFLIPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
1864 { 1864 {
2113 } 2113 }
2114 2114
2115 2115
2116 static int fmtProbeECIPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 2116 static int fmtProbeECIPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
2117 { 2117 {
2118 int score = DM_PROBE_SCORE_false; 2118 int score = DM_PROBE_SCORE_FALSE;
2119 2119
2120 if (buf->len > 128 && 2120 if (buf->len > 128 &&
2121 dmCompareAddr16(buf, 0, fmt->addr)) 2121 dmCompareAddr16(buf, 0, fmt->addr))
2122 { 2122 {
2123 size_t i, n; 2123 size_t i, n;