Mercurial > hg > dmlib
annotate tools/lib64util.h @ 2571:bb44c48cffac
Add helper function for getting C64 chargen ROM path from environment
variable 'CHARGEN_ROM' and use it instead of the compile-time hardcoded
value.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 02 Mar 2022 23:23:05 +0200 |
parents | c6ee41fd98dd |
children | 9807ae37ad69 |
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 |
2539 | 4 * (C) Copyright 2019-2021 Tecnic Software productions (TNSP) |
2204
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 |
2379 | 18 // |
2380
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
19 // Global variables |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
20 // |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
21 |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
22 // Some C64 palettes |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
23 extern DMC64Palette dmC64DefaultPalettes[]; |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
24 extern const int ndmC64DefaultPalettes; |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
25 |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
26 |
89cb93184175
Move dmC64DefaultPalettes from lib64gfx to lib64util.
Matti Hamalainen <ccr@tnsp.org>
parents:
2379
diff
changeset
|
27 // |
2379 | 28 // Functions |
29 // | |
2204
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 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
|
31 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
|
32 |
2263 | 33 void argShowC64PaletteHelp(FILE *fh); |
2515
a40de347fcb0
Make c64 formats listing (optionally) more verbose. Handle --help a bit
Matti Hamalainen <ccr@tnsp.org>
parents:
2380
diff
changeset
|
34 void argShowC64Formats(FILE *fh, const BOOL rw, const BOOL verbose); |
2241 | 35 BOOL argHandleC64PaletteOption(char *optArg, DMC64Palette **ppal, char **palFile); |
2204
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 |
2241 | 37 int dmHandleExternalPalette(const char *filename, DMPalette **ppal); |
2208
90ec1ec89c56
Revamp the palette handling in lib64gfx somewhat, add helper functions to
Matti Hamalainen <ccr@tnsp.org>
parents:
2204
diff
changeset
|
38 |
2571
bb44c48cffac
Add helper function for getting C64 chargen ROM path from environment
Matti Hamalainen <ccr@tnsp.org>
parents:
2539
diff
changeset
|
39 const char *dmGetChargenROMPath(); |
bb44c48cffac
Add helper function for getting C64 chargen ROM path from environment
Matti Hamalainen <ccr@tnsp.org>
parents:
2539
diff
changeset
|
40 |
2208
90ec1ec89c56
Revamp the palette handling in lib64gfx somewhat, add helper functions to
Matti Hamalainen <ccr@tnsp.org>
parents:
2204
diff
changeset
|
41 |
2204
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 #ifdef __cplusplus |
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 } |
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 #endif |
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 |
cbac4912992c
Add new module "lib64util", and move some functions there from lib64gfx
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 #endif // LIB64UTIL_H |