wasm events to list, wm_char

This commit is contained in:
krzosa
2025-01-03 08:24:40 +01:00
parent 6933566a86
commit 3cdfbd1957
7 changed files with 68 additions and 59 deletions

View File

@@ -9,20 +9,17 @@ gfx_t *gfx = NULL;
void app_init(void) {
ma_arena_t *perm = &tcx._perm;
tcx.temp = ma_push_arena(perm, mib(1));
gfx = ma_push_type(perm, gfx_t);
}
void app_update(void) {
ma_set0(tcx.temp);
for (app_event_t *ev = app_iterate_events(); app_is_event_valid(ev); app_next_event(&ev)) {
void app_update(app_event_list_t events) {
for (app_event_t *ev = events.first; ev; ev = ev->next) {
// update
}
// These steps should be totally optional!!
{
app_event_t *ev = app_get_last_event();
app_event_t *ev = events.last;
f64 delta = app_get_anim_delta_time();
f64 time = app_get_anim_time();