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:
@@ -3,6 +3,7 @@
|
||||
#include "graphics/rse_graphics.h"
|
||||
#include "utilities/errors_common.h"
|
||||
#include "SDL3/SDL_thread.h"
|
||||
#include "utilities/time_utils.h"
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
@@ -15,6 +16,7 @@ int main(int argc, char** argv)
|
||||
|
||||
SDL_SetLogPriorities(SDL_LOG_PRIORITY_VERBOSE);
|
||||
|
||||
STATUS_CHECK(time_init());
|
||||
STATUS_CHECK(rse_graphics_init(&context));
|
||||
STATUS_CHECK(rse_graphics_test_function(context));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user