
- Jai-like print procedures - %s formats 'string' and to format a char* you do %cs - It detects if %cs pointer is outside of program memory or stack and asserts - AND same for if a char* is passed to %s - Print directly writes to stdout without any allocations - Basic utlity procedures - Buncha string tests - Beef up assert to display file & line as well - Don't define memcpy procedures if compiler has intrinsics for them - Init memory arena for allocations in initialization time before heap is ready (stack memory) - os_compare_and_swap - Spinlock "primitive" (wrapper around a bool using compare_and_swap) - Switched to using spinlock instead of os mutex in heap for synchronization. - is_pointer_valid() which checks if address is in program_memory or thread stack
20 lines
No EOL
339 B
C
20 lines
No EOL
339 B
C
|
|
|
|
///
|
|
// Build config stuff
|
|
#define VERY_DEBUG 0
|
|
#define RUN_TESTS 0
|
|
|
|
typedef struct Context_Extra {
|
|
int monkee;
|
|
} Context_Extra;
|
|
// This needs to be defined before oogabooga if we want extra stuff in context
|
|
#define CONTEXT_EXTRA Context_Extra
|
|
|
|
#include "oogabooga/oogabooga.c"
|
|
|
|
|
|
// Includes for game goes here
|
|
// ...
|
|
|
|
#include "main.c" |