changeset 1759:027fb7313d85

Add a format flag for marking formats that have broken/incomplete support and use it.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 11 Jun 2018 18:09:00 +0300
parents 8014e4cbebfe
children c944844e437f
files tools/64vw.c tools/gfxconv.c tools/lib64fmts.c tools/libgfx.h
diffstat 4 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tools/64vw.c	Mon Jun 11 17:58:44 2018 +0300
+++ b/tools/64vw.c	Mon Jun 11 18:09:00 2018 +0300
@@ -59,10 +59,11 @@
     {
         const DMC64ImageFormat *fmt = &dmC64ImageFormats[i];
         char buf[64];
-        printf("%-6s| %-15s | %s\n",
+        printf("%-6s| %-15s | %s%s\n",
             fmt->fext,
             dmC64GetImageTypeString(buf, sizeof(buf), fmt->type, FALSE),
-            fmt->name);
+            fmt->name,
+            fmt->flags & DM_FMT_BROKEN ? " [BROKEN]" : "");
     }
     printf("%d formats supported.\n", ndmC64ImageFormats);
 }
--- a/tools/gfxconv.c	Mon Jun 11 17:58:44 2018 +0300
+++ b/tools/gfxconv.c	Mon Jun 11 18:09:00 2018 +0300
@@ -172,12 +172,13 @@
     {
         const DMC64ImageFormat *fmt = &dmC64ImageFormats[i];
         char buf[64];
-        printf("%-6s| %c%c | %-15s | %s\n",
+        printf("%-6s| %c%c | %-15s | %s%s\n",
             fmt->fext,
             (fmt->flags & DM_FMT_RD) ? 'R' : ' ',
             (fmt->flags & DM_FMT_WR) ? 'W' : ' ',
             dmC64GetImageTypeString(buf, sizeof(buf), fmt->type, FALSE),
-            fmt->name);
+            fmt->name,
+            fmt->flags & DM_FMT_BROKEN ? " [BROKEN]" : "");
     }
     printf("%d formats supported.\n", ndmC64ImageFormats);
 }
--- a/tools/lib64fmts.c	Mon Jun 11 17:58:44 2018 +0300
+++ b/tools/lib64fmts.c	Mon Jun 11 18:09:00 2018 +0300
@@ -1094,7 +1094,7 @@
     },
 
     {
-        D64_FMT_MC, "mil", "MIL (unpacked)", 0x18dc, 10022, DM_FMT_RDWR,
+        D64_FMT_MC, "mil", "MIL (unpacked)", 0x18dc, 10022, DM_FMT_RDWR | DM_FMT_BROKEN,
         C64_SCR_WIDTH / 2, C64_SCR_HEIGHT,
         C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT,
         NULL,
@@ -1236,7 +1236,7 @@
     },
 
     {
-        D64_FMT_MC | D64_FMT_FLI, "bfli", "Big FLI (unpacked) [BROKEN]", 0x3bff, 33795, DM_FMT_RD,
+        D64_FMT_MC | D64_FMT_FLI, "bfli", "Big FLI (unpacked)", 0x3bff, 33795, DM_FMT_RD | DM_FMT_BROKEN,
         C64_SCR_WIDTH / 2, C64_SCR_HEIGHT * 2,
         C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT,
         NULL,
--- a/tools/libgfx.h	Mon Jun 11 17:58:44 2018 +0300
+++ b/tools/libgfx.h	Mon Jun 11 18:09:00 2018 +0300
@@ -59,9 +59,10 @@
 // Flags for readability/writeability of formats
 enum
 {
-    DM_FMT_WR              = 0x0001,
-    DM_FMT_RD              = 0x0002,
-    DM_FMT_RDWR            = (DM_FMT_RD | DM_FMT_WR),
+    DM_FMT_WR              = 0x0001, // Format can be written
+    DM_FMT_RD              = 0x0002, // Format can be read
+    DM_FMT_RDWR            = (DM_FMT_RD | DM_FMT_WR), // Read and write support
+    DM_FMT_BROKEN          = 0x1000, // Support is broken/incomplete
 };