summaryrefslogtreecommitdiff
path: root/prge_types.h
blob: ff5b860f46731fb0e0d74cde7a825b99e817cff0 (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
#ifndef PRGE_TYPES_H
#define PRGE_TYPES_H

enum KeyState_Enum {
	KeyState_RELEASE = 0,
	KeyState_PRESS = 1
};

typedef struct {
	enum KeyState_Enum last;
	enum KeyState_Enum state;
} Key;

typedef struct {
	V2 mouse_pos;
	V2 last_mouse_pos;
	V2 mouse_offset;
	B32 first_mouse;

	B32 is_running;

	F32 dt;

	Key move_right;
	Key move_forward;
	Key move_left;
	Key move_backward;
	Key move_up;
	Key move_down;
	Key jump;
	Key action_right;
	Key action_up;
	Key action_left;
	Key action_down;
	Key exit;
} Input;

typedef struct {
	V3 pos;
} Vertex;

typedef struct {
	Vertex *verts;
	U32 nverts;
	U32 *indices;
	U32 nindices;
	U32 vao, vbo, ebo;
} Mesh;

#endif /* PRGE_TYPES_H */