comparison tools/libgfx.h @ 2202:455a3849b8ac

Comments and cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 14 Jun 2019 01:56:47 +0300
parents 9a9493809b3a
children 1ea48084055e
comparison
equal deleted inserted replaced
2201:9f3fb4004c20 2202:455a3849b8ac
111 } DMImageWriteSpec; 111 } DMImageWriteSpec;
112 112
113 113
114 typedef struct 114 typedef struct
115 { 115 {
116 char *fext; 116 char *fext; // Typical filename extension
117 char *name; 117 char *name; // Format name / description
118 int fmtid; // DM_IMGFMT_* 118 int fmtid; // DM_IMGFMT_*
119 int flags; // DM_FMT_* and DM_PIXFMT_* flags 119 int flags; // DM_FMT_* and DM_PIXFMT_* flags
120
120 int (*probe)(const Uint8 *buf, const size_t len); 121 int (*probe)(const Uint8 *buf, const size_t len);
121 int (*read)(DMResource *fp, DMImage **pimg); 122 int (*read)(DMResource *fp, DMImage **pimg);
122 int (*write)(DMResource *fp, const DMImage *pimg, const DMImageWriteSpec *spec); 123 int (*write)(DMResource *fp, const DMImage *pimg, const DMImageWriteSpec *spec);
123 } DMImageFormat; 124 } DMImageFormat;
124 125
162 163
163 int dmReadIFFImage(DMResource *fp, DMImage **pimg); 164 int dmReadIFFImage(DMResource *fp, DMImage **pimg);
164 int dmWriteIFFImage(DMResource *fp, const DMImage *img, const DMImageWriteSpec *spec); 165 int dmWriteIFFImage(DMResource *fp, const DMImage *img, const DMImageWriteSpec *spec);
165 166
166 167
168 //
169 // Simplistic bitstream reading and writing
170 //
167 typedef struct _DMBitStreamContext 171 typedef struct _DMBitStreamContext
168 { 172 {
169 void *handle; 173 void *handle;
170 174
171 int (*putByte)(struct _DMBitStreamContext *ctx); 175 int (*putByte)(struct _DMBitStreamContext *ctx);