Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/Main.cc

    r3323 r3370  
    4646#include "util/Debug.h"
    4747#include "util/Exception.h"
     48#include "core/CommandLine.h"
    4849#include "core/Game.h"
     50
     51SetCommandLineSwitch(console).information("Start in console mode (text IO only)");
     52// Shortcuts for easy direct loading
     53SetCommandLineSwitch(server).information("Start in server mode");
     54SetCommandLineSwitch(client).information("Start in client mode");
     55SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");
     56SetCommandLineSwitch(standalone).information("Start in standalone mode");
    4957
    5058/*
     
    8694
    8795        game->requestState("root");
     96
     97        // Some development hacks (not really, but in the future, this calls won't make sense anymore)
     98        if (CommandLine::getValue("standalone").getBool())
     99            Game::getInstance().requestStates("graphics, standalone, level");
     100        else if (CommandLine::getValue("server").getBool())
     101            Game::getInstance().requestStates("graphics, server, level");
     102        else if (CommandLine::getValue("client").getBool())
     103            Game::getInstance().requestStates("graphics, client, level");
     104        else if (CommandLine::getValue("dedicated").getBool())
     105            Game::getInstance().requestStates("dedicated, level");
     106        else if (CommandLine::getValue("console").getBool())
     107            Game::getInstance().requestStates("ioConsole");
     108        else
     109            Game::getInstance().requestStates("graphics, mainMenu");
    88110    }
    89111    catch (const std::exception& ex)
Note: See TracChangeset for help on using the changeset viewer.