Mercurial > hg > dmlib
diff tools/gfxconv.c @ 1775:4e4d54135baf
Refactor the c64 bitmap format definitions handling to be more flexible. Again.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 12 Jun 2018 17:12:48 +0300 |
parents | 027fb7313d85 |
children | 0562dd55a1f6 |
line wrap: on
line diff
--- a/tools/gfxconv.c Tue Jun 12 15:36:00 2018 +0300 +++ b/tools/gfxconv.c Tue Jun 12 17:12:48 2018 +0300 @@ -176,7 +176,7 @@ fmt->fext, (fmt->flags & DM_FMT_RD) ? 'R' : ' ', (fmt->flags & DM_FMT_WR) ? 'W' : ' ', - dmC64GetImageTypeString(buf, sizeof(buf), fmt->type, FALSE), + dmC64GetImageTypeString(buf, sizeof(buf), fmt->format->type, FALSE), fmt->name, fmt->flags & DM_FMT_BROKEN ? " [BROKEN]" : ""); } @@ -1620,6 +1620,7 @@ optColors[i] = i; // Initialize list of additional conversion formats + dmC64InitializeFormats(); nconvFormatList = ndmImageFormatList + nbaseFormatList; convFormatList = dmCalloc(nconvFormatList, sizeof(DMConvFormat)); @@ -1707,7 +1708,7 @@ { forced = &dmC64ImageFormats[optForcedFormat]; dmMsg(0, "Forced %s format image, type %d, %s\n", - forced->name, forced->type, forced->fext); + forced->name, forced->format->type, forced->fext); } res = dmC64DecodeBMP(&inC64Image, @@ -1717,7 +1718,7 @@ if (forced == NULL && inC64Fmt != NULL && res == DMERR_OK) { dmMsg(1, "Probed '%s' format image, type %d, %s\n", - inC64Fmt->name, inC64Fmt->type, inC64Fmt->fext); + inC64Fmt->name, inC64Fmt->format->type, inC64Fmt->fext); optInFormat = FFMT_BITMAP; }