# HG changeset patch # User Matti Hamalainen # Date 1529675284 -10800 # Node ID 69871828838c83f51aee08526bfb849fda2893c2 # Parent 19d4f76e003d05c6598060789e5f1d2dfa8d2a43 Separate the format entries for "FBI Crew FLI Designer 1.1" and "FLI Designer 2" and enable writing of those formats. diff -r 19d4f76e003d -r 69871828838c tools/lib64fmts.c --- 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] }, {