Mercurial > hg > dmlib
changeset 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 |
files | tools/lib64fmts.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64fmts.c Thu Jul 04 11:09:51 2019 +0300 +++ b/tools/lib64fmts.c Thu Jul 04 11:40:17 2019 +0300 @@ -941,11 +941,13 @@ DM_C64_GENERIC_MC_PIXEL_DEFS(img) const int vbank = rasterY & 7; int res; - Uint8 color1, color2; - Uint8 bgcol = img->bgcolor; - if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank , 0, 0, bgcol)) != DMERR_OK) + Uint8 color1, color2, bgcol = img->bgcolor; + + if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank , 0, 0, bgcol)) != DMERR_OK || + (res = dmC64GetGenericMCPixel(&color2, img, bmoffs, scroffs, vshift, vbank + 8, 1, 0, bgcol)) != DMERR_OK) return res; - *col = color1 * 17; + + *col = (color1 * D64_NCOLORS) + color2; return DMERR_OK; } @@ -2467,7 +2469,7 @@ DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0x6000 - 0x284e, 0, 0x400, 0, DF_NORMAL), { DO_COPY , DS_BITMAP_RAM , 0x8000 - 0x284e, 1, 0 , 0, NULL, NULL, DF_NORMAL }, - DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0xA000 - 0x284e, 1, 0x400, 0, DF_NORMAL), + DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0xA000 - 0x284e, 8, 0x400, 0, DF_NORMAL), { DO_SET_OP , DS_EXTRA_INFO , D64_ILACE_COLOR, 0 , 0 , D64_EI_ILACE_TYPE, NULL, NULL, DF_DECODE }, { DO_SET_OP , DS_EXTRA_INFO , D64_FLI_8 , 0, 0 , D64_EI_FLI_TYPE, NULL, NULL, DF_DECODE },