Mercurial > hg > dmlib
changeset 1487:06df2bdf5dc4
Various fixes to dmC64EncodeGenericBMP().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 May 2018 04:55:28 +0300 |
parents | bc13af8954d7 |
children | c71b6c5204af |
files | tools/lib64gfx.c |
diffstat | 1 files changed, 1 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64gfx.c Fri May 11 04:52:43 2018 +0300 +++ b/tools/lib64gfx.c Fri May 11 04:55:28 2018 +0300 @@ -1432,15 +1432,6 @@ if (img == NULL || fmt == NULL) return DMERR_NULLPTR; - // Sanity check img vs format - if (img->type != fmt->type || - img->width != fmt->width || img->height != fmt->height) - { - res = dmError(DMERR_NOT_SUPPORTED, - "Can't directly encode a differing C64 bitmap image format.\n"); - goto err; - } - // Allocate the output buffer if ((res = dmGrowBufAlloc(buf, fmt->size, BUF_SIZE_GROW)) != DMERR_OK) { @@ -1449,7 +1440,6 @@ fmt->size); goto err; } - buf->len = fmt->size; // Perform encoding for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++) @@ -1485,7 +1475,7 @@ goto err; } - if (fmt->size == 0 && chksize > buf->len) + if (chksize > buf->len) buf->len = chksize; // Perform operation @@ -1543,7 +1533,6 @@ i, op->offs, op->offs, op->bank, size, size, buf->len, buf->len); goto err; } - /* if (!op->encFunction(op, buf, img, fmt)) { res = dmError(DMERR_INTERNAL, @@ -1552,7 +1541,6 @@ i, op->offs, op->offs, op->bank, size, size, buf->len, buf->len); goto err; } - */ break; } }