#ifndef __G_BASE_H__
#define __G_BASE_H__

#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <assert.h>
#include <slibs/slibs.h>

#include <HandmadeMath/HandmadeMath.h>

typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;

typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;

typedef size_t sz;

typedef float f32;
typedef double f64;

typedef HMM_Vec2 vec2;
typedef HMM_Vec3 vec3;
typedef HMM_Vec4 vec4;
typedef HMM_Quat quat;
typedef HMM_Mat2 mat2;
typedef HMM_Mat3 mat3;
typedef HMM_Mat4 mat4;

#define SL_SG_RANGE(x) (sg_range){ .ptr = x.data, .size = x.size * sizeof(*x.data) }

#define g_buffer(type, size) \
    struct {                 \
        type buf[size];      \
        i32 len;             \
    }                        \

#endif
