comparison tools/lib64gfx.h @ 2586:9807ae37ad69

Require stdbool.h, we require C11 now.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 08 Dec 2022 15:59:22 +0200
parents c6ee41fd98dd
children 0d6aa5cae517
comparison
equal deleted inserted replaced
2585:ef6c826c5b7a 2586:9807ae37ad69
190 DMC64Palette *cpal; // If DMC64ImageConvSpec::pal == NULL, use this C64 palette 190 DMC64Palette *cpal; // If DMC64ImageConvSpec::pal == NULL, use this C64 palette
191 191
192 /* 192 /*
193 // XXX These are not actually used yet (if ever) 193 // XXX These are not actually used yet (if ever)
194 int dither; // Dither mode (D64_DITH_*) 194 int dither; // Dither mode (D64_DITH_*)
195 BOOL aspect; // Render using pixel aspectX/aspectY, FALSE = par=1:1 195 bool aspect; // Render using pixel aspectX/aspectY, false = par=1:1
196 */ 196 */
197 } DMC64ImageConvSpec; 197 } DMC64ImageConvSpec;
198 198
199 199
200 typedef struct 200 typedef struct
388 // 388 //
389 // Miscellaneous functions 389 // Miscellaneous functions
390 // 390 //
391 int dmC64ProbeBMP(const DMGrowBuf *buf, const DMC64ImageFormat **fmt); 391 int dmC64ProbeBMP(const DMGrowBuf *buf, const DMC64ImageFormat **fmt);
392 392
393 int dmC64PaletteFromC64Palette(DMPalette **ppal, const DMC64Palette *cpal, const BOOL mixed); 393 int dmC64PaletteFromC64Palette(DMPalette **ppal, const DMC64Palette *cpal, const bool mixed);
394 int dmC64SetImagePalette(DMImage *img, const DMC64ImageConvSpec *spec, const BOOL mixed); 394 int dmC64SetImagePalette(DMImage *img, const DMC64ImageConvSpec *spec, const bool mixed);
395 395
396 BOOL dmCompareAddr16(const DMGrowBuf *buf, const size_t offs, const Uint16 addr); 396 bool dmCompareAddr16(const DMGrowBuf *buf, const size_t offs, const Uint16 addr);
397 397
398 int dmC64MemBlockAlloc(DMC64MemBlock *blk, const size_t size); 398 int dmC64MemBlockAlloc(DMC64MemBlock *blk, const size_t size);
399 int dmC64MemBlockCopy(DMC64MemBlock *dst, const DMC64MemBlock *src); 399 int dmC64MemBlockCopy(DMC64MemBlock *dst, const DMC64MemBlock *src);
400 void dmC64MemBlockFree(DMC64MemBlock *blk); 400 void dmC64MemBlockFree(DMC64MemBlock *blk);
401 401
405 405
406 406
407 // Encoding and decoding of formats and images 407 // Encoding and decoding of formats and images
408 int dmC64ConvertCSDataToImage(DMImage *img, 408 int dmC64ConvertCSDataToImage(DMImage *img,
409 const int xoffs, const int yoffs, const Uint8 *buf, 409 const int xoffs, const int yoffs, const Uint8 *buf,
410 const int width, const int height, const BOOL multicolor, 410 const int width, const int height, const bool multicolor,
411 const int *colors); 411 const int *colors);
412 412
413 const char *dmC64GetOpSubjectName(const int subject); 413 const char *dmC64GetOpSubjectName(const int subject);
414 const DMC64MemBlock * dmC64GetOpMemBlock(const DMC64Image *img, const int subject, const int bank); 414 const DMC64MemBlock * dmC64GetOpMemBlock(const DMC64Image *img, const int subject, const int bank);
415 int dmC64SanityCheckEncDecOp(const int i, const DMC64EncDecOp *op, const DMC64Image *img); 415 int dmC64SanityCheckEncDecOp(const int i, const DMC64EncDecOp *op, const DMC64Image *img);
418 size_t dmC64GetSubjectSize(const int subject, const DMC64ImageCommonFormat *fmt); 418 size_t dmC64GetSubjectSize(const int subject, const DMC64ImageCommonFormat *fmt);
419 size_t dmC64GetOpSubjectSize(const DMC64EncDecOp *op, const DMC64ImageCommonFormat *fmt); 419 size_t dmC64GetOpSubjectSize(const DMC64EncDecOp *op, const DMC64ImageCommonFormat *fmt);
420 420
421 421
422 int dmC64DecodeGenericBMP(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt); 422 int dmC64DecodeGenericBMP(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt);
423 int dmC64EncodeGenericBMP(const BOOL allocate, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt); 423 int dmC64EncodeGenericBMP(const bool allocate, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt);
424 424
425 int dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageConvSpec *spec); 425 int dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageConvSpec *spec);
426 int dmC64ConvertImage2BMP(DMC64Image **pdst, const DMImage *src, const DMC64ImageFormat *fmt, const DMC64ImageConvSpec *spec); 426 int dmC64ConvertImage2BMP(DMC64Image **pdst, const DMImage *src, const DMC64ImageFormat *fmt, const DMC64ImageConvSpec *spec);
427 427
428 int dmC64DecodeBMP(DMC64Image **img, const DMGrowBuf *buf, ssize_t probeOffs, ssize_t dataOffs, const DMC64ImageFormat **fmt, const DMC64ImageFormat *forced); 428 int dmC64DecodeBMP(DMC64Image **img, const DMGrowBuf *buf, ssize_t probeOffs, ssize_t dataOffs, const DMC64ImageFormat **fmt, const DMC64ImageFormat *forced);