Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 10, 2008, 1:37:36 AM (16 years ago)
Author:
rgrieder
Message:

merged gui back to trunk.
update the media repository!

Location:
code/trunk
Files:
1 edited
19 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gamestates/GSClient.cc

    r1724 r1755  
    5454        int serverPort = CommandLine::getArgument<int>("port")->getValue();
    5555        std::string serverIP = CommandLine::getArgument<std::string>("ip")->getValue();
    56         this->client_ = network::Client::createSingleton(serverIP, serverPort);
     56        this->client_ = new network::Client(serverIP, serverPort);
    5757
    5858        if(!client_->establishConnection())
     
    7373        client_->closeConnection();
    7474
    75         // TODO: destroy client
     75        // destroy client
     76        delete this->client_;
    7677
    7778        GSLevel::leave();
  • code/trunk/src/orxonox/gamestates/GSDedicated.cc

    r1724 r1755  
    7070
    7171        int serverPort = CommandLine::getArgument<int>("port")->getValue();
    72         this->server_ = network::Server::createSingleton(serverPort);
     72        this->server_ = new network::Server(serverPort);
    7373
    7474        // call the loader
     
    8282        FunctorMember01<GSDedicated, float>* functor = createFunctor(&GSDedicated::setTimeFactor);
    8383        functor->setObject(this);
    84         CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor"));
     84        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);;
    8585    }
    8686
     
    9393
    9494        this->server_->close();
    95         // TODO: destroy server
     95        delete this->server_;
    9696
    9797        Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
     
    103103    {
    104104        // Call those objects that need the real time
    105         for (Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it)
     105        for (ObjectList<TickableReal>::iterator it = ObjectList<TickableReal>::begin(); it; ++it)
    106106            it->tick(time.getDeltaTime());
    107107        // Call the scene objects
    108         for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
     108        for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it)
    109109            it->tick(time.getDeltaTime() * this->timeFactor_);
    110110
  • code/trunk/src/orxonox/gamestates/GSGraphics.cc

    r1724 r1755  
    4040#include <OgreWindowEventUtilities.h>
    4141
    42 #include "core/Debug.h"
     42#include "util/Debug.h"
    4343#include "core/ConsoleCommand.h"
    4444#include "core/ConfigValueIncludes.h"
     
    308308    void GSGraphics::windowMoved(Ogre::RenderWindow *rw)
    309309    {
    310         for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     310        for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    311311            it->windowMoved();
    312312    }
     
    323323    void GSGraphics::windowResized(Ogre::RenderWindow *rw)
    324324    {
    325         for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     325        for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    326326            it->windowResized(this->renderWindow_->getWidth(), this->renderWindow_->getHeight());
    327327    }
     
    335335    void GSGraphics::windowFocusChanged(Ogre::RenderWindow *rw)
    336336    {
    337         for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     337        for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    338338            it->windowFocusChanged();
    339339    }
  • code/trunk/src/orxonox/gamestates/GSLevel.cc

    r1724 r1755  
    8686        // reset game speed to normal
    8787        timeFactor_ = 1.0f;
     88
     89        // TODO: insert slomo console command with
     90        // .accessLevel(AccessLevel::Offline).defaultValue(0, 1.0).axisParamIndex(0).isAxisRelative(false);
    8891    }
    8992
     
    111114    {
    112115        // Call those objects that need the real time
    113         for (Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it)
     116        for (ObjectList<TickableReal>::iterator it = ObjectList<TickableReal>::begin(); it; ++it)
    114117            it->tick(time.getDeltaTime());
    115118        // Call the scene objects
    116         for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
     119        for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it)
    117120            it->tick(time.getDeltaTime() * this->timeFactor_);
    118121
    119         for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; ++it)
     122        for (ObjectList<TimerBase>::iterator it = ObjectList<TimerBase>::begin(); it; ++it)
    120123            it->tick(time);
    121124    }
     
    129132        float change = factor / this->timeFactor_;
    130133        this->timeFactor_ = factor;
    131         for (Iterator<ParticleInterface> it = ObjectList<ParticleInterface>::begin(); it; ++it)
     134        for (ObjectList<ParticleInterface>::iterator it = ObjectList<ParticleInterface>::begin(); it; ++it)
    132135            it->setSpeedFactor(it->getSpeedFactor() * change);
    133136
    134         for (Iterator<Backlight> it = ObjectList<Backlight>::begin(); it; ++it)
     137        for (ObjectList<Backlight>::iterator it = ObjectList<Backlight>::begin(); it; ++it)
    135138            it->setTimeFactor(timeFactor_);
    136139    }
  • code/trunk/src/orxonox/gamestates/GSRoot.cc

    r1724 r1755  
    4040#include "core/ConsoleCommand.h"
    4141#include "core/CommandLine.h"
    42 #include "core/Debug.h"
     42#include "util/Debug.h"
    4343#include "core/Exception.h"
    4444#include "core/TclBind.h"
     
    9595    {
    9696#if ORXONOX_DEBUG_MODE == 1
    97         ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox_d.ini");
     97        ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox_d.ini");
    9898#else
    99         ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox.ini");
     99        ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox.ini");
    100100#endif
    101101
  • code/trunk/src/orxonox/gamestates/GSServer.cc

    r1724 r1755  
    5757
    5858        int serverPort = CommandLine::getArgument<int>("port")->getValue();
    59         this->server_ = network::Server::createSingleton(serverPort);
     59        this->server_ = new network::Server(serverPort);
     60        COUT(0) << "Loading scene in server mode" << std::endl;
    6061
    6162        this->loadLevel();
     
    6667        FunctorMember<GSLevel>* functor = createFunctor(&GSLevel::setTimeFactor);
    6768        functor->setObject(this);
    68         CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor"));
     69        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);;
    6970
    7071        // level is loaded: we can start capturing the input
     
    8182
    8283        this->server_->close();
    83         // TODO: destroy server
     84        delete this->server_;
    8485
    8586        GSLevel::leave();
  • code/trunk/src/orxonox/gamestates/GSStandalone.cc

    r1724 r1755  
    5353        FunctorMember<GSLevel>* functor = createFunctor(&GSLevel::setTimeFactor);
    5454        functor->setObject(this);
    55         CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor"));
     55        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);;
    5656
    5757        // level is loaded: we can start capturing the input
Note: See TracChangeset for help on using the changeset viewer.