major rework

This commit is contained in:
2026-01-03 16:22:42 +01:00
parent 4998a057f5
commit 716527fa8f
14 changed files with 2431 additions and 2261 deletions

13
engine-macros.h Normal file
View File

@@ -0,0 +1,13 @@
#pragma once
#define STR(x) #x
#if !defined(NDEBUG) && defined(USE_PRINTF)
#define assuming(expr) \
((expr) ? 0 : (fprintf(stderr, "assumption <" #expr "> failed on line %d\n", __LINE__), __builtin_trap(), 0))
#elif !defined(NDEBUG)
#define assuming(expr) \
((expr) ? 0 : (__builtin_trap(), 0))
#else
#define assuming(expr) ((expr) ? 0 : (__builtin_unreachable(), 0))
#endif