eliminate more cruft in engine/frontend layers; sketch out new frontend msg processing loop

This commit is contained in:
Ryan Fleury
2024-08-30 18:08:29 -07:00
parent 7004994b25
commit 7645d00392
7 changed files with 268 additions and 153 deletions
+1 -24
View File
@@ -7788,6 +7788,7 @@ d_tick(Arena *arena, DI_Scope *di_scope, D_CmdList *cmds, F32 dt)
}
arena_clear(d_state->msgs_arena);
MemoryZeroStruct(&d_state->msgs);
scratch_end(scratch);
}
//////////////////////////////
@@ -9610,27 +9611,3 @@ d_tick(Arena *arena, DI_Scope *di_scope, D_CmdList *cmds, F32 dt)
ProfEnd();
}
internal void
d_end_frame(void)
{
ProfBeginFunction();
//- rjf: write config changes
ProfScope("write config changes")
{
for(D_CfgSrc src = (D_CfgSrc)0; src < D_CfgSrc_COUNT; src = (D_CfgSrc)(src+1)) ProfScope("write %.*s config data", str8_varg(d_cfg_src_string_table[src]))
{
if(d_state->cfg_write_issued[src])
{
d_state->cfg_write_issued[src] = 0;
String8 path = d_cfg_path_from_src(src);
os_write_data_list_to_file_path(path, d_state->cfg_write_data[src]);
}
arena_clear(d_state->cfg_write_arenas[src]);
MemoryZeroStruct(&d_state->cfg_write_data[src]);
}
}
ProfEnd();
}
-1
View File
@@ -1575,6 +1575,5 @@ __VA_ARGS__\
internal void d_init(CmdLine *cmdln, D_StateDeltaHistory *hist);
internal D_CmdList d_gather_root_cmds(Arena *arena);
internal void d_tick(Arena *arena, DI_Scope *di_scope, D_CmdList *cmds, F32 dt);
internal void d_end_frame(void);
#endif // DBG_ENGINE_CORE_H