Mercurial > hg > dmlib
comparison tools/lib64gfx.h @ 1934:23a344b5e4f1
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 28 Jun 2018 19:37:57 +0300 |
parents | c5a46cb4cce5 |
children | 489dde33f6b6 |
comparison
equal
deleted
inserted
replaced
1933:c5a46cb4cce5 | 1934:23a344b5e4f1 |
---|---|
143 int color, xc, yc; | 143 int color, xc, yc; |
144 Uint8 data[C64_SPR_HEIGHT_UT][C64_SPR_WIDTH_UT]; | 144 Uint8 data[C64_SPR_HEIGHT_UT][C64_SPR_WIDTH_UT]; |
145 } DMC64Sprite; | 145 } DMC64Sprite; |
146 | 146 |
147 | 147 |
148 typedef struct _DMC64ImageCommonFormat DMC64ImageCommonFormat; | |
149 typedef struct _DMC64ImageFormat DMC64ImageFormat; | |
150 | |
151 | |
148 typedef struct _DMC64Image | 152 typedef struct _DMC64Image |
149 { | 153 { |
150 int type, // Image type (D64_FMT_*) | 154 int type, // Image type (D64_FMT_*) |
151 laceType, // Interlace type (D64_ILACE_*) | 155 laceType, // Interlace type (D64_ILACE_*) |
152 nbanks; | 156 nbanks; |
171 | 175 |
172 //DMC64Sprite sprites[C64_MAX_SPRITES]; | 176 //DMC64Sprite sprites[C64_MAX_SPRITES]; |
173 } DMC64Image; | 177 } DMC64Image; |
174 | 178 |
175 | 179 |
176 typedef Uint8 (*DMC64GetPixelFunc)( | |
177 const DMC64Image *img, const int bmoffs, const int scroffs, | |
178 const int vshift, const int vbitmap, const int rasterX, const int rasterY); | |
179 | |
180 #define D64_MAX_ENCDEC_OPS 64 | |
181 | |
182 | |
183 typedef struct _DMC64ImageFormat DMC64ImageFormat; | |
184 | |
185 | |
186 typedef struct _DMC64EncDecOp | 180 typedef struct _DMC64EncDecOp |
187 { | 181 { |
188 int type; // Operation type (DO_*) | 182 int type; // Operation type (DO_*) |
189 int subject; // Operation "subject" (DS_*) | 183 int subject; // Operation "subject" (DS_*) |
190 | 184 |
196 BOOL (*decFunction)(DMC64Image *img, const struct _DMC64EncDecOp *op, const DMGrowBuf *buf, const DMC64ImageFormat *fmt); | 190 BOOL (*decFunction)(DMC64Image *img, const struct _DMC64EncDecOp *op, const DMGrowBuf *buf, const DMC64ImageFormat *fmt); |
197 BOOL (*encFunction)(const struct _DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt); | 191 BOOL (*encFunction)(const struct _DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt); |
198 } DMC64EncDecOp; | 192 } DMC64EncDecOp; |
199 | 193 |
200 | 194 |
195 #define D64_MAX_ENCDEC_OPS 64 | |
201 typedef DMC64EncDecOp DMC64EncDecOpList[D64_MAX_ENCDEC_OPS]; | 196 typedef DMC64EncDecOp DMC64EncDecOpList[D64_MAX_ENCDEC_OPS]; |
202 | 197 |
203 | 198 |
204 typedef struct | 199 typedef Uint8 (*DMC64GetPixelFunc)( |
200 const DMC64Image *img, const int bmoffs, const int scroffs, | |
201 const int vshift, const int vbitmap, const int rasterX, const int rasterY); | |
202 | |
203 | |
204 typedef struct _DMC64ImageCommonFormat | |
205 { | 205 { |
206 int type; // Type flags, see D64_FMT_* | 206 int type; // Type flags, see D64_FMT_* |
207 int width, height; // Width and height in pixels | 207 int width, height; // Width and height in pixels |
208 int chWidth, chHeight; // Width and height in charblocks | 208 int chWidth, chHeight; // Width and height in charblocks |
209 | 209 |