summaryrefslogtreecommitdiff
path: root/prb_types.h
blob: bf6cd436bf180386f2e8d2d7eeec74d55aa463a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;

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

typedef float f32;
typedef double f64;

typedef struct {
	f32 x;
	f32 y;
} v2;

typedef struct {
	f32 x;
	f32 y;
	f32 z;
} v3;

typedef struct {
	f32 x;
	f32 y;
	f32 z;
	f32 w;
} v4;

// column-major
typedef struct {
	v4 c0;
	v4 c1;
	v4 c2;
	v4 c3;
} mat4;

typedef struct {
	v2 start;
	v2 end;
} rect_t;

typedef struct {
	void *memory;
	u64 capacity;
	u64 used;
} arena_t;