From f8549618bbf0f650b17c5aa81aa24374af624c88 Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 6 Aug 2024 18:11:04 -0500 Subject: [PATCH] await sprite sheet in game thread --- src/game.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 7dcbb6c8..007c81b7 100644 --- a/src/game.c +++ b/src/game.c @@ -212,11 +212,13 @@ INTERNAL void game_update(void) /* TODO: remove this (testing) */ /* Initialize entities */ +#if 0 static b32 run = 0; if (!run) { run = 1; spawn_test_entities(); } +#endif ++G.world.tick_id; G.world.tick_ts = sys_timestamp(); @@ -295,7 +297,7 @@ INTERNAL void game_update(void) * ========================== */ if (entity_has_prop(ent, ENTITY_PROP_ANIMATING)) { - struct sprite_sheet *sheet = sprite_sheet_from_tag_async(sprite_frame_scope, ent->sprite); + struct sprite_sheet *sheet = sprite_sheet_from_tag_await(sprite_frame_scope, ent->sprite); struct sprite_sheet_span span = sprite_sheet_get_span(sheet, ent->sprite_span_name); f64 time_in_frame = ent->animation_time_in_frame + G.world.dt;