summaryrefslogtreecommitdiff
path: root/main/main_timer_sync.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/main_timer_sync.h')
-rw-r--r--main/main_timer_sync.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/main/main_timer_sync.h b/main/main_timer_sync.h
index f8497140cd..789e0c9d65 100644
--- a/main/main_timer_sync.h
+++ b/main/main_timer_sync.h
@@ -34,11 +34,11 @@
#include "core/config/engine.h"
struct MainFrameTime {
- float idle_step; // time to advance idles for (argument to process())
+ float process_step; // delta time to advance during process()
int physics_steps; // number of times to iterate the physics engine
float interpolation_fraction; // fraction through the current physics tick
- void clamp_idle(float min_idle_step, float max_idle_step);
+ void clamp_process_step(float min_process_step, float max_process_step);
};
class MainTimerSync {
@@ -49,7 +49,7 @@ class MainTimerSync {
// logical game time since last physics timestep
float time_accum = 0;
- // current difference between wall clock time and reported sum of idle_steps
+ // current difference between wall clock time and reported sum of process_steps
float time_deficit = 0;
// number of frames back for keeping accumulated physics steps roughly constant.
@@ -67,7 +67,7 @@ class MainTimerSync {
int fixed_fps = 0;
protected:
- // returns the fraction of p_frame_slice required for the timer to overshoot
+ // returns the fraction of p_physics_step required for the timer to overshoot
// before advance_core considers changing the physics_steps return from
// the typical values as defined by typical_physics_steps
float get_physics_jitter_fix();
@@ -76,14 +76,14 @@ protected:
// return value: number of frames back this data is consistent
int get_average_physics_steps(float &p_min, float &p_max);
- // advance physics clock by p_idle_step, return appropriate number of steps to simulate
- MainFrameTime advance_core(float p_frame_slice, int p_iterations_per_second, float p_idle_step);
+ // advance physics clock by p_process_step, return appropriate number of steps to simulate
+ MainFrameTime advance_core(float p_physics_step, int p_physics_fps, float p_process_step);
// calls advance_core, keeps track of deficit it adds to animaption_step, make sure the deficit sum stays close to zero
- MainFrameTime advance_checked(float p_frame_slice, int p_iterations_per_second, float p_idle_step);
+ MainFrameTime advance_checked(float p_physics_step, int p_physics_fps, float p_process_step);
// determine wall clock step since last iteration
- float get_cpu_idle_step();
+ float get_cpu_process_step();
public:
MainTimerSync();
@@ -96,7 +96,7 @@ public:
void set_fixed_fps(int p_fixed_fps);
// advance one frame, return timesteps to take
- MainFrameTime advance(float p_frame_slice, int p_iterations_per_second);
+ MainFrameTime advance(float p_physics_step, int p_physics_fps);
};
#endif // MAIN_TIMER_SYNC_H