Mercurial > hg > dmlib
comparison tools/lib64fmts.c @ 1582:1f6aed186c4e
Add somewhat broken support for "Big FLI" aka BFLI files. Needs more work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 13 May 2018 23:20:32 +0300 |
parents | 5aa1c3ec91d5 |
children | 3c9e5962eca6 |
comparison
equal
deleted
inserted
replaced
1581:5aa1c3ec91d5 | 1582:1f6aed186c4e |
---|---|
462 vbank, vbitmap, 0, | 462 vbank, vbitmap, 0, |
463 img->extraData[vb][vr] & 15); | 463 img->extraData[vb][vr] & 15); |
464 } | 464 } |
465 | 465 |
466 | 466 |
467 static Uint8 fmtGetPixelBFLI( | |
468 const DMC64Image *img, const int bmoffs, const int scroffs, | |
469 const int vshift, const int vbitmap, const int raster) | |
470 { | |
471 const int vbb = raster < 200 ? 0 : 1; | |
472 const int vbank = (raster & 7) + (vbb * 8); | |
473 const int vbmoffs = raster < 200 ? bmoffs : bmoffs - 8000; | |
474 const int vscroffs = scroffs & 1023; | |
475 | |
476 //fprintf(stderr, "bmoffs=%d, scroffs=%d, vshift=%d, vbitmap=%d, raster=%d\n", vbmoffs, vscroffs, vshift, vbb, raster); | |
477 | |
478 return dmC64GetGenericMCPixel( | |
479 img, vbmoffs, vscroffs, vshift, | |
480 vbank, vbb, 0, | |
481 img->bgcolor); | |
482 } | |
483 | |
484 | |
467 static Uint8 fmtGetPixelBlackMailFLI( | 485 static Uint8 fmtGetPixelBlackMailFLI( |
468 const DMC64Image *img, const int bmoffs, const int scroffs, | 486 const DMC64Image *img, const int bmoffs, const int scroffs, |
469 const int vshift, const int vbitmap, const int raster) | 487 const int vshift, const int vbitmap, const int raster) |
470 { | 488 { |
471 const int vbank = raster & 7; | 489 const int vbank = raster & 7; |
789 { DT_LAST, 0, 0, 0, NULL, NULL }, | 807 { DT_LAST, 0, 0, 0, NULL, NULL }, |
790 } | 808 } |
791 }, | 809 }, |
792 | 810 |
793 { | 811 { |
812 D64_FMT_MC | D64_FMT_FLI, "bfli", "Big FLI (unpacked) [BROKEN]", 0x3bff, 33795, DM_FMT_RD, | |
813 C64_SCR_WIDTH / 2, C64_SCR_HEIGHT * 2, | |
814 C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT, | |
815 NULL, | |
816 NULL, NULL, | |
817 NULL, NULL, | |
818 fmtGetPixelBFLI, | |
819 { | |
820 { DT_COLOR_RAM, 0x0001, 0, 0, NULL, NULL }, | |
821 DEF_SCREEN_RAMS_8( 0x0401, 0, 0x400) | |
822 { DT_BITMAP, 0x2401, 0, 0, NULL, NULL }, | |
823 DEF_SCREEN_RAMS_8( 0x4401, 8, 0x400) | |
824 { DT_BITMAP, 0x6401 - 24*8, 1, 0, NULL, NULL }, | |
825 { DT_LAST, 0, 0, 0, NULL, NULL }, | |
826 } | |
827 }, | |
828 | |
829 | |
830 { | |
794 D64_FMT_MC | D64_FMT_FLI, "bml", "Blackmail FLI (unpacked)", 0x3b00, 17474, DM_FMT_RDWR, | 831 D64_FMT_MC | D64_FMT_FLI, "bml", "Blackmail FLI (unpacked)", 0x3b00, 17474, DM_FMT_RDWR, |
795 C64_SCR_WIDTH / 2, C64_SCR_HEIGHT, | 832 C64_SCR_WIDTH / 2, C64_SCR_HEIGHT, |
796 C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT, | 833 C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT, |
797 NULL, | 834 NULL, |
798 NULL, NULL, | 835 NULL, NULL, |