Skip to content

Commit 882d532

Browse files
committed
Keep -tga20
1 parent 8b37d22 commit 882d532

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

Texconv/texconv.cpp

+22-14
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ namespace
214214
{ L"dword", OPT_DDS_DWORD_ALIGN },
215215
{ L"dx10", OPT_USE_DX10 },
216216
{ L"dx9", OPT_USE_DX9 },
217+
{ L"tga20", OPT_TGA20 },
217218
{ L"wicq", OPT_WIC_QUALITY },
218219
{ L"nologo", OPT_NOLOGO },
219220
{ L"sepalpha", OPT_SEPALPHA },
@@ -235,7 +236,6 @@ namespace
235236
{ L"nmapamp", OPT_NORMAL_MAP_AMPLITUDE },
236237
{ L"bc", OPT_BC_COMPRESS },
237238
{ L"c", OPT_COLORKEY },
238-
{ L"x2bias", OPT_X2_BIAS },
239239
{ L"nits", OPT_PAPER_WHITE_NITS },
240240
#ifdef USE_XBOX_EXTS
241241
{ L"xbox", OPT_USE_XBOX },
@@ -251,6 +251,7 @@ namespace
251251
{ L"bad-tails", OPT_DDS_BAD_DXTN_TAILS },
252252
{ L"block-compress", OPT_BC_COMPRESS },
253253
{ L"color-key", OPT_COLORKEY },
254+
{ L"dword-alignment", OPT_DDS_DWORD_ALIGN },
254255
{ L"expand-luminance", OPT_EXPAND_LUMINANCE },
255256
{ L"feature-level", OPT_FEATURE_LEVEL },
256257
{ L"file-list", OPT_FILELIST },
@@ -266,8 +267,8 @@ namespace
266267
{ L"invert-y", OPT_INVERT_Y },
267268
{ L"keep-coverage", OPT_PRESERVE_ALPHA_COVERAGE },
268269
{ 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 },
271272
{ L"overwrite", OPT_OVERWRITE },
272273
{ L"paper-white-nits", OPT_PAPER_WHITE_NITS },
273274
{ L"permissive", OPT_DDS_PERMISSIVE },
@@ -282,16 +283,21 @@ namespace
282283
{ L"suffix", OPT_SUFFIX },
283284
{ L"swizzle", OPT_SWIZZLE },
284285
{ L"tga-zero-alpha", OPT_TGAZEROALPHA },
285-
{ L"tga20", OPT_TGA20 },
286286
{ L"timing", OPT_TIMING },
287287
{ L"to-lowercase", OPT_TOLOWER },
288288
{ L"tonemap", OPT_TONEMAP },
289+
{ L"typeless-unorm", OPT_TYPELESS_UNORM },
290+
{ L"typeless-float", OPT_TYPELESS_FLOAT },
289291
{ L"version", OPT_VERSION },
290292
{ L"vertical-flip", OPT_VFLIP },
291293
{ L"wic-lossless", OPT_WIC_LOSSLESS },
292294
{ L"wic-multiframe", OPT_WIC_MULTIFRAME },
293295
{ L"wic-quality", OPT_WIC_QUALITY },
294296
{ L"width", OPT_WIDTH },
297+
{ L"x2-bias", OPT_X2_BIAS },
298+
#ifdef USE_XBOX_EXTS
299+
{ L"xbox-mode", OPT_XGMODE },
300+
#endif
295301
{ nullptr, 0 }
296302
};
297303

@@ -771,12 +777,13 @@ namespace
771777
L" converts height-map to normal-map\n"
772778
L" options must be one or more of\n"
773779
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"
775781
L" normal map amplitude (defaults to 1.0)\n"
776782
L"\n"
777783
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"
780787
L" --bad-tails Fix for older DXTn with bad mipchain tails\n"
781788
L" --permissive Allow some DX9 variants with unusual header values\n"
782789
L" --ignore-mips Reads just the top-level mip which reads some invalid files\n"
@@ -788,14 +795,15 @@ namespace
788795
L" -dx9 Force use of legacy DX9 header\n"
789796
#ifdef USE_XBOX_EXTS
790797
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"
792800
#endif
793801
L"\n"
794802
L" (TGA input only)\n"
795803
L" --tga-zero-alpha Allow all zero alpha channel files to be loaded 'as is'\n"
796804
L"\n"
797805
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"
799807
L"\n"
800808
L" (BMP, PNG, JPG, TIF, WDP output only)\n"
801809
L" -wicq <quality>, --wic-quality <quality>\n"
@@ -826,7 +834,7 @@ namespace
826834
L" -nits <value>, --paper-white-nits <value>\n"
827835
L" paper-white value in nits to use for HDR10 (def: 200.0)\n"
828836
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"
830838
L" --invert-y Invert Y (i.e. green) channel values\n"
831839
L" --reconstruct-z Rebuild Z (blue) channel assuming X/Y are normals\n"
832840
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[])
12611269
std::list<SConversion> conversion;
12621270
bool allowOpts = true;
12631271

1264-
for (int iArg = 1; iArg < argc; iArg++)
1272+
for (int iArg = 1; iArg < argc; ++iArg)
12651273
{
12661274
PWSTR pArg = argv[iArg];
12671275

@@ -1294,7 +1302,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
12941302
}
12951303
}
12961304
}
1297-
else if (('-' == pArg[0]) || ('/' == pArg[0]))
1305+
else
12981306
{
12991307
pArg++;
13001308
dwOption = LookupByName(pArg, g_pOptions);
@@ -1315,9 +1323,9 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
13151323
return 1;
13161324
}
13171325

1318-
PWSTR pValue;
1326+
PWSTR pValue = pArg;
13191327

1320-
for (pValue = pArg; *pValue && (':' != *pValue); pValue++);
1328+
for (; *pValue && (':' != *pValue); ++pValue);
13211329

13221330
if (*pValue)
13231331
*pValue++ = 0;

0 commit comments

Comments
 (0)