comparison tools/lib64gfx.h @ 2590:0d6aa5cae517

Just syncing some garbage in, no functional changes.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 13 Dec 2022 10:09:40 +0200
parents 9807ae37ad69
children f2fffa7b9137
comparison
equal deleted inserted replaced
2589:ba0f55e2f877 2590:0d6aa5cae517
106 D64_EI_CHAR_CASE, // [CHAR] 0 = upper case, != lower case 106 D64_EI_CHAR_CASE, // [CHAR] 0 = upper case, != lower case
107 D64_EI_CHAR_CUSTOM, // [CHAR] 0 = ROM charset, != custom charset 107 D64_EI_CHAR_CUSTOM, // [CHAR] 0 = ROM charset, != custom charset
108 108
109 D64_EI_FLI_TYPE, // FLI type (see D64_FLI_*) 109 D64_EI_FLI_TYPE, // FLI type (see D64_FLI_*)
110 D64_EI_ILACE_TYPE, // Interlace type (see D64_ILACE_*) 110 D64_EI_ILACE_TYPE, // Interlace type (see D64_ILACE_*)
111 }; 111
112 112 D64_EI_SPRBG_PRIORITY, // Sprite/background priority for 8 sprites (like $d01b)
113
114 // Image <-> bitmap conversion dithering
115 enum
116 {
117 D64_DITH_NONE = 0, // No dithering
118 }; 113 };
119 114
120 115
121 // Different enc/dec operation types (op->type) 116 // Different enc/dec operation types (op->type)
122 enum 117 enum
187 typedef struct 182 typedef struct
188 { 183 {
189 DMPalette *pal; // Use this palette custom palette if != NULL 184 DMPalette *pal; // Use this palette custom palette if != NULL
190 DMC64Palette *cpal; // If DMC64ImageConvSpec::pal == NULL, use this C64 palette 185 DMC64Palette *cpal; // If DMC64ImageConvSpec::pal == NULL, use this C64 palette
191 186
192 /* 187 int xoffs, yoffs; // X/Y offsets in destination image
188 int width, height; // Destination width/height (0 = use src)
189
193 // XXX These are not actually used yet (if ever) 190 // XXX These are not actually used yet (if ever)
194 int dither; // Dither mode (D64_DITH_*) 191 bool borders; // Render borders (overrides width/height & aspect settings)
195 bool aspect; // Render using pixel aspectX/aspectY, false = par=1:1 192 bool aspect; // Render using pixel aspectX/aspectY, false = par=1:1
196 */
197 } DMC64ImageConvSpec; 193 } DMC64ImageConvSpec;
198 194
199 195
200 typedef struct 196 typedef struct
201 { 197 {
211 int color; // Color 207 int color; // Color
212 int sprnum; // Physical sprite number for priority checking 208 int sprnum; // Physical sprite number for priority checking
213 209
214 Uint8 *data; // "const" pointer to sprite data, do not deallocate 210 Uint8 *data; // "const" pointer to sprite data, do not deallocate
215 } DMC64Sprite; 211 } DMC64Sprite;
212
213
214 typedef struct
215 {
216 int xc, yc; // Sprite coordinates (XXX TODO: borders etc.)
217 int flags; // D64_SPRF_* flags
218 int color; // Color
219 int sprnum; // Physical sprite number for priority checking
220
221 int sprindex; // Index in "bank"
222 int bank; // "Bank" of extraData where the data resides
223 } DMC64SpriteDef;
216 224
217 225
218 typedef struct _DMC64ImageCommonFormat DMC64ImageCommonFormat; 226 typedef struct _DMC64ImageCommonFormat DMC64ImageCommonFormat;
219 typedef struct _DMC64ImageFormat DMC64ImageFormat; 227 typedef struct _DMC64ImageFormat DMC64ImageFormat;
220 228
236 Uint8 d020, bgcolor, d022, d023, d024; 244 Uint8 d020, bgcolor, d022, d023, d024;
237 245
238 // Extra data areas used by some formats, 246 // Extra data areas used by some formats,
239 // for example raster colours might be stored 247 // for example raster colours might be stored
240 DMC64MemBlock extraData[D64_MAX_EXTRA_DATA]; 248 DMC64MemBlock extraData[D64_MAX_EXTRA_DATA];
249
250 // Sprites
251 int nsprites;
252 DMC64Sprite *sprites;
241 253
242 // Extra information / settings 254 // Extra information / settings
243 // See D64_EI_* constants. 255 // See D64_EI_* constants.
244 int extraInfo[D64_MAX_EXTRA_INFO]; 256 int extraInfo[D64_MAX_EXTRA_INFO];
245 } DMC64Image; 257 } DMC64Image;