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/GSRoot.h

    r2805 r2817  
    3838namespace orxonox
    3939{
    40     class _OrxonoxExport GSRoot : public RootGameState, public OrxonoxClass
     40    class _OrxonoxExport GSRoot : public RootGameState
    4141    {
    4242        friend class ClassIdentifier<GSRoot>;
    4343
    4444    public:
    45         struct statisticsTickInfo
    46         {
    47             uint64_t    tickTime;
    48             uint32_t    tickLength;
    49         };
    5045   
    5146    public:
     
    5954        float getTimeFactor() { return this->timeFactor_; }
    6055
    61         float getAvgTickTime() { return this->avgTickTime_; }
    62         float getAvgFPS()      { return this->avgFPS_; }
    63 
    64         inline void addTickTime(uint32_t length)
    65             { assert(!this->statisticsTickTimes_.empty()); this->statisticsTickTimes_.back().tickLength += length;
    66               this->periodTickTime_+=length; }
    67 
    6856    private:
    6957        void enter();
     
    7159        void ticked(const Clock& time);
    7260
    73         void setConfigValues();
    74 
    7561        float                 timeFactor_;       //!< A factor that sets the gamespeed. 1 is normal.
    7662        bool                  bPaused_;
    7763        float                 timeFactorPauseBackup_;
    78 
    79         // variables for time statistics
    80         uint64_t              statisticsStartTime_;
    81         std::list<statisticsTickInfo>
    82                               statisticsTickTimes_;
    83         uint32_t              periodTickTime_;
    84         float                 avgFPS_;
    85         float                 avgTickTime_;
    86 
    87         // config values
    88         unsigned int          statisticsRefreshCycle_;
    89         unsigned int          statisticsAvgLength_;
    9064
    9165        // console commands
Note: See TracChangeset for help on using the changeset viewer.