2022-03-16 20:50:55 +01:00
|
|
|
#include "includes.hpp"
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#define ISDEBUG true
|
|
|
|
#else
|
|
|
|
#define ISDEBUG false
|
|
|
|
#endif
|
|
|
|
|
2022-03-16 21:37:21 +01:00
|
|
|
#define RIP(format, ... ) { fprintf(stderr, format "\n", ##__VA_ARGS__); exit(EXIT_FAILURE); }
|
|
|
|
|
2022-03-17 18:25:16 +01:00
|
|
|
#define LISTENER(name) void listener_##name(wl_listener*, void*); inline wl_listener listen_##name = { .notify = listener_##name };
|
2022-03-17 20:22:29 +01:00
|
|
|
#define DYNLISTENER(name) wl_listener listen_##name = { .notify = Events::listener_##name };
|
|
|
|
|
|
|
|
#define VECINRECT(vec, x1, y1, x2, y2) (vec.x >= (x1) && vec.x <= (x2) && vec.y >= (y1) && vec.y <= (y2))
|