diff options
| author | Uneven Prankster <unevenprankster@protonmail.com> | 2023-09-23 19:28:45 -0300 |
|---|---|---|
| committer | Uneven Prankster <unevenprankster@protonmail.com> | 2023-09-23 19:28:45 -0300 |
| commit | a89f892640cf12f75c7ce18e6e88c70a8d3965ed (patch) | |
| tree | e917bda607b86cb7c5bd80df2e5abf549d972163 /src/config.h | |
| parent | 83505b7be49dbf7789deb814bd159d9c37181d05 (diff) | |
things can always be nicer :D
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/config.h b/src/config.h index 40a095c..81a2a51 100644 --- a/src/config.h +++ b/src/config.h @@ -1,20 +1,26 @@ #pragma once -typedef char i8; -typedef unsigned char u8; +#include <stddef.h> +#include <stdint.h> -typedef short i16; -typedef unsigned short u16; +typedef int8_t i8; +typedef uint8_t u8; -typedef int i32; -typedef long long i64; +typedef int16_t i16; +typedef uint16_t u16; -typedef unsigned int u32; -typedef unsigned long long u64; +typedef int32_t i32; +typedef int64_t i64; + +typedef uint32_t u32; +typedef uint64_t u64; typedef float f32; typedef double f64; +typedef unsigned char byte; +typedef ptrdiff_t size; + /* You may be wondering "why fixed point values???", and that's simple Floating Point was a mistake and has caused great suffering to countless. @@ -56,4 +62,8 @@ typedef i8 b32; # endif #else # define assert(c) -#endif
\ No newline at end of file +#endif + +#define sizeof(x) (size)sizeof(x) +#define countof(a) (sizeof(a) / sizeof(*(a))) +#define lengthof(s) (countof(s) - 1) |
