Added feedback couts, inactive program arguments.

This commit is contained in:
2017-06-16 13:08:46 -07:00
parent ce16bf92f9
commit 29d8fd4c02

View File

@ -17,12 +17,32 @@ using namespace std;
int main(const int _kiArgC, const char** _kppcArgv)
{
// Check we have correct number of parameters
#define ARG_POS_BRUSHDEF 5
#define ARG_POS_ENTITYCONV 4
// Minimum: program, input file, output file
if(_kiArgC < 3)
{
return(3);
}
/* // placeholder argument parsing until something more robust is decided upon
// optional arg #1: brush definition - gtkradiant or netradiant style
void (*brushdef) (std::stringstream &, const std::vector<TPlanePoints> &);
brushdef = ((string(_kppcArgv[ARG_POS_BRUSHDEF - 1])).compare("-gtk") == 0) ?
&brushdef_gtk: &brushdef_net;
convertmap(_kppcArgv[1], _kppcArgv[2], &brushdef_net);
// optional arg #2: entity mapping file - enables entity conversion
const char * const entitymap = (_kiArgC < ARG_POS_ENTITYCONV) ?
_kppcArgv[ARG_POS_ENTITYCONV - 1]: NULL; */
bool status = convertmap(_kppcArgv[1], _kppcArgv[2], &brushdef_net);
if (status) {
cout << "Successfully converted map "
<< _kppcArgv[1]
<< " to "
<< _kppcArgv[2]
<< endl;
} else {
cout << "Failed to convert map." << endl;
}
return(0);
}
}