Mercurial > hg > dmlib
changeset 1394:054561dbcd57
Add support for Crest Hires FLI Designer format.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 25 Sep 2017 01:49:18 +0300 |
parents | b5fc5a05033d |
children | 009534f27de5 |
files | tools/lib64gfx.c |
diffstat | 1 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64gfx.c Mon Sep 25 01:41:56 2017 +0300 +++ b/tools/lib64gfx.c Mon Sep 25 01:49:18 2017 +0300 @@ -579,6 +579,19 @@ } +static Uint8 fmtGetPixelCHFLI( + const DMC64Image *img, const int bmoffs, const int scroffs, + const int vshift, const int vbitmap, const int raster) +{ + const int vbank = raster & 7; + + if ((img->bitmap[vbitmap][bmoffs] >> vshift) & 1) + return img->screen[vbank][scroffs] >> 4; + else + return img->screen[vbank][scroffs] & 15; +} + + // // Array with data for supported formats // @@ -909,6 +922,18 @@ } }, + { + D64_FMT_HIRES | D64_FMT_FLI, "chi", "Crest Hires FLI Designer (unpacked)", 0x4000, 16386, + C64_SCR_WIDTH, 14 * 8, + C64_SCR_CH_WIDTH , 14, + NULL, NULL, + NULL, NULL, NULL, fmtGetPixelCHFLI, + { + { DT_BITMAP, 0x0000, 0, 0, NULL, NULL }, + DEF_SCREEN_RAMS_8( 0x2000, 0, 0x400) + { DT_LAST, 0, 0, 0, NULL, NULL }, + } + }, }; const int ndmC64ImageFormats = sizeof(dmC64ImageFormats) / sizeof(dmC64ImageFormats[0]);