Mercurial > hg > dmlib
comparison tools/lib64gfx.h @ 922:658bf4c452d0
Comments, cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 25 Feb 2015 14:30:19 +0200 |
parents | 2454ddb7363f |
children | 0f477446448d |
comparison
equal
deleted
inserted
replaced
921:2454ddb7363f | 922:658bf4c452d0 |
---|---|
48 #define C64_MAX_COLORS 16 | 48 #define C64_MAX_COLORS 16 |
49 #define C64_VIDBANK_SIZE (16*1024) | 49 #define C64_VIDBANK_SIZE (16*1024) |
50 #define C64_MAX_SPRITES (C64_VIDBANK_SIZE / C64_SPR_SIZE) | 50 #define C64_MAX_SPRITES (C64_VIDBANK_SIZE / C64_SPR_SIZE) |
51 #define C64_MAX_CHARS 256 | 51 #define C64_MAX_CHARS 256 |
52 | 52 |
53 | |
53 // Different supported C64 bitmap "modes" | 54 // Different supported C64 bitmap "modes" |
54 enum | 55 enum |
55 { | 56 { |
56 D64_FMT_HIRES = 0x0000, | 57 D64_FMT_HIRES = 0x0000, |
57 D64_FMT_MC = 0x0001, | 58 D64_FMT_MC = 0x0001, |
124 | 125 |
125 | 126 |
126 | 127 |
127 typedef struct | 128 typedef struct |
128 { | 129 { |
129 int type, // Image type (D64_FMT_*) | 130 int type, // Image type (D64_FMT_*) |
130 fliType, // FLI type (if FLI used) | 131 fliType, // FLI type (if FLI used) |
131 laceType, // Interlace type (D64_ILACE_*) | 132 laceType, // Interlace type (D64_ILACE_*) |
132 laceBank1, | 133 laceBank1, // Interlace video bank indices |
133 laceBank2; | 134 laceBank2; |
134 | 135 |
135 Uint8 | 136 Uint8 |
136 color[C64_SCR_MAX_BANK][C64_SCR_COLOR_SIZE], | 137 color[C64_SCR_MAX_BANK][C64_SCR_COLOR_SIZE], |
137 bitmap[C64_SCR_MAX_BANK][C64_SCR_BITMAP_SIZE], | 138 bitmap[C64_SCR_MAX_BANK][C64_SCR_BITMAP_SIZE], |
177 #define D64_MAX_ENCDEC_OPS 16 | 178 #define D64_MAX_ENCDEC_OPS 16 |
178 | 179 |
179 | 180 |
180 typedef struct _DMC64ImageFormat | 181 typedef struct _DMC64ImageFormat |
181 { | 182 { |
182 int type; | 183 int type; // Type flags, see D64_FMT_* |
183 char *fext; | 184 char *fext; // Filename extension |
184 char *name; | 185 char *name; // Format description/name |
186 | |
185 size_t addr; // Loading address (0 if no loading address) | 187 size_t addr; // Loading address (0 if no loading address) |
186 size_t size; // Size, including loading address. Only used in encoding, if even there (0 if no static size) | 188 size_t size; // Size, including loading address. Only used in encoding, if even there (0 if no static size) |
187 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); | 189 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); |
188 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); | 190 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); |
189 int (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt); | 191 int (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt); |