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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/core/input/InputManager.cc

    r2662 r2800  
    4343
    4444#include "util/Exception.h"
     45#include "core/Clock.h"
    4546#include "core/CoreIncludes.h"
    4647#include "core/ConfigValueIncludes.h"
     
    670671    @brief
    671672        Public interface. Only reloads immediately if the call stack doesn't
    672         include the tick() method.
     673        include the update() method.
    673674    @param joyStickSupport
    674675        Whether or not to initialise joy sticks as well.
     
    742743    @brief
    743744        Updates the states and the InputState situation.
    744     @param dt
    745         Delta time
    746     */
    747     void InputManager::tick(float dt)
     745    @param time
     746        Clock holding the current time.
     747    */
     748    void InputManager::update(const Clock& time)
    748749    {
    749750        if (internalState_ == Uninitialised)
     
    849850                }
    850851
    851             // tick the handlers for each active handler
     852            // update the handlers for each active handler
    852853            for (unsigned int i = 0; i < devicesNum_; ++i)
    853854            {
    854                 activeStatesTop_[i]->tickInput(dt, i);
     855                activeStatesTop_[i]->updateInput(time.getDeltaTime(), i);
    855856                if (stateMaster_->isInputDeviceEnabled(i))
    856                     stateMaster_->tickInput(dt, i);
    857             }
    858 
    859             // tick the handler with a general tick afterwards
     857                    stateMaster_->updateInput(time.getDeltaTime(), i);
     858            }
     859
     860            // update the handler with a general tick afterwards
    860861            for (unsigned int i = 0; i < activeStatesTicked_.size(); ++i)
    861                 activeStatesTicked_[i]->tickInput(dt);
    862             stateMaster_->tickInput(dt);
     862                activeStatesTicked_[i]->updateInput(time.getDeltaTime());
     863            stateMaster_->updateInput(time.getDeltaTime());
    863864        }
    864865
     
    869870    @brief
    870871        Updates the currently active states (according to activeStates_) for each device.
    871         Also, a list of all active states (no duplicates!) is compiled for the general tick.
     872        Also, a list of all active states (no duplicates!) is compiled for the general update().
    872873    */
    873874    void InputManager::_updateActiveStates()
     
    12901291    @remarks
    12911292        You can't remove the internal states "empty", "calibrator" and "detector".
    1292         The removal process is being postponed if InputManager::tick() is currently running.
     1293        The removal process is being postponed if InputManager::update() is currently running.
    12931294    */
    12941295    bool InputManager::requestDestroyState(const std::string& name)
Note: See TracChangeset for help on using the changeset viewer.