summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authortheo <arisstephenson2@gmail.com>2020-06-13 17:02:27 -0700
committertheo <arisstephenson2@gmail.com>2020-06-13 17:02:27 -0700
commit66fcdf618665694fb5f5c2d3788561f4e638f167 (patch)
tree106b704cf63fa68f2c714247958b013fcf38b0d0 /include/global.h
parent8e1ca1936b4066fa252a14576cb5e4e79aff92b8 (diff)
clang-format
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/include/global.h b/include/global.h
index 5e1677ca..13f67e6e 100644
--- a/include/global.h
+++ b/include/global.h
@@ -11,15 +11,16 @@
#define asm_comment(x) asm volatile("@ -- " x " -- ")
#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided")
-#if defined (__APPLE__) || defined (__CYGWIN__)
+#if defined(__APPLE__) || defined(__CYGWIN__)
// Get the IDE to stfu
// We define it this way to fool preproc.
-#define INCBIN(...) {0}
-#define INCBIN_U8 INCBIN
+#define INCBIN(...) \
+ { 0 }
+#define INCBIN_U8 INCBIN
#define INCBIN_U16 INCBIN
#define INCBIN_U32 INCBIN
-#define INCBIN_S8 INCBIN
+#define INCBIN_S8 INCBIN
#define INCBIN_S16 INCBIN
#define INCBIN_S32 INCBIN
#define _(x) (x)
@@ -28,20 +29,20 @@
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
-#define SWAP(a, b, temp) \
-{ \
- temp = a; \
- a = b; \
- b = temp; \
-}
+#define SWAP(a, b, temp) \
+ { \
+ temp = a; \
+ a = b; \
+ b = temp; \
+ }
// useful math macros
// Converts a number to Q8.8 fixed-point format
-#define Q_8_8(n) ((s16)((n) * 256))
+#define Q_8_8(n) ((s16)((n)*256))
// Converts a number to Q4.12 fixed-point format
-#define Q_4_12(n) ((s16)((n) * 4096))
+#define Q_4_12(n) ((s16)((n)*4096))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))