Mercurial > hg > dmlib
changeset 2428:09082816665d
Fix write support of Abyss Connection PETSCII-Editor 4.61 (unpacked) format.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 31 Jan 2020 21:48:45 +0200 |
parents | f07e3e66ca58 |
children | ebb4650f3cc1 |
files | tools/lib64fmts.c |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64fmts.c Mon Jan 27 09:40:06 2020 +0200 +++ b/tools/lib64fmts.c Fri Jan 31 21:48:45 2020 +0200 @@ -126,9 +126,11 @@ static int fmtEncodeHiresPETSCIICharsetData( - const DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img) + const DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, + const DMC64ImageCommonFormat *fmt) { Uint8 val; + (void) fmt; switch (img->extraInfo[D64_EI_CHAR_CASE]) { @@ -146,8 +148,6 @@ static int fmtEncodeMarqPETSCIIData(const DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageCommonFormat *fmt) { - (void) fmt; - memcpy(buf->data, fmtMarqPETSCII_ID1, sizeof(fmtMarqPETSCII_ID1)); @@ -157,7 +157,7 @@ memcpy(buf->data + sizeof(fmtMarqPETSCII_ID1) + sizeof(fmtMarqPETSCII_ID2), fmtMarqPETSCII_ID3, sizeof(fmtMarqPETSCII_ID3)); - return fmtEncodeHiresPETSCIICharsetData(op, buf, img); + return fmtEncodeHiresPETSCIICharsetData(op, buf, img, fmt); } @@ -279,12 +279,10 @@ static int fmtEncodeCocaPETSCIIData(const DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageCommonFormat *fmt) { - (void) fmt; - memcpy(buf->data, fmtCocaPETSCII_ID1, sizeof(fmtCocaPETSCII_ID1)); - return fmtEncodeHiresPETSCIICharsetData(op, buf, img); + return fmtEncodeHiresPETSCIICharsetData(op, buf, img, fmt); } @@ -2862,7 +2860,7 @@ NULL, NULL, NULL, { - { DO_FUNC , 0 , 0x33ea - 0x3000, 0, 0, 0, NULL, fmtEncodeCocaPETSCIIData, DF_NORMAL }, + { DO_FUNC , 0 , 0x33ea - 0x3000, 0, 0, 0, NULL, fmtEncodeHiresPETSCIICharsetData, DF_NORMAL }, { DO_COPY , DS_SCREEN_RAM , 0x0000 , 0, 0, 0, NULL, NULL, DF_NORMAL }, { DO_COPY , DS_COLOR_RAM , 0x0400 , 0, 0, 0, NULL, NULL, DF_NORMAL },