Mercurial > hg > dmlib
comparison tools/64vw.c @ 2242:65a2c2e99c81
Move listing of C64 formats function to argShowC64Formats in lib64util.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 15 Jun 2019 07:55:26 +0300 |
parents | 5db6e0b63b35 |
children | 79ece1072143 |
comparison
equal
deleted
inserted
replaced
2241:587eb90459f9 | 2242:65a2c2e99c81 |
---|---|
55 optScrWidth = (int) ((float) D64_SCR_WIDTH * factor * D64_SCR_PAR_XY); | 55 optScrWidth = (int) ((float) D64_SCR_WIDTH * factor * D64_SCR_PAR_XY); |
56 optScrHeight = (int) ((float) D64_SCR_HEIGHT * factor); | 56 optScrHeight = (int) ((float) D64_SCR_HEIGHT * factor); |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 void argShowFormats() | |
61 { | |
62 printf( | |
63 "Available C64 bitmap formats (-f <frmt>):\n" | |
64 " frmt | Type | Description\n" | |
65 "------+-----------------+-------------------------------------\n" | |
66 ); | |
67 for (int i = 0; i < ndmC64ImageFormats; i++) | |
68 { | |
69 const DMC64ImageFormat *fmt = dmC64ImageFormatsSorted[i]; | |
70 char buf[64]; | |
71 printf("%-6s| %-15s | %s%s\n", | |
72 fmt->fext, | |
73 dmC64GetImageTypeString(buf, sizeof(buf), fmt->format->type, FALSE), | |
74 fmt->name, | |
75 fmt->flags & DM_FMT_BROKEN ? " [BROKEN]" : ""); | |
76 } | |
77 printf("%d formats supported.\n", ndmC64ImageFormats); | |
78 } | |
79 | |
80 | |
81 void argShowHelp() | 60 void argShowHelp() |
82 { | 61 { |
83 dmPrintBanner(stdout, dmProgName, "[options] <input image file>"); | 62 dmPrintBanner(stdout, dmProgName, "[options] <input image file>"); |
84 dmArgsPrintHelp(stdout, optList, optListN, 0); | 63 dmArgsPrintHelp(stdout, optList, optListN, 0); |
85 | 64 |
149 return FALSE; | 128 return FALSE; |
150 } | 129 } |
151 break; | 130 break; |
152 | 131 |
153 case 5: | 132 case 5: |
154 argShowFormats(); | 133 argShowC64Formats(stdout, FALSE); |
155 exit(0); | 134 exit(0); |
156 break; | 135 break; |
157 | 136 |
158 case 7: | 137 case 7: |
159 optListOnly = TRUE; | 138 optListOnly = TRUE; |