app_update, print events
This commit is contained in:
@@ -5,15 +5,16 @@
|
||||
// #include "debug.c"
|
||||
// #include "ui2.c"
|
||||
|
||||
void on_update() {
|
||||
// r2f64_t rect = {0, 0, 200, 200};
|
||||
// draw_rect(rect, (v4f32_t){0, 0, 0, 1});
|
||||
// draw_textf((v2f64_t){10 + i, 100}, "time = %f, dt = %f", time_g / 1000, dt_g);
|
||||
ma_arena_t *frame_arena;
|
||||
|
||||
// f64_mod(4, 2);
|
||||
void app_update(ma_arena_t *perm_arena, app_event_t *events, i32 event_count) {
|
||||
if (frame_arena == NULL) {
|
||||
frame_arena = ma_push_arena(perm_arena, kib(32));
|
||||
}
|
||||
for (i32 i = 0; i < event_count; i += 1) {
|
||||
s8_t string = s8_serial_data(frame_arena, events + i, &type__app_event_t);
|
||||
draw_text((v2f64_t){0, (f64)i*20.0}, white_color_global, string);
|
||||
}
|
||||
|
||||
// i += 1;
|
||||
// if (i > 200) i = 0;
|
||||
|
||||
// ui_demo();
|
||||
ma_set0(frame_arena);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user