Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 17, 2011, 5:47:22 AM (13 years ago)
Author:
rgrieder
Message:

Stripped down trunk to form a new light sandbox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/forks/sandbox_light/src/orxonox/Main.cc

    r7801 r7908  
    3737
    3838#include "core/CommandLineParser.h"
    39 #include "core/Game.h"
    40 #include "core/LuaState.h"
    41 #include "ToluaBindOrxonox.h"
    42 #include "ToluaBindNetwork.h"
    43 
    44 DeclareToluaInterface(Orxonox);
    45 DeclareToluaInterface(Network);
     39#include "core/Core.h"
    4640
    4741namespace orxonox
    4842{
    49     SetCommandLineSwitch(console).information("Start in console mode (text IO only)");
    50     SetCommandLineSwitch(server).information("Start in server mode");
    51     SetCommandLineSwitch(client).information("Start in client mode");
    52     SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");
    53     SetCommandLineSwitch(standalone).information("Start in standalone mode");
    54     SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode");
    55 
    56     /* ADD masterserver command */
    57     SetCommandLineSwitch(masterserver).information("Start in masterserver mode");
    58 
    5943    SetCommandLineArgument(generateDoc, "")
    6044        .information("Generates a Doxygen file from things like SetConsoleCommand");
     
    6650    int main(const std::string& strCmdLine)
    6751    {
    68         Game* game = new Game(strCmdLine);
     52        Core* core = new Core(strCmdLine);
    6953
    7054        if (CommandLineParser::getValue("generateDoc").getString().empty())
    7155        {
    72             /* TODO make this clear */
    73             game->setStateHierarchy(
    74             "root"
    75             " graphics"
    76             "  mainMenu"
    77             "  standalone,server,client"
    78             "   level"
    79             " server,client,masterserver"
    80             "  level"
    81             );
    82 
    83             game->requestState("root");
    84 
    85             // Some development hacks (not really, but in the future, these calls won't make sense anymore)
    86             if (CommandLineParser::getValue("standalone").getBool())
    87                 Game::getInstance().requestStates("graphics, standalone, level");
    88             else if (CommandLineParser::getValue("server").getBool())
    89                 Game::getInstance().requestStates("graphics, server, level");
    90             else if (CommandLineParser::getValue("client").getBool())
    91                 Game::getInstance().requestStates("graphics, client, level");
    92             else if (CommandLineParser::getValue("dedicated").getBool())
    93                 Game::getInstance().requestStates("server, level");
    94             else if (CommandLineParser::getValue("dedicatedClient").getBool())
    95                 Game::getInstance().requestStates("client, level");
    96             /* ADD masterserver command */
    97             else if (CommandLineParser::getValue("masterserver").getBool())
    98                 Game::getInstance().requestStates("masterserver");
    99             else
    100             {
    101                 if (!CommandLineParser::getValue("console").getBool())
    102                     Game::getInstance().requestStates("graphics, mainMenu");
    103             }
    104 
    105             game->run();
     56            // Start your program here
    10657        }
    10758
    108         delete game;
     59        delete core;
    10960
    11061        return 0;
Note: See TracChangeset for help on using the changeset viewer.