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.
Location:
code/branches/gui/src/orxonox/gamestates
Files:
10 edited

Legend:

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

    r1688 r1689  
    3939{
    4040    GSGUI::GSGUI()
    41         : GameStateTyped<GSGraphics>("gui")
     41        : GameState<GSGraphics>("gui")
    4242    {
    4343    }
  • code/branches/gui/src/orxonox/gamestates/GSGUI.h

    r1688 r1689  
    3636namespace orxonox
    3737{
    38     class _OrxonoxExport GSGUI : public GameStateTyped<GSGraphics>
     38    class _OrxonoxExport GSGUI : public GameState<GSGraphics>
    3939    {
    4040    public:
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.cc

    r1688 r1689  
    5757{
    5858    GSGraphics::GSGraphics()
    59         : GameStateTyped<GSRoot>("graphics")
     59        : GameState<GSRoot>("graphics")
    6060        , ogreRoot_(0)
    6161        , inputManager_(0)
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.h

    r1688 r1689  
    3939namespace orxonox
    4040{
    41     class _OrxonoxExport GSGraphics : public GameStateTyped<GSRoot>, public OrxonoxClass, public Ogre::WindowEventListener
     41    class _OrxonoxExport GSGraphics : public GameState<GSRoot>, public OrxonoxClass, public Ogre::WindowEventListener
    4242    {
    4343        friend class ClassIdentifier<GSGraphics>;
  • code/branches/gui/src/orxonox/gamestates/GSIOConsole.cc

    r1688 r1689  
    4242{
    4343    GSIOConsole::GSIOConsole()
    44         : GameStateTyped<GSRoot>("ioConsole")
     44        : GameState<GSRoot>("ioConsole")
    4545    {
    4646    }
  • code/branches/gui/src/orxonox/gamestates/GSIOConsole.h

    r1688 r1689  
    3737namespace orxonox
    3838{
    39     class _OrxonoxExport GSIOConsole : public GameStateTyped<GSRoot>
     39    class _OrxonoxExport GSIOConsole : public GameState<GSRoot>
    4040    {
    4141    public:
  • code/branches/gui/src/orxonox/gamestates/GSLevel.cc

    r1688 r1689  
    4545{
    4646    GSLevel::GSLevel(const std::string& name)
    47         : GameStateTyped<GSGraphics>(name)
     47        : GameState<GSGraphics>(name)
    4848        , timeFactor_(1.0f)
    4949        , sceneManager_(0)
  • code/branches/gui/src/orxonox/gamestates/GSLevel.h

    r1688 r1689  
    3737namespace orxonox
    3838{
    39     class _OrxonoxExport GSLevel : public GameStateTyped<GSGraphics>
     39    class _OrxonoxExport GSLevel : public GameState<GSGraphics>
    4040    {
    4141    public:
  • 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"));
  • code/branches/gui/src/orxonox/gamestates/GSRoot.h

    r1688 r1689  
    4444        ~GSRoot();
    4545
    46         void feedCommandLine(int argc, char** argv);
    47 
    4846        void exitGame()
    4947        { requestState("root"); }
Note: See TracChangeset for help on using the changeset viewer.