changeset 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 866e036d7706
children 15f75ed4f2cc ffdc51f0c9cd
files tools/lib64fmts.c tools/lib64gfx.h tools/lib64util.c
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Tue Jul 09 11:52:15 2019 +0300
+++ b/tools/lib64fmts.c	Wed Jul 10 11:23:34 2019 +0300
@@ -1933,7 +1933,7 @@
     },
 
     { // #11: Crest Super Hires FLI Editor 1.0 (SHF)
-        D64_FMT_HIRES | D64_FMT_FLI,
+        D64_FMT_HIRES | D64_FMT_FLI | D64_FMT_SPRITES,
         D64_SCR_WIDTH, D64_SCR_HEIGHT,
         D64_SCR_CH_WIDTH, 24,
         1, 1,
@@ -2628,7 +2628,7 @@
         NULL,
         NULL, NULL,
         {
-            D64_FMT_HIRES | D64_FMT_FLI,
+            D64_FMT_HIRES | D64_FMT_FLI | D64_FMT_SPRITES,
             192, D64_SCR_HEIGHT,
             24, D64_SCR_CH_HEIGHT,
             2, 1,
--- a/tools/lib64gfx.h	Tue Jul 09 11:52:15 2019 +0300
+++ b/tools/lib64gfx.h	Wed Jul 10 11:23:34 2019 +0300
@@ -70,6 +70,7 @@
     D64_FMT_FLI          = 0x0020, // FLI
     D64_FMT_CHAR         = 0x0040, // Character mode
     D64_FMT_BORDER       = 0x0080, // Uses border area
+    D64_FMT_SPRITES      = 0x0100, // Uses sprite layer
 };
 
 
--- a/tools/lib64util.c	Tue Jul 09 11:52:15 2019 +0300
+++ b/tools/lib64util.c	Wed Jul 10 11:23:34 2019 +0300
@@ -12,7 +12,7 @@
 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng)
 {
     static const char *fmtModesShort[] = { "*", "HiR", "MC", "ECM" };
-    static const char *fmtModesLong[] = { "*", "HiRes", "MultiColor", "Extended Color Mode" };
+    static const char *fmtModesLong[] = { "*", "Hires", "Multi-color", "Extended Color Mode" };
     const char *fmtStr;
     size_t nfmt = type & D64_FMT_MODE_MASK;
 
@@ -22,11 +22,12 @@
         fmtStr = lng ? "ERROR" : "ERR";
 
     snprintf(buf, len,
-        "%s %s%s%s",
+        "%s %s%s%s%s",
         fmtStr,
-        (type & D64_FMT_ILACE) ? (lng ? "Interlaced " : "ILace ") : "",
+        (type & D64_FMT_ILACE) ? (lng ? "interlaced " : "ILace ") : "",
         (type & D64_FMT_FLI)   ? "FLI " : "",
-        (type & D64_FMT_CHAR)  ? "CHAR" : ""
+        (type & D64_FMT_CHAR)  ? (lng ? "char-mode" : "CHAR") : "",
+        (type & D64_FMT_SPRITES)  ? (lng ? "+ sprite-layer" : "SPR") : ""
         );
 
     return buf;