Mercurial > hg > dmlib
comparison tools/gfxconv.c @ 860:daebbf28953d
The argument handling API in dmargs* was synced with th-libs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 22 Nov 2014 18:50:07 +0200 |
parents | ca5b4696be21 |
children | 56e12109b936 |
comparison
equal
deleted
inserted
replaced
859:55a3d6db20ac | 860:daebbf28953d |
---|---|
147 .interleave = FALSE, | 147 .interleave = FALSE, |
148 .paletted = FALSE, | 148 .paletted = FALSE, |
149 .format = 0, | 149 .format = 0, |
150 }; | 150 }; |
151 | 151 |
152 static DMOptArg optList[] = | 152 static const DMOptArg optList[] = |
153 { | 153 { |
154 { 0, '?', "help", "Show this help", OPT_NONE }, | 154 { 0, '?', "help", "Show this help", OPT_NONE }, |
155 { 15, 'v', "verbose", "Increase verbosity", OPT_NONE }, | 155 { 15, 'v', "verbose", "Increase verbosity", OPT_NONE }, |
156 { 3, 'o', "output", "Output filename", OPT_ARGREQ }, | 156 { 3, 'o', "output", "Output filename", OPT_ARGREQ }, |
157 { 1, 'i', "informat", "Set input format (sprite[:mc:sc], char[:mc|sc], bitmap[:<bformat>], image)", OPT_ARGREQ }, | 157 { 1, 'i', "informat", "Set input format (sprite[:mc:sc], char[:mc|sc], bitmap[:<bformat>], image)", OPT_ARGREQ }, |
215 | 215 |
216 | 216 |
217 void argShowHelp() | 217 void argShowHelp() |
218 { | 218 { |
219 dmPrintBanner(stdout, dmProgName, "[options] <input file>"); | 219 dmPrintBanner(stdout, dmProgName, "[options] <input file>"); |
220 dmArgsPrintHelp(stdout, optList, optListN); | 220 dmArgsPrintHelp(stdout, optList, optListN, 0); |
221 | 221 |
222 printf( | 222 printf( |
223 "\n" | 223 "\n" |
224 "Palette / color remapping (-R)\n" | 224 "Palette / color remapping (-R)\n" |
225 "------------------------------\n" | 225 "------------------------------\n" |
1545 | 1545 |
1546 // Initialize and parse commandline | 1546 // Initialize and parse commandline |
1547 dmInitProg("gfxconv", "Simple graphics converter", "0.80", NULL, NULL); | 1547 dmInitProg("gfxconv", "Simple graphics converter", "0.80", NULL, NULL); |
1548 | 1548 |
1549 if (!dmArgsProcess(argc, argv, optList, optListN, | 1549 if (!dmArgsProcess(argc, argv, optList, optListN, |
1550 argHandleOpt, argHandleFile, TRUE)) | 1550 argHandleOpt, argHandleFile, OPTH_BAILOUT)) |
1551 exit(1); | 1551 exit(1); |
1552 | 1552 |
1553 #ifndef DM_USE_LIBPNG | 1553 #ifndef DM_USE_LIBPNG |
1554 if (optOutFormat == IMGFMT_PNG) | 1554 if (optOutFormat == IMGFMT_PNG) |
1555 { | 1555 { |