-#ifndef VG_LOG_H
-#define VG_LOG_H
+#pragma once
+#include "vg_platform.h"
#include <stdio.h>
-#include "vg_stdint.h"
#define VG_LOG_MCSTR(S) VG_LOG_MCSTR2(S)
#define VG_LOG_MCSTR2(S) #S
#define PRINTF_U64 "%lu"
#endif
-#ifdef VG_GAME
+#ifdef VG_ENGINE
#include "dep/sdl/include/SDL.h"
- static SDL_SpinLock log_print_sl;
#endif
-struct vg_log{
+struct vg_log
+{
char log[64][96];
u32 log_line_count, log_line_current;
-}
-static vg_log;
-static void vg_logx( FILE *file,
- const char *location, const char *prefix,
- const char *colour,
- const char *fmt, ... );
+#ifdef VG_ENGINE
+ SDL_SpinLock print_sl;
+#endif
+}
+extern vg_log;
-static void _vg_logx_va( FILE *file,
- const char *location, const char *prefix,
- const char *colour,
- const char *fmt, va_list args );
+void vg_logx( FILE *file,
+ const char *location, const char *prefix,
+ const char *colour,
+ const char *fmt, ... );
-static void vg_print_backtrace(void);
+void _vg_logx_va( FILE *file,
+ const char *location, const char *prefix,
+ const char *colour,
+ const char *fmt, va_list args );
+void vg_print_backtrace(void);
-#endif