Mercurial > hg > dmlib
comparison tools/lib64gfx.h @ 2201:9f3fb4004c20
Improvements to the lib64gfx palette handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 Jun 2019 00:42:36 +0300 |
parents | dcd26cdc395e |
children | b259312ddb59 |
comparison
equal
deleted
inserted
replaced
2200:dcd26cdc395e | 2201:9f3fb4004c20 |
---|---|
151 }; | 151 }; |
152 | 152 |
153 | 153 |
154 typedef struct | 154 typedef struct |
155 { | 155 { |
156 char *name; | |
157 DMColor colors[D64_NCOLORS]; | |
158 } DMC64Palette; | |
159 | |
160 | |
161 typedef struct | |
162 { | |
156 int dither; // Dither mode (D64_DITH_*) | 163 int dither; // Dither mode (D64_DITH_*) |
157 BOOL aspect; // Correct pixel aspect ratio? | 164 BOOL aspect; // Correct pixel aspect ratio? |
165 | |
166 DMPalette *pal; // Use this palette | |
167 DMC64Palette *cpal; // If ^pal == NULL, use this C64 palette | |
158 } DMC64ImageConvSpec; | 168 } DMC64ImageConvSpec; |
159 | 169 |
160 | 170 |
161 typedef struct | 171 typedef struct |
162 { | 172 { |
163 Uint8 *data; | 173 Uint8 *data; |
164 size_t size; | 174 size_t size; |
165 } DMC64MemBlock; | 175 } DMC64MemBlock; |
166 | |
167 | |
168 typedef struct | |
169 { | |
170 char *name; | |
171 DMColor colors[D64_NCOLORS]; | |
172 } DMC64Palette; | |
173 | 176 |
174 | 177 |
175 typedef struct | 178 typedef struct |
176 { | 179 { |
177 BOOL multicolor, xexpand, yexpand; | 180 BOOL multicolor, xexpand, yexpand; |
355 int dmC64ProbeBMP(const DMGrowBuf *buf, const DMC64ImageFormat **fmt); | 358 int dmC64ProbeBMP(const DMGrowBuf *buf, const DMC64ImageFormat **fmt); |
356 | 359 |
357 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng); | 360 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng); |
358 void dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt, const char *indent); | 361 void dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt, const char *indent); |
359 | 362 |
360 int dmSetDefaultC64Palette(DMImage *img); | 363 int dmC64SetImagePalette(DMImage *img, const DMC64Palette *cpal, const BOOL mixed); |
361 int dmSetMixedColorC64Palette(DMImage *img); | |
362 | 364 |
363 BOOL dmCompareAddr16(const DMGrowBuf *buf, const size_t offs, const Uint16 addr); | 365 BOOL dmCompareAddr16(const DMGrowBuf *buf, const size_t offs, const Uint16 addr); |
364 int dmC64ImageGetNumBlocks(const DMC64ImageFormat *fmt); | 366 int dmC64ImageGetNumBlocks(const DMC64ImageFormat *fmt); |
365 | 367 |
366 // C64 bitmap image allocation/freeing | 368 // C64 bitmap image allocation/freeing |