Add movement relative to time
Previously movement was based on frames rather than time. I added time_get_dt() function for getting time since last frame and changed rotation speed to use this function. Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode@xyz>
This commit is contained in:
1 parent
415d4394c2
commit
7d6156be01
6 files changed
+42
-3
No files matched your search
@@ -12,6 +12,13 @@
|
||||
#ifndef TIME_UTILS_H_
|
||||
#define TIME_UTILS_H_
|
||||
|
||||
#include "commons.h"
|
||||
|
||||
rse_err_t time_init(void);
|
||||
void time_update(void);
|
||||
|
||||
double time_get_sec_from_start(void);
|
||||
|
||||
double time_get_dt(void);
|
||||
|
||||
#endif // !TIME_UTILS_H_
|
||||
Reference in new issue
Block a user