view 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
line wrap: on
line source

/*
 * Common utility functions for gfxconv and 64vw
 * Programmed and designed by Matti 'ccr' Hamalainen
 * (C) Copyright 2019-2021 Tecnic Software productions (TNSP)
 *
 * Please read file 'COPYING' for information on license and distribution.
 */
#ifndef LIB64UTIL_H
#define LIB64UTIL_H 1

#include "lib64gfx.h"

#ifdef __cplusplus
extern "C" {
#endif


//
// Global variables
//

// Some C64 palettes
extern DMC64Palette      dmC64DefaultPalettes[];
extern const int         ndmC64DefaultPalettes;


//
// Functions
//
char *    dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng);
void      dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt, const char *indent);

void      argShowC64PaletteHelp(FILE *fh);
void      argShowC64Formats(FILE *fh, const BOOL rw, const BOOL verbose);
BOOL      argHandleC64PaletteOption(char *optArg, DMC64Palette **ppal, char **palFile);

int       dmHandleExternalPalette(const char *filename, DMPalette **ppal);

const char *dmGetChargenROMPath();


#ifdef __cplusplus
}
#endif

#endif // LIB64UTIL_H