changeset 1834:69871828838c

Separate the format entries for "FBI Crew FLI Designer 1.1" and "FLI Designer 2" and enable writing of those formats.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 22 Jun 2018 16:48:04 +0300
parents 19d4f76e003d
children eb965318101a
files tools/lib64fmts.c
diffstat 1 files changed, 24 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Fri Jun 22 16:35:08 2018 +0300
+++ b/tools/lib64fmts.c	Fri Jun 22 16:48:04 2018 +0300
@@ -380,16 +380,6 @@
 }
 
 
-static int fmtProbeFLIDesigner(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len == fmt->size &&
-        (dmCompareAddr16(buf, 0, 0x3c00) || dmCompareAddr16(buf, 0, 0x3ff0)))
-        return DM_PROBE_SCORE_GOOD;
-
-    return DM_PROBE_SCORE_FALSE;
-}
-
-
 static Uint8 fmtGetPixelFLIDesigner(
     const DMC64Image *img, const int bmoffs, const int scroffs,
     const int shift, const int bitmap, const int rasterX, const int rasterY)
@@ -1145,6 +1135,20 @@
             { DO_LAST       , 0              , 0     , 0,  0, NULL, NULL },
         }
     },
+
+    { // #9: FLI Designer 1.x & 2.0
+        D64_FMT_MC | D64_FMT_FLI,
+        C64_SCR_WIDTH / 2, C64_SCR_HEIGHT,
+        C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT,
+        NULL, NULL,
+        fmtGetPixelFLIDesigner,
+        {
+            { DO_COPY      , DS_COLOR_RAM   , 0x0000, 0,  0, NULL, NULL },
+            DEF_SCREEN_RAMS_8(0x0400, 0, 0x400),
+            { DO_COPY      , DS_BITMAP_RAM  , 0x2400, 0,  0, NULL, NULL },
+            { DO_LAST      , 0              , 0     , 0,  0, NULL, NULL },
+        }
+    },
 };
 
 
@@ -1585,23 +1589,17 @@
     },
 
     {
-        "fli", "FLI Designer (unpacked)", 0, 17409, DM_FMT_RDWR,
-        fmtProbeFLIDesigner,
+        "fd2", "FBI Crew FLI Designer 1.1 (unpacked)", 0x3c00, 17409, DM_FMT_RDWR,
+        NULL,
         NULL, NULL,
-        {
-            D64_FMT_MC | D64_FMT_FLI,
-            C64_SCR_WIDTH / 2, C64_SCR_HEIGHT,
-            C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT,
-            NULL, NULL,
-            fmtGetPixelFLIDesigner,
-            {
-                { DO_COPY      , DS_COLOR_RAM   , 0x0000, 0,  0, NULL, NULL },
-                DEF_SCREEN_RAMS_8(0x0400, 0, 0x400),
-                { DO_COPY      , DS_BITMAP_RAM  , 0x2400, 0,  0, NULL, NULL },
-                { DO_LAST      , 0              , 0     , 0,  0, NULL, NULL },
-            }
-        },
-        NULL
+        { }, &dmC64CommonFormats[9]
+    },
+
+    {
+        "fli", "FLI Designer 2 (unpacked)", 0x3ff0, 17409, DM_FMT_RDWR,
+        NULL,
+        NULL, NULL,
+        { }, &dmC64CommonFormats[9]
     },
 
     {