hot reload working

This commit is contained in:
Krzosa Karol
2025-01-26 11:54:31 +01:00
parent 7831cc51d6
commit f98c8e3dfa
31 changed files with 415 additions and 219 deletions

View File

@@ -22,7 +22,7 @@ fn b32 app_update(app_frame_t *frame);
fn void app_init(f32 dpr);
fn void wasm_add_event(app_event_t event) {
app_event_t *ev = ma_push_type(tcx.temp, app_event_t);
app_event_t *ev = ma_push_type(tcx->temp, app_event_t);
*ev = event;
ev->id = ++wasm_event_ids;
ev->alt = wasm_cached.alt;
@@ -99,7 +99,7 @@ fn_wasm_export void wasm_key_down(char *key, b32 ctrl, b32 shift, b32 alt, b32 m
return;
}
s8_t text = s8_copy(tcx.temp, key8);
s8_t text = s8_copy(tcx->temp, key8);
wasm_add_event((app_event_t){
.kind = app_event_kind_text,
.text = text,
@@ -134,7 +134,7 @@ fn_wasm_export b32 wasm_update(f64 time, f32 width, f32 height, f32 dpr) {
wasm_frame.frame = wasm_frame_counter;
b32 animating = app_update(&wasm_frame);
ma_set0(tcx.temp);
ma_set0(tcx->temp);
zero_struct(&wasm_frame);
wasm_last_time = wasm_time;
wasm_frame_counter += 1;