aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 0000000..fc12544
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,17 @@
+#pragma once
+
+typedef int i32;
+typedef long long i64;
+
+typedef unsigned int u32;
+typedef unsigned long long u64;
+
+typedef float f32;
+typedef double f64;
+
+// 24.8 format
+typedef i32 fx32;
+#define FIXED_POINT_BITS 8
+#define FIXED_POINT_ONE (1 << FIXED_POINT_BITS)
+#define TO_FIXED(x) ((fx32)(x) << FIXED_POINT_BITS)
+#define FROM_FIXED(x) ((x) >> FIXED_POINT_BITS) \ No newline at end of file