changeset 1483:1e7f7489d3e0

Improve dmC64GetImageTypeString() and use it also in 64vw.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 May 2018 04:21:15 +0300
parents df6dacb48970
children a0166c4050be
files tools/64vw.c tools/lib64gfx.c
diffstat 2 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/tools/64vw.c	Fri May 11 03:29:55 2018 +0300
+++ b/tools/64vw.c	Fri May 11 04:21:15 2018 +0300
@@ -168,13 +168,7 @@
 {
     char typeStr[64];
 
-    snprintf(typeStr, sizeof(typeStr),
-        "%s%s%s%s",
-        ((img->type & D64_FMT_MC) ? "MultiColor" : "Hires"),
-        ((img->type & D64_FMT_ILACE) ? " Interlaced" : ""),
-        ((img->type & D64_FMT_FLI) ? " FLI" : ""),
-        ((img->type & D64_FMT_CHAR) ? " CHAR" : "")
-        );
+    dmC64GetImageTypeString(typeStr, sizeof(typeStr), img->type);
 
     dmPrint(1,
         "\n%s\n"
--- a/tools/lib64gfx.c	Fri May 11 03:29:55 2018 +0300
+++ b/tools/lib64gfx.c	Fri May 11 04:21:15 2018 +0300
@@ -155,10 +155,10 @@
 {
     snprintf(buf, len,
         "%s%s%s%s",
-        (type & D64_FMT_FLI) ? "FLI " : "",
-        (type & D64_FMT_MC) ? "MCol " : "HiRes ",
-        (type & D64_FMT_ILACE) ? "Ilace " : "",
-        (type & D64_FMT_CHAR) ? "CharMap" : ""
+        (type & D64_FMT_MC)    ? "MultiColor " : "HiRes ",
+        (type & D64_FMT_ILACE) ? "Interlaced " : "",
+        (type & D64_FMT_FLI)   ? "FLI " : "",
+        (type & D64_FMT_CHAR)  ? "CHAR" : ""
         );
 
     return buf;