comparison tools/gfxconv.c @ 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 d75431bf1a7d
children 9807ae37ad69
comparison
equal deleted inserted replaced
2570:1559011d749f 2571:bb44c48cffac
152 optScaleMode = SCALE_AUTO; 152 optScaleMode = SCALE_AUTO;
153 float optRemapMaxDist = -1; 153 float optRemapMaxDist = -1;
154 int optRemapNoMatchColor = -1; 154 int optRemapNoMatchColor = -1;
155 DMMapValue optRemapTable[DM_MAX_COLORS]; 155 DMMapValue optRemapTable[DM_MAX_COLORS];
156 int optColorMap[D64_NCOLORS]; 156 int optColorMap[D64_NCOLORS];
157 char *optCharROMFilename = NULL; 157 const char *optCharROMFilename = NULL;
158 DMC64Palette *optC64Palette = NULL; 158 DMC64Palette *optC64Palette = NULL;
159 char *optPaletteFile = NULL; 159 char *optPaletteFile = NULL;
160 DMPalette *optPaletteData = NULL; 160 DMPalette *optPaletteData = NULL;
161 161
162 162
246 fprintf(stdout, 246 fprintf(stdout,
247 "\n" 247 "\n"
248 "Default C64 character ROM file for this build is:\n" 248 "Default C64 character ROM file for this build is:\n"
249 "%s\n" 249 "%s\n"
250 "\n", 250 "\n",
251 DM_DEF_CHARGEN 251 dmGetChargenROMPath()
252 ); 252 );
253 } 253 }
254 254
255 255
256 const char * argGetHelpTopic(const int opt) 256 const char * argGetHelpTopic(const int opt)
3008 if ((inC64Image->extraInfo[D64_EI_MODE] & D64_FMT_CHAR) && 3008 if ((inC64Image->extraInfo[D64_EI_MODE] & D64_FMT_CHAR) &&
3009 inC64Image->charData[0].data == NULL) 3009 inC64Image->charData[0].data == NULL)
3010 { 3010 {
3011 // Check character ROM filename 3011 // Check character ROM filename
3012 if (optCharROMFilename == NULL) 3012 if (optCharROMFilename == NULL)
3013 optCharROMFilename = DM_DEF_CHARGEN; 3013 optCharROMFilename = dmGetChargenROMPath();
3014 3014
3015 // Attempt to read character ROM 3015 // Attempt to read character ROM
3016 dmMsg(1, "Using character ROM file '%s'.\n", 3016 dmMsg(1, "Using character ROM file '%s'.\n",
3017 optCharROMFilename); 3017 optCharROMFilename);
3018 3018