Mercurial > hg > dmlib
changeset 1494:3b220604ae3c
Add short format attribute names to dmC64GetImageTypeString().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 May 2018 06:26:42 +0300 |
parents | d987a4933e1c |
children | acb607e2c350 |
files | tools/64vw.c tools/gfxconv.c tools/lib64gfx.c tools/lib64gfx.h |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/64vw.c Fri May 11 05:46:50 2018 +0300 +++ b/tools/64vw.c Fri May 11 06:26:42 2018 +0300 @@ -52,7 +52,7 @@ char buf[64]; printf("%3d | %-5s | %-15s | %s\n", i, fmt->fext, - dmC64GetImageTypeString(buf, sizeof(buf), fmt->type), + dmC64GetImageTypeString(buf, sizeof(buf), fmt->type, FALSE), fmt->name); } }
--- a/tools/gfxconv.c Fri May 11 05:46:50 2018 +0300 +++ b/tools/gfxconv.c Fri May 11 06:26:42 2018 +0300 @@ -213,7 +213,7 @@ char buf[64]; printf("%-5s | %-15s | %s\n", fmt->fext, - dmC64GetImageTypeString(buf, sizeof(buf), fmt->type), + dmC64GetImageTypeString(buf, sizeof(buf), fmt->type, FALSE), fmt->name); } }
--- a/tools/lib64gfx.c Fri May 11 05:46:50 2018 +0300 +++ b/tools/lib64gfx.c Fri May 11 06:26:42 2018 +0300 @@ -45,7 +45,7 @@ { char typeStr[64]; - dmC64GetImageTypeString(typeStr, sizeof(typeStr), img->type); + dmC64GetImageTypeString(typeStr, sizeof(typeStr), img->type, TRUE); if (fmt != NULL) { @@ -91,12 +91,12 @@ } -char * dmC64GetImageTypeString(char *buf, const size_t len, const int type) +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) ? "MultiColor " : "HiRes ", - (type & D64_FMT_ILACE) ? "Interlaced " : "", + (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" : "" );
--- a/tools/lib64gfx.h Fri May 11 05:46:50 2018 +0300 +++ b/tools/lib64gfx.h Fri May 11 06:26:42 2018 +0300 @@ -197,7 +197,7 @@ void dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt); void dmSetDefaultC64Palette(DMImage *img); -char * dmC64GetImageTypeString(char *buf, const size_t len, const int type); +char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng); DMC64Image *dmC64ImageAlloc(const DMC64ImageFormat *fmt);