Mercurial > hg > dmlib
diff tools/lib64gfx.c @ 1486:bc13af8954d7
Add DMC64ImageFormat to C64 bitmap format encoding/decoding ops function parameters.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 May 2018 04:52:43 +0300 |
parents | 06a9c16601d6 |
children | 06df2bdf5dc4 |
line wrap: on
line diff
--- a/tools/lib64gfx.c Fri May 11 04:23:47 2018 +0300 +++ b/tools/lib64gfx.c Fri May 11 04:52:43 2018 +0300 @@ -461,9 +461,11 @@ } -static BOOL fmtDrazLaceSetLaceType(DMC64Image *img, const struct _DMC64EncDecOp *op, const Uint8 *buf, const size_t len) +static BOOL fmtDrazLaceSetLaceType(DMC64Image *img, const DMC64EncDecOp *op, + const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt) { (void) len; + (void) fmt; img->laceType = buf[op->offs] ? D64_ILACE_RES : D64_ILACE_COLOR; return TRUE; } @@ -544,11 +546,13 @@ } -static BOOL fmtTruePaintSetLaceType(DMC64Image *img, const struct _DMC64EncDecOp *op, const Uint8 *buf, const size_t len) +static BOOL fmtTruePaintSetLaceType(DMC64Image *img, const DMC64EncDecOp *op, + const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt) { (void) op; (void) buf; (void) len; + (void) fmt; img->laceType = D64_ILACE_RES; return TRUE; } @@ -1406,7 +1410,7 @@ "op #%d, offs=%d ($%04x), bank=%d, size=%d ($%04x) @ %d ($%04x)\n", i, op->offs, op->offs, op->bank, size, size, len, len); } - if (!op->decFunction(img, op, buf, len)) + if (!op->decFunction(img, op, buf, len, fmt)) { return dmError(DMERR_INTERNAL, "Decode op custom function failed: op #%d, " @@ -1540,13 +1544,13 @@ goto err; } /* - if (!op->encFunction(op, buf, len)) + if (!op->encFunction(op, buf, img, fmt)) { res = dmError(DMERR_INTERNAL, "Encode op custom function failed: op #%d, " "offs=%d ($%04x), bank=%d, size=%d ($%04x) @ %d ($%04x)\n", - i, op->offs, op->offs, op->bank, size, size, len, len); - goto out; + i, op->offs, op->offs, op->bank, size, size, buf->len, buf->len); + goto err; } */ break;