blob: 988206a4caac317d7ad3636e0cc7132de19e3860 (
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
50
51
52
53
54
55
56
57
58
59
60
|
#ifndef TYPES_H
#define TYPES_H
/* NOTE(pryazha): Basic types */
#include <stdint.h>
typedef int8_t S8;
typedef int16_t S16;
typedef int32_t S32;
typedef int64_t S64;
typedef uint8_t U8;
typedef uint16_t U16;
typedef uint32_t U32;
typedef uint64_t U64;
typedef S32 B32;
typedef float F32;
typedef double F64;
typedef struct {
F32 x, y;
} V2F;
typedef struct {
F32 x, y, z;
} V3F;
typedef struct {
F32 x, y, z, w;
} V4F;
/* NOTE(pryazha): column-major order */
typedef struct {
V4F m0, m1, m2, m3;
} MAT4;
typedef struct {
U64 capacity;
U64 used;
U8 *memory;
} Arena;
/* NOTE(pryazha): String types */
typedef struct {
U8 *str;
U64 size;
} String8;
typedef struct {
struct String8Node *next;
String8 string;
} String8Node;
typedef struct {
String8Node *first;
String8Node *last;
} String8List;
static F32 pi_F32 = 3.14159265359f;
#endif /* TYPES_H */
|