diff options
Diffstat (limited to 'eng/inc/_.h')
-rw-r--r-- | eng/inc/_.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/eng/inc/_.h b/eng/inc/_.h new file mode 100644 index 0000000..9e14d77 --- /dev/null +++ b/eng/inc/_.h @@ -0,0 +1,15 @@ +#pragma once +#include "gameng.h" +#include "game.h" +#include "cfg.h" +#include "TZR.h" +#include <time.h> +#include <errno.h> + +#define defer(X) if (atexit(X)) { X(); panic("defer"); } +#define auto __auto_type +#define foreach(E, L) for (auto E = (L); E != NULL; E = E->next) +#define forloop(I, F, T) for (auto I = F; I < T; I++) +#define with(I, T) auto I = (T); if (I) +#define plog(...) printf("\x1b[94mLOG %s:%s:%d\x1b[0m \t", __FILE_NAME__, __FUNCTION__, __LINE__), printf(__VA_ARGS__), putchar('\n') +#define panic(...) plog(__VA_ARGS__), exit(EXIT_FAILURE) |