comparison tools/lib64fmts.c @ 2300:a494e4a4b6bc

Minor improvements to Flinterlazer support.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 04 Jul 2019 11:40:17 +0300
parents ad019d930401
children d71185584d95
comparison
equal deleted inserted replaced
2299:ad019d930401 2300:a494e4a4b6bc
939 const DMC64Image *img, const int rasterX, const int rasterY) 939 const DMC64Image *img, const int rasterX, const int rasterY)
940 { 940 {
941 DM_C64_GENERIC_MC_PIXEL_DEFS(img) 941 DM_C64_GENERIC_MC_PIXEL_DEFS(img)
942 const int vbank = rasterY & 7; 942 const int vbank = rasterY & 7;
943 int res; 943 int res;
944 Uint8 color1, color2; 944 Uint8 color1, color2, bgcol = img->bgcolor;
945 Uint8 bgcol = img->bgcolor; 945
946 if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank , 0, 0, bgcol)) != DMERR_OK) 946 if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank , 0, 0, bgcol)) != DMERR_OK ||
947 (res = dmC64GetGenericMCPixel(&color2, img, bmoffs, scroffs, vshift, vbank + 8, 1, 0, bgcol)) != DMERR_OK)
947 return res; 948 return res;
948 *col = color1 * 17; 949
950 *col = (color1 * D64_NCOLORS) + color2;
949 return DMERR_OK; 951 return DMERR_OK;
950 } 952 }
951 953
952 954
953 enum 955 enum
2465 2467
2466 { DO_COPY , DS_BITMAP_RAM , 0x4000 - 0x284e, 0, 0 , 0, NULL, NULL, DF_NORMAL }, 2468 { DO_COPY , DS_BITMAP_RAM , 0x4000 - 0x284e, 0, 0 , 0, NULL, NULL, DF_NORMAL },
2467 DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0x6000 - 0x284e, 0, 0x400, 0, DF_NORMAL), 2469 DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0x6000 - 0x284e, 0, 0x400, 0, DF_NORMAL),
2468 2470
2469 { DO_COPY , DS_BITMAP_RAM , 0x8000 - 0x284e, 1, 0 , 0, NULL, NULL, DF_NORMAL }, 2471 { DO_COPY , DS_BITMAP_RAM , 0x8000 - 0x284e, 1, 0 , 0, NULL, NULL, DF_NORMAL },
2470 DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0xA000 - 0x284e, 1, 0x400, 0, DF_NORMAL), 2472 DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0xA000 - 0x284e, 8, 0x400, 0, DF_NORMAL),
2471 2473
2472 { DO_SET_OP , DS_EXTRA_INFO , D64_ILACE_COLOR, 0 , 0 , D64_EI_ILACE_TYPE, NULL, NULL, DF_DECODE }, 2474 { DO_SET_OP , DS_EXTRA_INFO , D64_ILACE_COLOR, 0 , 0 , D64_EI_ILACE_TYPE, NULL, NULL, DF_DECODE },
2473 { DO_SET_OP , DS_EXTRA_INFO , D64_FLI_8 , 0, 0 , D64_EI_FLI_TYPE, NULL, NULL, DF_DECODE }, 2475 { DO_SET_OP , DS_EXTRA_INFO , D64_FLI_8 , 0, 0 , D64_EI_FLI_TYPE, NULL, NULL, DF_DECODE },
2474 { DO_FUNC , 0 , 0 , 0, 0, 0, fmtDecodeFlinterlazer, NULL, DF_NORMAL }, 2476 { DO_FUNC , 0 , 0 , 0, 0, 0, fmtDecodeFlinterlazer, NULL, DF_NORMAL },
2475 { DO_LAST , 0 , 0 , 0, 0 , 0, NULL, NULL, DF_NORMAL }, 2477 { DO_LAST , 0 , 0 , 0, 0 , 0, NULL, NULL, DF_NORMAL },