Mercurial > hg > dmlib
diff tools/lib64gfx.c @ 1644:9d9a0e852b3d
Reorder some functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 30 May 2018 00:56:32 +0300 |
parents | 2a1866fd546e |
children | 262300a0359b |
line wrap: on
line diff
--- a/tools/lib64gfx.c Mon May 28 19:58:08 2018 +0300 +++ b/tools/lib64gfx.c Wed May 30 00:56:32 2018 +0300 @@ -12,6 +12,20 @@ #define BUF_SIZE_GROW (4*1024) +char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng) +{ + snprintf(buf, len, + "%s%s%s%s", + (type & D64_FMT_MC) ? (lng ? "MultiColor " : "MC ") : "HiRes ", + (type & D64_FMT_ILACE) ? (lng ? "Interlaced " : "ILace ") : "", + (type & D64_FMT_FLI) ? "FLI " : "", + (type & D64_FMT_CHAR) ? "CHAR" : "" + ); + + return buf; +} + + void dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt) { char typeStr[64]; @@ -62,20 +76,6 @@ } -char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng) -{ - snprintf(buf, len, - "%s%s%s%s", - (type & D64_FMT_MC) ? (lng ? "MultiColor " : "MC ") : "HiRes ", - (type & D64_FMT_ILACE) ? (lng ? "Interlaced " : "ILace ") : "", - (type & D64_FMT_FLI) ? "FLI " : "", - (type & D64_FMT_CHAR) ? "CHAR" : "" - ); - - return buf; -} - - BOOL dmCompareAddr16(const Uint8 *buf, const size_t offs, const Uint16 addr) { return buf[offs ] == DM_GET_ADDR_LO(addr) &&