JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Moved macros and such from config.h to common.h
[vor.git] / common.h
index ac9d87e..be0910e 100644 (file)
--- a/common.h
+++ b/common.h
 #define abs(a) ((a)<=0 ? -(a) : (a))
 #endif
 
+#define CONDERROR(a) if((a)) {initerror = strdup(SDL_GetError());return 1;}
+#define NULLERROR(a) CONDERROR((a) == NULL)
+
+#ifndef DEBUG
+#define DEBUG 0
+#endif
+
+#define debug(x) if(DEBUG) { x; }
+
 #endif // VOR_COMMON_H