Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 19, 2008, 2:24:33 PM (16 years ago)
Author:
rgrieder
Message:

Moved all showsGraphics, hasServer, etc. functions from Settings class to Core class.
This was necessary to avoid circular dependencies.

Location:
code/branches/objecthierarchy/src/orxonox/gamestates
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.cc

    r1940 r1949  
    3232#include "core/input/InputManager.h"
    3333#include "core/CommandLine.h"
     34#include "core/Core.h"
    3435#include "network/Client.h"
    35 #include "Settings.h"
    3636
    3737namespace orxonox
     
    5151    void GSClient::enter()
    5252    {
    53         Settings::_getInstance().setIsClient(true);
     53        Core::setIsClient(true);
    5454
    5555        GSLevel::enter();
     
    8181        GSLevel::leave();
    8282
    83         Settings::_getInstance().setIsClient(false);
     83        Core::setIsClient(false);
    8484    }
    8585
  • code/branches/objecthierarchy/src/orxonox/gamestates/GSDedicated.cc

    r1940 r1949  
    3535#include "core/CommandLine.h"
    3636#include "core/Loader.h"
     37#include "core/Core.h"
    3738#include "network/Server.h"
    3839#include "objects/Tickable.h"
     40#include "Settings.h"
    3941#include "GraphicsEngine.h"
    40 #include "Settings.h"
    4142
    4243namespace orxonox
     
    5758    void GSDedicated::enter()
    5859    {
    59         Settings::_getInstance().setHasServer(true);
     60        Core::setHasServer(true);
    6061
    6162        // create Ogre SceneManager for the level
     
    9798        Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
    9899
    99         Settings::_getInstance().setHasServer(false);
     100        Core::setHasServer(false);
    100101    }
    101102
  • code/branches/objecthierarchy/src/orxonox/gamestates/GSGraphics.cc

    r1940 r1949  
    4747#include "core/ConfigValueIncludes.h"
    4848#include "core/CoreIncludes.h"
     49#include "core/Core.h"
    4950#include "core/input/InputManager.h"
    5051#include "core/input/KeyBinder.h"
     
    101102    void GSGraphics::enter()
    102103    {
    103         Settings::_getInstance().setShowsGraphics(true);
     104        Core::setShowsGraphics(true);
    104105
    105106        // initialise graphics engine. Doesn't load the render window yet!
     
    196197        delete graphicsEngine_;
    197198
    198         Settings::_getInstance().setShowsGraphics(false);
     199        Core::setShowsGraphics(false);
    199200    }
    200201
  • code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc

    r1942 r1949  
    4444#include "objects/Radar.h"
    4545//#include "tools/ParticleInterface.h"
     46#include "GraphicsEngine.h"
    4647#include "Settings.h"
    47 #include "GraphicsEngine.h"
    4848
    4949namespace orxonox
  • code/branches/objecthierarchy/src/orxonox/gamestates/GSServer.cc

    r1940 r1949  
    3333#include "core/input/InputManager.h"
    3434#include "core/CommandLine.h"
     35#include "core/Core.h"
    3536#include "network/Server.h"
    36 #include "Settings.h"
    3737
    3838namespace orxonox
     
    5252    void GSServer::enter()
    5353    {
    54         Settings::_getInstance().setHasServer(true);
     54        Core::setHasServer(true);
    5555
    5656        GSLevel::enter();
     
    8686        GSLevel::leave();
    8787
    88         Settings::_getInstance().setHasServer(false);
     88        Core::setHasServer(false);
    8989    }
    9090
  • code/branches/objecthierarchy/src/orxonox/gamestates/GSStandalone.cc

    r1940 r1949  
    3232#include "core/input/InputManager.h"
    3333#include "core/ConsoleCommand.h"
    34 #include "Settings.h"
     34#include "core/Core.h"
    3535
    3636namespace orxonox
     
    5959        InputManager::getInstance().requestEnterState("game");
    6060
    61         Settings::_getInstance().setIsStandalone(true);
     61        Core::setIsStandalone(true);
    6262    }
    6363
     
    7272        GSLevel::leave();
    7373
    74         Settings::_getInstance().setIsStandalone(false);
     74        Core::setIsStandalone(false);
    7575    }
    7676
Note: See TracChangeset for help on using the changeset viewer.