Changeset 4135 in orxonox.OLD for orxonox/trunk/src/orxonox.cc
- Timestamp:
- May 9, 2005, 11:01:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/orxonox.cc
r4134 r4135 48 48 /** 49 49 \brief create a new Orxonox 50 51 In this funcitons only global values are set. The game will not be started here. 50 52 */ 51 53 Orxonox::Orxonox () … … 56 58 this->resources = NULL; 57 59 this->localinput = NULL; 60 61 this->argc = 0; 62 this->argv = NULL; 58 63 } 59 64 … … 103 108 int Orxonox::init (int argc, char** argv) 104 109 { 110 this->argc = argc; 111 this->argv = argv; 105 112 // parse command line 106 113 // config file … … 132 139 133 140 GraphicsEngine::getInstance(); 134 141 142 /* 143 int i; 144 for(i = 1; i < this->argc; ++i) 145 { 146 if (!strncmp (this->argv[i], "-r", 2)) 147 { 148 char* tmp = strchr (argv[i], 'x'); 149 // GraphicsEngine::getInstance()->setResolution(atoi(argv[i]), atoi(tmp+1), 24); 150 } 151 else if (!strncmp(this->argv[i], "--resolution=", 13)) 152 { 153 } 154 } 155 */ 135 156 return 0; 136 157 } … … 339 360 */ 340 361 int main(int argc, char** argv) 341 { 342 343 /* reading arguments 344 345 currently supported arguments are: 346 <no args> :: just starts orxonox 347 --benchmark :: start the benchmark without starting orxonox 348 349 this is a preselection: it matches to one of the start* functions, the 350 finetuning is made in those functions. 351 */ 352 353 362 { 363 364 // here the pre-arguments are loaded, these are needed to go either to orxonx itself, Help, or Benchmark. 354 365 int i; 355 366 for(i = 1; i < argc; ++i) 356 367 { 357 if(! strcmp( "--help", argv[i]) ) return startHelp(argc, argv);358 else if(! strcmp( "--benchmark", argv[i])) return startBenchmarks();359 else if(! 360 else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]);368 if(! strcmp( "--help", argv[i]) || !strcmp("-h", argv[i])) return startHelp(argc, argv); 369 else if(!strcmp( "--benchmark", argv[i]) || !strcmp("-b", argv[i])) return startBenchmarks(); 370 else if(!strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true; 371 // else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]); 361 372 } 362 373 … … 376 387 delete gui; 377 388 } 378 PRINT(0)(" - -benchmark:\t\t\tstarts the orxonox benchmark\n");379 PRINT(0)(" - -help:\t\t\tshows this help\n");389 PRINT(0)(" -b|--benchmark:\t\tstarts the orxonox benchmark\n"); 390 PRINT(0)(" -h|--help:\t\t\tshows this help\n"); 380 391 } 381 392
Note: See TracChangeset
for help on using the changeset viewer.