comparison lib64gfx.h @ 511:4cdcaeb68b54

Collapse most of the probing functions into one generic probe, as they only check loading address and file size.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Nov 2012 15:52:44 +0200
parents 43ea59887c69
children 95a6b6af53f1
comparison
equal deleted inserted replaced
510:43ea59887c69 511:4cdcaeb68b54
126 typedef struct _DMC64ImageFormat 126 typedef struct _DMC64ImageFormat
127 { 127 {
128 int type; 128 int type;
129 char *extension; 129 char *extension;
130 char *name; 130 char *name;
131 int (*probe)(const Uint8 *buf, const size_t len); 131 size_t addr; // Loading address (0 if no loading address)
132 size_t size; // Size, including loading address. Only used in encoding, if even there (0 if no static size)
133 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
132 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); 134 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
133 int (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt); 135 int (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt);
134 int (*convertFrom)(DMImage *, DMC64Image *); 136 int (*convertFrom)(DMImage *, DMC64Image *);
135 int (*convertTo)(DMImage *, DMC64Image *); 137 int (*convertTo)(DMImage *, DMC64Image *);
136 138