annotate tools/lib64util.h @ 2208:90ec1ec89c56

Revamp the palette handling in lib64gfx somewhat, add helper functions to lib64util for handling external palette file options and add support for specifying one of the "internal" palettes or external (.act) palette file to gfxconv and 64vw.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 14 Jun 2019 05:01:12 +0300
parents cbac4912992c
children f808d3483d4b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2204
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Common utility functions for gfxconv and 64vw
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * Programmed and designed by Matti 'ccr' Hamalainen
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * (C) Copyright 2019 Tecnic Software productions (TNSP)
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 *
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 * Please read file 'COPYING' for information on license and distribution.
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 */
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #ifndef LIB64UTIL_H
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #define LIB64UTIL_H 1
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 #include "lib64gfx.h"
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 #ifdef __cplusplus
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 extern "C" {
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #endif
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 // Define default character ROM path
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 #ifndef DM_DEF_CHARGEN
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 #define DM_DEF_CHARGEN "/usr/local/lib64/vice/C64/chargen"
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 #endif
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng);
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 void dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt, const char *indent);
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29
2208
90ec1ec89c56 Revamp the palette handling in lib64gfx somewhat, add helper functions to
Matti Hamalainen <ccr@tnsp.org>
parents: 2204
diff changeset
30 BOOL argHandleC64PaletteOption(char *optArg, DMC64Palette **ppal, char **palFile);
90ec1ec89c56 Revamp the palette handling in lib64gfx somewhat, add helper functions to
Matti Hamalainen <ccr@tnsp.org>
parents: 2204
diff changeset
31 int dmHandleExternalPalette(const char *filename, DMPalette **ppal);
90ec1ec89c56 Revamp the palette handling in lib64gfx somewhat, add helper functions to
Matti Hamalainen <ccr@tnsp.org>
parents: 2204
diff changeset
32
90ec1ec89c56 Revamp the palette handling in lib64gfx somewhat, add helper functions to
Matti Hamalainen <ccr@tnsp.org>
parents: 2204
diff changeset
33
2204
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #ifdef __cplusplus
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 }
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 #endif
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
cbac4912992c Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 #endif // LIB64UTIL_H