twn_timer.c: time limiter for game ticks

This commit is contained in:
veclavtalica
2025-01-26 02:37:21 +03:00
parent 16bd49b42e
commit 9ddc5c4a66
4 changed files with 85 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include "twn_util_c.h"
#include "twn_game_object_c.h"
#include "twn_textures_c.h"
#include "system/twn_timer.h"
#include <SDL2/SDL.h>
#include <physfs.h>
@ -216,7 +217,9 @@ static void main_loop(void) {
input_state_update(&ctx.input);
profile_start("game tick");
start_sanity_timer(2000);
game_object_tick();
end_sanity_timer();
profile_end("game tick");
input_state_update_postframe(&ctx.input);