finished with base?

This commit is contained in:
ed
2025-02-07 17:11:28 -05:00
parent 4ba6e69156
commit d7498d9511
13 changed files with 268 additions and 122 deletions
+29
View File
@@ -22,6 +22,35 @@ log_select(Log* log) {
log_active = log;
}
////////////////////////////////
//~ rjf: Log Building
void
log_msg(LogMsgKind kind, String8 string) {
if(log_active != 0 && log_active->top_scope != 0) {
String8 string_copy = push_str8_copy(log_active->arena, string);
str8_list_push(log_active->arena, &log_active->top_scope->strings[kind], string_copy);
}
}
void
log_msgf(LogMsgKind kind, char *fmt, ...) {
if(log_active != 0)
{
// TODO(Ed): Review
TempArena scratch = scratch_begin(0, 0);
va_list args;
va_start(args, fmt);
String8 string = push_str8fv(scratch.arena, fmt, args);
log_msg(kind, string);
va_end(args);
scratch_end(scratch);
}
}
////////////////////////////////
//~ rjf: Log Scopes