DDraceNetwork Docs
smooth_time.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3
4#ifndef ENGINE_CLIENT_SMOOTH_TIME_H
5#define ENGINE_CLIENT_SMOOTH_TIME_H
6
7#include <cstdint>
8
9class CGraph;
10
12{
13public:
15 {
19 };
20
21private:
22 int64_t m_Snap;
23 int64_t m_Current;
24 int64_t m_Target;
25 int64_t m_Margin;
26
29
30public:
31 void Init(int64_t Target);
32 void SetAdjustSpeed(EAdjustDirection Direction, float Value);
33
34 int64_t Get(int64_t Now) const;
35
36 void UpdateInt(int64_t Target);
37 void Update(CGraph *pGraph, int64_t Target, int TimeLeft, EAdjustDirection AdjustDirection);
38
39 void UpdateMargin(int64_t Margin);
40};
41
42#endif
Definition: graph.h:17
Definition: smooth_time.h:12
int64_t Get(int64_t Now) const
Definition: smooth_time.cpp:26
int64_t m_Snap
Definition: smooth_time.h:22
void Update(CGraph *pGraph, int64_t Target, int TimeLeft, EAdjustDirection AdjustDirection)
Definition: smooth_time.cpp:54
void UpdateMargin(int64_t Margin)
Definition: smooth_time.cpp:99
int64_t m_Target
Definition: smooth_time.h:24
void SetAdjustSpeed(EAdjustDirection Direction, float Value)
Definition: smooth_time.cpp:21
EAdjustDirection
Definition: smooth_time.h:15
@ ADJUSTDIRECTION_DOWN
Definition: smooth_time.h:16
@ NUM_ADJUSTDIRECTIONS
Definition: smooth_time.h:18
@ ADJUSTDIRECTION_UP
Definition: smooth_time.h:17
int64_t m_Current
Definition: smooth_time.h:23
int64_t m_Margin
Definition: smooth_time.h:25
void Init(int64_t Target)
Definition: smooth_time.cpp:10
void UpdateInt(int64_t Target)
Definition: smooth_time.cpp:46
int m_SpikeCounter
Definition: smooth_time.h:27
float m_aAdjustSpeed[NUM_ADJUSTDIRECTIONS]
Definition: smooth_time.h:28