From a89f892640cf12f75c7ce18e6e88c70a8d3965ed Mon Sep 17 00:00:00 2001 From: Uneven Prankster Date: Sat, 23 Sep 2023 19:28:45 -0300 Subject: things can always be nicer :D --- src/config.h | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'src/config.h') 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 +#include -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) -- cgit v1.2.3