diff options
Diffstat (limited to 'src/graphics')
-rw-r--r-- | src/graphics/engine/engine.cpp | 30 | ||||
-rw-r--r-- | src/graphics/engine/engine.h | 9 | ||||
-rw-r--r-- | src/graphics/engine/lightning.h | 2 | ||||
-rw-r--r-- | src/graphics/engine/pyro.h | 3 |
4 files changed, 9 insertions, 35 deletions
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 068687a..d368aa6 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -357,22 +357,22 @@ bool Gfx::CEngine::ProcessEvent(const Event &event) } } } - else if (event.type == EVENT_FRAME) - { - m_highlightTime += event.rTime; - } // By default, pass on all events return true; } -void Gfx::CEngine::FrameMove(float rTime) +void Gfx::CEngine::FrameUpdate() { + float rTime = m_app->GetRelTime(); + m_lightMan->UpdateProgression(rTime); m_particle->FrameParticle(rTime); ComputeDistance(); UpdateGeometry(); + m_highlightTime = m_app->GetAbsTime(); + if (m_groundMark.draw) { if (m_groundMark.phase == Gfx::ENG_GR_MARK_PHASE_INC) // growing? @@ -402,16 +402,6 @@ void Gfx::CEngine::FrameMove(float rTime) } } } - - if (m_sound == nullptr) - m_sound = static_cast<CSoundInterface*>( m_iMan->SearchInstance(CLASS_SOUND) ); - - m_sound->FrameMove(rTime); -} - -void Gfx::CEngine::StepSimulation(float rTime) -{ - m_app->StepSimulation(rTime); } bool Gfx::CEngine::WriteScreenShot(const std::string& fileName, int width, int height) @@ -2726,16 +2716,6 @@ int Gfx::CEngine::GetEditIndentValue() return m_editIndentValue; } -void Gfx::CEngine::SetSpeed(float speed) -{ - m_speed = speed; -} - -float Gfx::CEngine::GetSpeed() -{ - return m_speed; -} - void Gfx::CEngine::SetTracePrecision(float factor) { m_tracePrecision = factor; diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 705c83a..1ce93a3 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -664,9 +664,7 @@ public: bool ProcessEvent(const Event& event); //! Called once per frame, the call is the entry point for animating the scene - void FrameMove(float rTime); - //! Evolved throughout the game - void StepSimulation(float rTime); + void FrameUpdate(); //! Writes a screenshot containing the current frame @@ -1099,11 +1097,6 @@ public: //@} //@{ - //! Management of game speed - void SetSpeed(float speed); - float GetSpeed(); - - //@{ //! Management of precision of robot tracks void SetTracePrecision(float factor); float GetTracePrecision(); diff --git a/src/graphics/engine/lightning.h b/src/graphics/engine/lightning.h index e34eb3b..af389f2 100644 --- a/src/graphics/engine/lightning.h +++ b/src/graphics/engine/lightning.h @@ -22,7 +22,7 @@ #pragma once -#include "common/misc.h" +#include "common/event.h" #include "math/vector.h" diff --git a/src/graphics/engine/pyro.h b/src/graphics/engine/pyro.h index 5d2ca63..c0c0144 100644 --- a/src/graphics/engine/pyro.h +++ b/src/graphics/engine/pyro.h @@ -22,7 +22,8 @@ #pragma once -#include "common/misc.h" +#include "common/event.h" +#include "common/global.h" #include "graphics/engine/engine.h" #include "object/object.h" |