Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2008, 6:07:57 PM (16 years ago)
Author:
rgrieder
Message:
  • renamed:

GameState —> GameStateBase
GameStateTyped<T> —> GameState

  • moved command line parsing from GSRoot to RootGameState.
File:
1 edited

Legend:

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

    r1686 r1689  
    9191    }
    9292
    93     //SetCommandLineArgument(asdf1, "haha").setShortcut("a").setUsageInformation("1|2|3");
    94     //SetCommandLineArgument(asdf2, 3).setShortcut("b");
    95     //SetCommandLineArgument(asdf3, Vector2()).setShortcut("c");
    96     //SetCommandLineArgument(adsf4, 1.4f).setShortcut("d");
    97     //SetCommandLineSwitch(showGraphics).setShortcut("g");
    98 
    99     void GSRoot::feedCommandLine(int argc, char** argv)
    100     {
    101         std::vector<std::string> args;
    102         for (int i = 1; i < argc; ++i)
    103             args.push_back(argv[i]);
    104 
    105         //std::string line = "-a --asdf3 (3,3) -d -5 -b - 5.4";
    106         //SubString tokens(line, " ", " ", false, 92, false, 34, true, 40, 41, false, 0);
    107 
    108         try
    109         {
    110             orxonox::CommandLine::parse(args);
    111             //CommandLine::parse(tokens.getAllStrings());
    112         }
    113         catch (orxonox::ArgumentException& ex)
    114         {
    115             COUT(1) << ex.what() << std::endl;
    116             COUT(0) << "Usage:" << std::endl << "orxonox " << CommandLine::getUsageInformation() << std::endl;
    117         }
    118     }
    119 
    12093    void GSRoot::enter()
    12194    {
     
    165138
    166139        // add console commands
    167         FunctorMember01<GameState, const std::string&>* functor2 = createFunctor(&GameState::requestState);
     140        FunctorMember01<GameStateBase, const std::string&>* functor2 = createFunctor(&GameStateBase::requestState);
    168141        functor2->setObject(this);
    169142        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor2, "selectGameState"));
Note: See TracChangeset for help on using the changeset viewer.