comparison tools/lib64util.c @ 2314:87533af8db64

Add format flag for formats that use sprite layer.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 Jul 2019 11:23:34 +0300
parents 48b48251610a
children 82cb32297ed2
comparison
equal deleted inserted replaced
2313:866e036d7706 2314:87533af8db64
10 10
11 11
12 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng) 12 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng)
13 { 13 {
14 static const char *fmtModesShort[] = { "*", "HiR", "MC", "ECM" }; 14 static const char *fmtModesShort[] = { "*", "HiR", "MC", "ECM" };
15 static const char *fmtModesLong[] = { "*", "HiRes", "MultiColor", "Extended Color Mode" }; 15 static const char *fmtModesLong[] = { "*", "Hires", "Multi-color", "Extended Color Mode" };
16 const char *fmtStr; 16 const char *fmtStr;
17 size_t nfmt = type & D64_FMT_MODE_MASK; 17 size_t nfmt = type & D64_FMT_MODE_MASK;
18 18
19 if (nfmt < sizeof(fmtModesShort) / sizeof(fmtModesShort[0])) 19 if (nfmt < sizeof(fmtModesShort) / sizeof(fmtModesShort[0]))
20 fmtStr = lng ? fmtModesLong[nfmt] : fmtModesShort[nfmt]; 20 fmtStr = lng ? fmtModesLong[nfmt] : fmtModesShort[nfmt];
21 else 21 else
22 fmtStr = lng ? "ERROR" : "ERR"; 22 fmtStr = lng ? "ERROR" : "ERR";
23 23
24 snprintf(buf, len, 24 snprintf(buf, len,
25 "%s %s%s%s", 25 "%s %s%s%s%s",
26 fmtStr, 26 fmtStr,
27 (type & D64_FMT_ILACE) ? (lng ? "Interlaced " : "ILace ") : "", 27 (type & D64_FMT_ILACE) ? (lng ? "interlaced " : "ILace ") : "",
28 (type & D64_FMT_FLI) ? "FLI " : "", 28 (type & D64_FMT_FLI) ? "FLI " : "",
29 (type & D64_FMT_CHAR) ? "CHAR" : "" 29 (type & D64_FMT_CHAR) ? (lng ? "char-mode" : "CHAR") : "",
30 (type & D64_FMT_SPRITES) ? (lng ? "+ sprite-layer" : "SPR") : ""
30 ); 31 );
31 32
32 return buf; 33 return buf;
33 } 34 }
34 35