aboutsummaryrefslogtreecommitdiff
path: root/eng/inc/_.h
blob: adc619df154dd0bfb6560b5f27300932e5d6f797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once
#include "gameng.h"
#include "game.h"
#include "cfg.h"
#include "TZR.h"
#include "entityimpl.h"
#include "vec2.h"
#include "entityeng.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)