Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 19, 2009, 10:34:54 AM (16 years ago)
Author:
rgrieder
Message:

Renaming "tick" to "update" for all those classes not inheriting from Tickable to avoid confusions.
GameState::ticked still exists, but that's going to change anyway.

Location:
code/branches/gui/src/orxonox
Files:
10 edited

Legend:

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

    r2171 r2800  
    3131
    3232#include "core/input/InputManager.h"
     33#include "core/Clock.h"
    3334#include "core/CommandLine.h"
    3435#include "core/Core.h"
     
    6061        GSLevel::enter(this->getParent()->getViewport());
    6162
    62         client_->tick(0);
     63        // TODO: Get Clock from Game or GameStateManager, but with 0 delta time
     64        client_->update(Clock());
    6365    }
    6466
     
    7880    {
    7981        GSLevel::ticked(time);
    80         client_->tick(time.getDeltaTime());
     82        client_->update(time);
    8183
    8284        this->tickChild(time);
  • code/branches/gui/src/orxonox/gamestates/GSDedicated.cc

    r2662 r2800  
    3030#include "GSDedicated.h"
    3131
     32#include "core/Clock.h"
    3233#include "core/CommandLine.h"
    3334#include "core/Core.h"
     
    8384            timeSinceLastUpdate_ -= static_cast<unsigned int>(timeSinceLastUpdate_ / NETWORK_PERIOD) * NETWORK_PERIOD;
    8485            GSLevel::ticked(time);
    85             server_->tick(time.getDeltaTime());
     86            server_->update(time);
    8687            this->tickChild(time);
    8788        }
  • code/branches/gui/src/orxonox/gamestates/GSGUI.cc

    r2790 r2800  
    3131
    3232#include <OgreViewport.h>
     33#include "core/Clock.h"
    3334#include "core/input/InputManager.h"
    3435#include "core/input/SimpleInputState.h"
     
    6465    {
    6566        // tick CEGUI
    66         guiManager_->tick(time.getDeltaTime());
     67        guiManager_->update(time);
    6768
    6869        this->tickChild(time);
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.cc

    r2759 r2800  
    233233        float dt = time.getDeltaTime();
    234234
    235         this->inputManager_->tick(dt);
     235        this->inputManager_->update(time);
    236236        // tick console
    237         this->console_->tick(dt);
     237        this->console_->update(time);
    238238        this->tickChild(time);
    239239
  • code/branches/gui/src/orxonox/gamestates/GSRoot.cc

    r2799 r2800  
    134134        uint64_t timeBeforeTick = time.getRealMicroseconds();
    135135
    136         Core::getInstance().tick(time);
     136        Core::getInstance().update(time);
    137137
    138138        for (ObjectList<TimerBase>::iterator it = ObjectList<TimerBase>::begin(); it; ++it)
  • code/branches/gui/src/orxonox/gamestates/GSServer.cc

    r2171 r2800  
    7373    {
    7474        GSLevel::ticked(time);
    75         server_->tick(time.getDeltaTime());
     75        server_->update(time);
    7676        this->tickChild(time);
    7777    }
  • code/branches/gui/src/orxonox/gamestates/GSStandalone.cc

    r2790 r2800  
    8686        }
    8787        // tick CEGUI
    88         guiManager_->tick(time.getDeltaTime());
     88        guiManager_->update(time);
    8989
    9090        GSLevel::ticked(time);
  • code/branches/gui/src/orxonox/gui/GUIManager.h

    r2790 r2800  
    4040#include <CEGUIInputEvent.h>
    4141#include <CEGUISystem.h>
     42#include "core/Clock.h"
    4243#include "core/input/InputInterfaces.h"
    4344
     
    7172        bool initialise(Ogre::RenderWindow* renderWindow);
    7273        void loadScene(const std::string& name);
    73         void tick(float dt)
     74        void update(const Clock& time)
    7475        {
    7576            assert(guiSystem_);
    76             guiSystem_->injectTimePulse(dt);
     77            guiSystem_->injectTimePulse(time.getDeltaTime());
    7778        }
    7879        void showGUI(const std::string& name, Ogre::SceneManager* sceneManager);// bool showBackground); // tolua_export
     
    108109        { guiSystem_->injectMouseWheelChange(rel);}
    109110
    110         void tickInput(float dt) { }
    111         void tickKey(float dt) { }
    112         void tickMouse(float dt) { }
     111        void updateInput(float dt) { }
     112        void updateKey(float dt) { }
     113        void updateMouse(float dt) { }
    113114
    114115        void loadScenes();
  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.cc

    r2087 r2800  
    4242#include "util/Convert.h"
    4343#include "util/Debug.h"
     44#include "core/Clock.h"
    4445#include "core/CoreIncludes.h"
    4546#include "core/ConfigValueIncludes.h"
     
    347348        @brief Used to control the actual scrolling and the cursor.
    348349    */
    349     void InGameConsole::tick(float dt)
     350    void InGameConsole::update(const Clock& time)
    350351    {
    351352        if (this->scroll_ != 0)
     
    358359                // enlarge oldTop a little bit so that this exponential function
    359360                // reaches 0 before infinite time has passed...
    360                 float deltaScroll = (oldTop - 0.01) * dt * this->scrollSpeed_;
     361                float deltaScroll = (oldTop - 0.01) * time.getDeltaTime() * this->scrollSpeed_;
    361362                if (oldTop - deltaScroll >= 0)
    362363                {
     
    373374                // scrolling up
    374375                // note: +0.01 for the same reason as when scrolling down
    375                 float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * dt * this->scrollSpeed_;
     376                float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * time.getDeltaTime() * this->scrollSpeed_;
    376377                if (oldTop - deltaScroll <= -1.2 * this->relativeHeight)
    377378                {
     
    388389        if (this->bActive_)
    389390        {
    390             this->cursor_ += dt;
     391            this->cursor_ += time.getDeltaTime();
    391392            if (this->cursor_ >= this->blinkTime)
    392393            {
  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.h

    r2087 r2800  
    5353        void setConfigValues();
    5454
    55         virtual void tick(float dt);
     55        void update(const Clock& time);
    5656
    5757        static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
Note: See TracChangeset for help on using the changeset viewer.