Added a font registry, a text rendering helper, and an FPS counter function

This commit is contained in:
2026-05-06 11:12:42 -04:00
parent 284ffd7b4a
commit c3847160da
9 changed files with 81 additions and 19 deletions

View File

@@ -99,7 +99,7 @@ akerr_ErrorContext *sprite_load_json(char *filename)
CATCH(errctx, get_json_integer_value((json_t *)json, "width", &obj->width));
CATCH(errctx, get_json_integer_value((json_t *)json, "height", &obj->height));
CATCH(errctx, get_json_integer_value((json_t *)json, "speed", (int *)&obj->speed));
obj->speed = obj->speed * 1000000;
obj->speed = obj->speed * TIME_ONESEC_MS;
CATCH(errctx, get_json_boolean_value((json_t *)json, "loop", &obj->loop));
CATCH(errctx, get_json_boolean_value((json_t *)json, "loopReverse", &obj->loopReverse));