Mercurial > hg > dmlib
comparison tools/lib64gfx.c @ 1501:9ccf973f65ac
Add static const global for FunPaint 2 magic ID string.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 May 2018 07:13:46 +0300 |
parents | 3223d01ac8e8 |
children | c7b9ef56319b |
comparison
equal
deleted
inserted
replaced
1500:3223d01ac8e8 | 1501:9ccf973f65ac |
---|---|
694 return res; | 694 return res; |
695 } | 695 } |
696 | 696 |
697 | 697 |
698 #define FUNPAINT2_HEADER_SIZE (0x10) | 698 #define FUNPAINT2_HEADER_SIZE (0x10) |
699 static const char *fmtFunPaint2MagicID = "FUNPAINT (MT) "; | |
700 | |
699 | 701 |
700 static BOOL fmtProbeFunPaint2Header(const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt) | 702 static BOOL fmtProbeFunPaint2Header(const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt) |
701 { | 703 { |
702 return | 704 return |
703 len > 30 && | 705 len > 30 && |
704 dmCompareAddr16(buf, 0, fmt->addr) && | 706 dmCompareAddr16(buf, 0, fmt->addr) && |
705 strncmp((const char *) (buf + 2), "FUNPAINT (MT) ", 14) == 0; | 707 strncmp((const char *) (buf + 2), fmtFunPaint2MagicID, strlen(fmtFunPaint2MagicID)) == 0; |
706 } | 708 } |
707 | 709 |
708 | 710 |
709 static int fmtProbeFunPaint2Unpacked(const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt) | 711 static int fmtProbeFunPaint2Unpacked(const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt) |
710 { | 712 { |