Standalone StarSystem generator
It must be activated by a preprocessor define , so i've tested it because it seems to be
a precious tool . But it is broken , there were errors that i have fixed easily , like ' ; ' instead of ' , ' , and missing separator between arguments .
BUt i have a var that is missing , and that i can't replace .
Perhaps you will know something about that hidden main(...) fonction :
#ifdef CONSOLE_APP
int main( int argc, char **argv )
{
if (argc < 9) {
VSFileSystem::vs_fprintf(
stderr,
"Usage: starsysgen <seed> <sector>/<system> <sunradius>/<compactness> <numstars> [N][A]<numnaturalphenomena> <numstarbases> <faction> <namelist> [OtherSystemJumpNodes]...\n" );
return 1;
}
int seed;
if ( 1 != sscanf( argv[1], "%d", &seed ) )
return 1;
string sectorname( getStarSystemSector( argv[2] ) );
string filen( getStarSystemFileName( argv[2] ) );
string systemname = string( getStarSystemName( argv[2] ) );
int numbigthings;
bool nebula = true;
bool asteroid = true;
float srad;
float comp;
sscanf( argv[3], "%f/%f", &srad,&comp );
vector< string >jumps;
for (unsigned int i = 12; i < argc; i++)
jumps.push_back( string( argv ) );
if ( 1 == sscanf( argv[8], "AN%d", &numbigthings ) || 1 == sscanf( argv[8], "NA%d", &numun[0] ) )
nebula = asteroid = true;
else if ( 1 == sscanf( argv[8], "A%d", &numbigthings ) )
asteroid = true;
else if ( 1 == sscanf( argv[8], "N%d", &numbigthings ) )
nebula = true;
else if ( 1 == sscanf( argv[8], "%d", &numbigthings ) )
nebula = asteroid = true;
else
return -1;
generateStarSystem( "./",
seed,
sectorname,
systemname,
filen,
srad, comp,
strtol( argv[4], NULL, 10 ),
strtol( argv[5], NULL, 10 ),
strtol( argv[6], NULL, 10 ),
strtol( argv[7], NULL, 10 ),
nebula,
asteroid,
numbigthings,
strtol( argv[9], NULL, 10 ),
argv[10],
argv[11],
jumps );
return 0;
}
The error line is :
1>..\..\vegastrike\src\galaxy_gen.cpp(1422) : error C2065: 'numun' : undeclared identifier
I guess this is a deprecated utility function , but i don't want rip it from the source without an attempt to fix it with your help .
Thx .