# HG changeset patch # User Matti Hamalainen # Date 1353325784 -7200 # Node ID 272e64259fdea2d06b6367f8dcfeff0a0a9402b9 # Parent 443228332e5b0dc35fdd3ad293b27ac1d27c0044 Add function pointers for encoding and convertTo/convertFrom to the DMC64ImageFormat structure. diff -r 443228332e5b -r 272e64259fde lib64gfx.c --- a/lib64gfx.c Mon Nov 19 13:48:35 2012 +0200 +++ b/lib64gfx.c Mon Nov 19 13:49:44 2012 +0200 @@ -297,7 +297,8 @@ { { DM_C64IFMT_MC, ".drp", "DrazPaint 2.0 (packed)", - fmtProbeDrazPaint20Packed, fmtDecodeDrazPaintPacked, NULL, + fmtProbeDrazPaint20Packed, fmtDecodeDrazPaintPacked, + NULL, NULL, NULL, 4, { { DT_COLOR_RAM, 0x0000, 0, 0, NULL }, @@ -309,7 +310,8 @@ { DM_C64IFMT_MC_ILACE, ".dlp", "DrazLace 1.0 (packed)", - fmtProbeDrazLace10Packed, fmtDecodeDrazPaintPacked, NULL, + fmtProbeDrazLace10Packed, fmtDecodeDrazPaintPacked, + NULL, NULL, NULL, 6, { { DT_COLOR_RAM, 0x0000, 0, 0, NULL }, @@ -323,7 +325,8 @@ { DM_C64IFMT_MC, ".drp", "DrazPaint (unpacked)", - fmtProbeDrazPaint, NULL, NULL, + fmtProbeDrazPaint, NULL, + NULL, NULL, NULL, 4, { { DT_COLOR_RAM, 0x0000, 0, 0, NULL }, @@ -335,7 +338,8 @@ { DM_C64IFMT_MC_ILACE, ".drl", "DrazLace 1.0 (unpacked)", - fmtProbeDrazLace10, NULL, NULL, + fmtProbeDrazLace10, NULL, + NULL, NULL, NULL, 6, { { DT_COLOR_RAM, 0x0000, 0, 0, NULL }, @@ -349,7 +353,8 @@ { DM_C64IFMT_MC_ILACE, ".mci", "Truepaint (unpacked)", - fmtProbeTruePaint, NULL, NULL, + fmtProbeTruePaint, NULL, + NULL, NULL, NULL, 6, { { DT_SCREEN_RAM, 0x0000, 0, 0, NULL }, @@ -364,7 +369,8 @@ { DM_C64IFMT_MC, ".kla", "Koala Paint (unpacked)", - fmtProbeKoalaPaint, NULL, NULL, + fmtProbeKoalaPaint, NULL, + NULL, NULL, NULL, 4, { { DT_COLOR_RAM, 0x2328, 0, 0, NULL }, @@ -376,7 +382,8 @@ { DM_C64IFMT_MC, ".ami", "Amica Paint (packed)", - fmtProbeAmicaPaintPacked, fmtDecodeAmicaPaintPacked, NULL, + fmtProbeAmicaPaintPacked, fmtDecodeAmicaPaintPacked, + NULL, NULL, NULL, 4, { { DT_COLOR_RAM, 0x2328, 0, 0, NULL }, diff -r 443228332e5b -r 272e64259fde lib64gfx.h --- a/lib64gfx.h Mon Nov 19 13:48:35 2012 +0200 +++ b/lib64gfx.h Mon Nov 19 13:49:44 2012 +0200 @@ -128,7 +128,9 @@ char *name; int (*probe)(const Uint8 *buf, const size_t len); int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); - int (*convert)(DMImage *, DMC64Image *); + int (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt); + int (*convertFrom)(DMImage *, DMC64Image *); + int (*convertTo)(DMImage *, DMC64Image *); int ndecodeOps; DMDecodeOp decodeOps[16];