@@ -214,6 +214,7 @@ namespace
214
214
{ L" dword" , OPT_DDS_DWORD_ALIGN },
215
215
{ L" dx10" , OPT_USE_DX10 },
216
216
{ L" dx9" , OPT_USE_DX9 },
217
+ { L" tga20" , OPT_TGA20 },
217
218
{ L" wicq" , OPT_WIC_QUALITY },
218
219
{ L" nologo" , OPT_NOLOGO },
219
220
{ L" sepalpha" , OPT_SEPALPHA },
@@ -235,7 +236,6 @@ namespace
235
236
{ L" nmapamp" , OPT_NORMAL_MAP_AMPLITUDE },
236
237
{ L" bc" , OPT_BC_COMPRESS },
237
238
{ L" c" , OPT_COLORKEY },
238
- { L" x2bias" , OPT_X2_BIAS },
239
239
{ L" nits" , OPT_PAPER_WHITE_NITS },
240
240
#ifdef USE_XBOX_EXTS
241
241
{ L" xbox" , OPT_USE_XBOX },
@@ -251,6 +251,7 @@ namespace
251
251
{ L" bad-tails" , OPT_DDS_BAD_DXTN_TAILS },
252
252
{ L" block-compress" , OPT_BC_COMPRESS },
253
253
{ L" color-key" , OPT_COLORKEY },
254
+ { L" dword-alignment" , OPT_DDS_DWORD_ALIGN },
254
255
{ L" expand-luminance" , OPT_EXPAND_LUMINANCE },
255
256
{ L" feature-level" , OPT_FEATURE_LEVEL },
256
257
{ L" file-list" , OPT_FILELIST },
@@ -266,8 +267,8 @@ namespace
266
267
{ L" invert-y" , OPT_INVERT_Y },
267
268
{ L" keep-coverage" , OPT_PRESERVE_ALPHA_COVERAGE },
268
269
{ L" mip-levels" , OPT_MIPLEVELS },
269
- { L" normalmap- amplitude" , OPT_NORMAL_MAP_AMPLITUDE },
270
- { L" normalmap " , OPT_NORMAL_MAP },
270
+ { L" normal-map- amplitude" , OPT_NORMAL_MAP_AMPLITUDE },
271
+ { L" normal-map " , OPT_NORMAL_MAP },
271
272
{ L" overwrite" , OPT_OVERWRITE },
272
273
{ L" paper-white-nits" , OPT_PAPER_WHITE_NITS },
273
274
{ L" permissive" , OPT_DDS_PERMISSIVE },
@@ -282,16 +283,21 @@ namespace
282
283
{ L" suffix" , OPT_SUFFIX },
283
284
{ L" swizzle" , OPT_SWIZZLE },
284
285
{ L" tga-zero-alpha" , OPT_TGAZEROALPHA },
285
- { L" tga20" , OPT_TGA20 },
286
286
{ L" timing" , OPT_TIMING },
287
287
{ L" to-lowercase" , OPT_TOLOWER },
288
288
{ L" tonemap" , OPT_TONEMAP },
289
+ { L" typeless-unorm" , OPT_TYPELESS_UNORM },
290
+ { L" typeless-float" , OPT_TYPELESS_FLOAT },
289
291
{ L" version" , OPT_VERSION },
290
292
{ L" vertical-flip" , OPT_VFLIP },
291
293
{ L" wic-lossless" , OPT_WIC_LOSSLESS },
292
294
{ L" wic-multiframe" , OPT_WIC_MULTIFRAME },
293
295
{ L" wic-quality" , OPT_WIC_QUALITY },
294
296
{ L" width" , OPT_WIDTH },
297
+ { L" x2-bias" , OPT_X2_BIAS },
298
+ #ifdef USE_XBOX_EXTS
299
+ { L" xbox-mode" , OPT_XGMODE },
300
+ #endif
295
301
{ nullptr , 0 }
296
302
};
297
303
@@ -771,12 +777,13 @@ namespace
771
777
L" converts height-map to normal-map\n "
772
778
L" options must be one or more of\n "
773
779
L" r, g, b, a, l, m, u, v, i, o\n "
774
- L" -nmapamp <weight>, --normalmap -amplitude <weight>\n "
780
+ L" -nmapamp <weight>, --normal-map -amplitude <weight>\n "
775
781
L" normal map amplitude (defaults to 1.0)\n "
776
782
L" \n "
777
783
L" (DDS input only)\n "
778
- L" -t{u|f} TYPELESS format is treated as UNORM or FLOAT\n "
779
- L" -dword Use DWORD instead of BYTE alignment\n "
784
+ L" -tu, --typeless-unorm TYPELESS format is treated as UNORM\n "
785
+ L" -tf, --typeless-float TYPELESS format is treated as FLOAT\n "
786
+ L" -dword, --dword-alignment Use DWORD instead of BYTE alignment\n "
780
787
L" --bad-tails Fix for older DXTn with bad mipchain tails\n "
781
788
L" --permissive Allow some DX9 variants with unusual header values\n "
782
789
L" --ignore-mips Reads just the top-level mip which reads some invalid files\n "
@@ -788,14 +795,15 @@ namespace
788
795
L" -dx9 Force use of legacy DX9 header\n "
789
796
#ifdef USE_XBOX_EXTS
790
797
L" -xbox Tile/swizzle and use 'XBOX' variant of DDS\n "
791
- L" -xgmode <mode> Tile/swizzle using provided memory layout mode\n "
798
+ L" -xgmode <mode>, --xbox-mode <mode>\n " \
799
+ L" Tile/swizzle using provided memory layout mode\n "
792
800
#endif
793
801
L" \n "
794
802
L" (TGA input only)\n "
795
803
L" --tga-zero-alpha Allow all zero alpha channel files to be loaded 'as is'\n "
796
804
L" \n "
797
805
L" (TGA output only)\n "
798
- L" -- tga20 Write file including TGA 2.0 extension area\n "
806
+ L" -tga20 Write file including TGA 2.0 extension area\n "
799
807
L" \n "
800
808
L" (BMP, PNG, JPG, TIF, WDP output only)\n "
801
809
L" -wicq <quality>, --wic-quality <quality>\n "
@@ -826,7 +834,7 @@ namespace
826
834
L" -nits <value>, --paper-white-nits <value>\n "
827
835
L" paper-white value in nits to use for HDR10 (def: 200.0)\n "
828
836
L" --tonemap Apply a tonemap operator based on maximum luminance\n "
829
- L" -x2bias Enable *2 - 1 conversion cases for unorm/pos-only-float\n "
837
+ L" --x2-bias Enable *2 - 1 conversion cases for unorm/pos-only-float\n "
830
838
L" --invert-y Invert Y (i.e. green) channel values\n "
831
839
L" --reconstruct-z Rebuild Z (blue) channel assuming X/Y are normals\n "
832
840
L" --swizzle <rgba> Swizzle image channels using HLSL-style mask\n "
@@ -1261,7 +1269,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
1261
1269
std::list<SConversion> conversion;
1262
1270
bool allowOpts = true ;
1263
1271
1264
- for (int iArg = 1 ; iArg < argc; iArg++ )
1272
+ for (int iArg = 1 ; iArg < argc; ++iArg )
1265
1273
{
1266
1274
PWSTR pArg = argv[iArg];
1267
1275
@@ -1294,7 +1302,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
1294
1302
}
1295
1303
}
1296
1304
}
1297
- else if (( ' - ' == pArg[ 0 ]) || ( ' / ' == pArg[ 0 ]))
1305
+ else
1298
1306
{
1299
1307
pArg++;
1300
1308
dwOption = LookupByName (pArg, g_pOptions);
@@ -1315,9 +1323,9 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
1315
1323
return 1 ;
1316
1324
}
1317
1325
1318
- PWSTR pValue;
1326
+ PWSTR pValue = pArg ;
1319
1327
1320
- for (pValue = pArg ; *pValue && (' :' != *pValue); pValue++ );
1328
+ for (; *pValue && (' :' != *pValue); ++pValue );
1321
1329
1322
1330
if (*pValue)
1323
1331
*pValue++ = 0 ;
0 commit comments