#ifndef BASE_H
#define BASE_H

#include <stdio.h>
#include <stdint.h>

//= rhjr: types

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 uint8_t  b8;
typedef uint16_t b16;
typedef uint32_t b32;
typedef uint64_t b64;

#define internal static
#define global   static

//= rhjr: allocator

#define ARENA_DEFAULT_SIZE 2048

typedef struct Arena
{
  u8 *backing_buffer;
  i32 offset;
  i32 size;
}
Arena;

internal void   arena_init(Arena *arena, u8 *backing_buffer, i32 size);
internal void * arena_alloc(Arena *arena, i32 size);
internal void   arena_release(Arena *arena);

//= rhjr: strings

typedef struct String8
{
  u8* contents;
  i32 length;
}
String8;



#endif // BASE_H
