Mercurial > fife-parpg
diff engine/core/model/metamodel/timeprovider.h @ 181:56ac89189bc4
fixed time handling in fife:
- the time scaling method was unreliable when changing the time factors (jumping in the moment of the change)
- replaced much calls to SDL_GetTicks with TimerManager::instance()->getTime()
- some other time related cleanup
author | spq@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 31 Jan 2009 04:15:43 +0000 |
parents | 90005975cdbb |
children | 5816ab527da8 |
line wrap: on
line diff
--- a/engine/core/model/metamodel/timeprovider.h Fri Jan 30 00:58:43 2009 +0000 +++ b/engine/core/model/metamodel/timeprovider.h Sat Jan 31 04:15:43 2009 +0000 @@ -60,13 +60,18 @@ */ float getTotalMultiplier() const; - /** Returns current game ticks. Fetched from furthest master to reduce system calls. + /** Returns current game ticks, already scaled. */ - unsigned int getGameTicks() const; + unsigned int getGameTime() const; private: TimeProvider* m_master; float m_multiplier; + double m_time_static, m_time_scaled; + + /** Returns current game ticks, already scaled, more precise. + */ + double getPreciseGameTime() const; }; /** Utility function to calculate time scaling. Mostly done to avoid littering other code