@ -209,6 +209,7 @@ int main(int argc, char **argv)
NLMISC::CCmdArgsargs;
NLMISC::CCmdArgsargs;
args.setDescription("Build a huge interface texture from several small elements to optimize video memory usage.");
args.setDescription("Build a huge interface texture from several small elements to optimize video memory usage.");
args.addArg("f","format","format","Output format (png or tga)");
args.addArg("s","subset","existing_uv_txt_name","Build a subset of an existing interface definition while preserving the existing texture ids, to support freeing up VRAM by switching to the subset without rebuilding the entire interface.");
args.addArg("s","subset","existing_uv_txt_name","Build a subset of an existing interface definition while preserving the existing texture ids, to support freeing up VRAM by switching to the subset without rebuilding the entire interface.");
args.addArg("x","extract","","Extract all interface elements from <output_filename> to <input_path>.");
args.addArg("x","extract","","Extract all interface elements from <output_filename> to <input_path>.");
args.addAdditionalArg("output_filename","PNG or TGA file to generate",true);
args.addAdditionalArg("output_filename","PNG or TGA file to generate",true);
@ -229,12 +230,26 @@ int main(int argc, char **argv)
// extract all interface elements
// extract all interface elements
boolextractElements=args.haveArg("x");
boolextractElements=args.haveArg("x");
// output format
std::stringoutputFormat;
if(args.haveArg("f"))
{
outputFormat=args.getArg("f").front();
if(outputFormat!="png"&&outputFormat!="tga")
{
outString(toString("ERROR: Format %s not supported, only png and tga formats are",outputFormat.c_str()));