Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 21, 2009, 10:17:59 PM (15 years ago)
Author:
rgrieder
Message:

Removed GameState template and renamed GameStateBase to GameState.
Moved statistics stuff (fps and tick time) to Game and removed the remaining hacks in GSGraphics and GSRoot.

File:
1 edited

Legend:

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

    r2816 r2817  
    4444#include "overlays/console/InGameConsole.h"
    4545#include "gui/GUIManager.h"
    46 
    47 // for compatibility
    4846#include "GraphicsManager.h"
     47#include "Game.h"
    4948
    5049namespace orxonox
    5150{
    5251    GSGraphics::GSGraphics()
    53         : GameState<GSRoot>("graphics")
     52        : GameState("graphics")
    5453        , inputManager_(0)
    5554        , console_(0)
     
    157156        uint64_t timeAfterTick = time.getRealMicroseconds();
    158157
    159         // Also add our tick time to the list in GSRoot
    160         this->getParent()->addTickTime(timeAfterTick - timeBeforeTick);
    161 
    162         // Update statistics overlay. Note that the values only change periodically in GSRoot.
    163         GraphicsManager::getInstance().setAverageFramesPerSecond(this->getParent()->getAvgFPS());
    164         GraphicsManager::getInstance().setAverageTickTime(this->getParent()->getAvgTickTime());
     158        // Also add our tick time
     159        Game::getInstance().addTickTime(timeAfterTick - timeBeforeTick);
    165160
    166161        this->graphicsManager_->update(time);
Note: See TracChangeset for help on using the changeset viewer.