diff options
Diffstat (limited to 'src/utils.h')
| -rw-r--r-- | src/utils.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h index 2d367d0..92f64ba 100644 --- a/src/utils.h +++ b/src/utils.h @@ -5,4 +5,19 @@ #define BLANK_DEFAULT -1 #define NULL_TERM '\0' -#define NULL_TERM_SZ 1
\ No newline at end of file +#define NULL_TERM_SZ 1 + +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 TO_FIXED(x) ((fx32)(x) << FIXED_POINT_BITS) +#define FROM_FIXED(x) ((x) >> FIXED_POINT_BITS)
\ No newline at end of file |
