Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2008, 9:23:11 PM (16 years ago)
Author:
rgrieder
Message:
  • Finished CommandLineArgument completely. You can also use SetCommandLineSwitch to define boolean switches.
  • Added StaticConversion to Covert.h (compile time type conversion checking)
  • Fixed a bug in Exception
  • Added getAllStrings() to SubString
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/Main.cc

    r1663 r1664  
    4141#include "core/SignalHandler.h"
    4242#include "core/Debug.h"
    43 #include "core/CommandLine.h"
    44 //#include "Orxonox.h"
    4543
    4644#include "gamestates/GSRoot.h"
     
    8583int main(int argc, char** argv)
    8684{
    87     try
    88     {
    89         orxonox::CommandLine::parse(argc, argv);
    90     }
    91     catch (orxonox::ArgumentException& ex)
    92     {
    93         COUT(1) << ex.what() << std::endl;
    94         COUT(0) << "Usage:" << std::endl << "orxonox [--mode client|server|dedicated|standalone] "
    95                 << "[--data PATH] [--ip IP] [--port PORT]" << std::endl;
    96     }
    97 
    98 
    9985    // create a signal handler (only works for linux)
    10086    SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
    101 
    10287
    10388
     
    144129    graphics.addChild(&gui);
    145130
    146     root.requestState("gui");
     131    root.feedCommandLine(argc, argv);
     132    root.requestState("root");
    147133    root.tick(0.0f);
    148134    root.requestState("");
    149 
    150 
    151     //Orxonox orxonoxInstance;
    152 
    153     try
    154     {
    155 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
    156         orxonoxInstance.start(macBundlePath());
    157 #else
    158         //orxonoxInstance.start();
    159 #endif
    160     }
    161     catch (std::exception& ex)
    162     {
    163         COUT(1) << ex.what() << std::endl;
    164         COUT(1) << "Abort." << std::endl;
    165     }
    166135
    167136    return 0;
Note: See TracChangeset for help on using the changeset viewer.