# HG changeset patch # User Matti Hamalainen # Date 1543314066 -7200 # Node ID 4109967ef832505dce8626492acc05d98584f80e # Parent 8a9ef75fd3cd223befdbf824e99c594144d4b905# Parent 2b961e6b35e5890b8dceaaefc83d5226957a0e12 Merge. diff -r 8a9ef75fd3cd -r 4109967ef832 README.txt --- a/README.txt Tue Nov 27 12:20:51 2018 +0200 +++ b/README.txt Tue Nov 27 12:21:06 2018 +0200 @@ -264,13 +264,13 @@ Single color C64 char font to PNG image conversion: -$ gfxconv chars1.fnt -i chr:sc -s 2 -S 4 -c 255,1 -n 256 -o chars1.png +$ gfxconv chars1.fnt -i chr:sc -s 2 -S 4 -m 255,1 -n 256 -o chars1.png - Input file is "chars1.fnt" - "-i chr:sc" specifies that input is interpreted as single color chars. - "-s 2" skips first two bytes of the input file (loading address) - "-S 4" scales output image to be 5 times larger - - "-c 255,1" defines background color (bit value 0) to be transparent + - "-m 255,1" defines background color (bit value 0) to be transparent (255, only works for PNG) and foreground to be C64 color 1 (white) - "-n 256" specifies that up to 256 items (characters) worth of data from input will be processed. @@ -284,7 +284,7 @@ Extract sprites from a C64 memory dump, convert to PNG: $ gfxconv bub_dump.raw -i spr:mc -s 0x5800 -n 20 -f png -o bub \ - -q -S 3 -c 255:2:5:1 + -q -S 3 -m 255:2:5:1 - Input file "bub_dump.raw" is a raw memory dump of Bubble Bobble extracted via VICE in game running mode. @@ -296,7 +296,7 @@ does not specify a filename extension. - "-o bub" sets filename prefix to "bub" - "-q" selects sequential output (separate files) - - "-c 255:2:5:1" sets the multicolor color mappings + - "-m 255:2:5:1" sets the multicolor color mappings (255 is the transparency color again) diff -r 8a9ef75fd3cd -r 4109967ef832 tools/gfxconv.c --- a/tools/gfxconv.c Tue Nov 27 12:20:51 2018 +0200 +++ b/tools/gfxconv.c Tue Nov 27 12:21:06 2018 +0200 @@ -146,7 +146,7 @@ { 5, 'f', "format", "Set output format (spr[:mc|sc], chr[:mc|sc] or any supported image or C64 bitmap format, see --formats)", OPT_ARGREQ }, { 17, 'F', "formats", "List supported input/output formats", OPT_NONE }, { 8, 'q', "sequential", "Output sequential files (image output only)", OPT_NONE }, - { 6, 'c', "colormap", "Set color mapping (see below for information)", OPT_ARGREQ }, + { 6, 'm', "colormap", "Set color index mapping (see below for information)", OPT_ARGREQ }, { 7, 'n', "numitems", "How many 'items' to output (default: all)", OPT_ARGREQ }, { 11, 'w', "width", "Item width (number of items per row, min 1)", OPT_ARGREQ }, { 9, 'S', "scale", "Scale output image by , :, :* integer factor(s). " @@ -230,12 +230,12 @@ "unused colors from the palette. This is not usually desirable, for example\n" "when converting multiple images to same palette.\n" "\n" - "Color mapping (-c)\n" - "------------------\n" + "Color index mapping (-m)\n" + "------------------------\n" "Color mapping definitions are used for ANSI and image output, to declare what\n" "output colors of the C64 palette are used for each single color/multi color\n" "bit-combination. For example, if the input is multi color sprite or char,\n" - "you can define colors like: -c 0,8,3,15 .. for single color: -c 0,1\n" + "you can define colors like: -m 0,8,3,15 .. for single color: -m 0,1\n" "The numbers are palette indexes, and the order is for bit(pair)-values\n" "00, 01, 10, 11 (multi color) and 0, 1 (single color). NOTICE! 255 is the\n" "special transparency color index.\n" @@ -691,10 +691,10 @@ { int index, ncolors; if (!dmParseMapOptionString(optArg, optColorMap, - &ncolors, C64_NCOLORS, FALSE, "color table option")) + &ncolors, C64_NCOLORS, FALSE, "color index option")) return FALSE; - dmMsg(1, "Set color mapping: "); + dmMsg(1, "Set color index mapping: "); for (index = 0; index < ncolors; index++) { dmPrint(1, "[%d:%d]%s",