await sprite sheet in game thread

This commit is contained in:
jacob 2024-08-06 18:11:04 -05:00
parent 38a2478325
commit f8549618bb

View File

@ -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;