summaryrefslogtreecommitdiff
path: root/tools/gbagfx/global.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2019-07-29 09:01:55 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2019-07-29 09:01:55 -0400
commit3e27227b83c2c602237f016f04f2c5fa1e31de87 (patch)
tree4bce050a1fc6c364f937c33dcf58daf283a241d1 /tools/gbagfx/global.h
parent7d02658bfce6a57a5f845f44cbda412b9777113a (diff)
Add sources and compilation guide
Diffstat (limited to 'tools/gbagfx/global.h')
-rw-r--r--tools/gbagfx/global.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/gbagfx/global.h b/tools/gbagfx/global.h
new file mode 100644
index 0000000..65dd351
--- /dev/null
+++ b/tools/gbagfx/global.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED __attribute__((__unused__))
+
+#endif // _MSC_VER
+
+#endif // GLOBAL_H