-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstructs.h
99 lines (84 loc) · 1.36 KB
/
structs.h
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*********************************
Structs
*********************************/
#ifndef STRUCTS_H
#define STRUCTS_H
typedef struct{
OSTime cur_frame;
OSTime last_frame;
float frame_duration;
f32 FPS;
u8 FPS_index;
f32 FPS_average[10];
}TimeData;
typedef struct{
Light amb;
Light dir;
float angle[3];
int ambcol;
}LightData;
typedef struct {
Mtx modeling;
Mtx projection;
Mtx viewpoint;
Mtx camRot;
u16 normal;
float distance_from_entity;
float horizontal_distance_from_entity;
float vertical_distance_from_entity;
float angle_around_entity;
float pos[3];
float pitch;
float yaw;
float roll;
} Camera;
typedef enum {
IDLE,
WALK,
RUN,
ROLL,
JUMP,
FALL,
MIDAIR,
FALLBACK,
} entity_state;
typedef enum {
NICK,
WILLY,
SKELLY
} entity_type;
typedef struct {
int health;
int damage;
int ammo;
} BaseMechanics;
typedef struct {
Mtx scale_mtx;
Mtx pos_mtx;
Mtx rot_mtx[3];
//Mtx scale;
float size[3];
float pos[3];
float dir[3];
float scale;
float pitch;
float yaw;
float speed;
float vertical_speed;
float forward_speed;
float side_speed;
entity_state state;
entity_type type;
BaseMechanics health;
BaseMechanics damage;
BaseMechanics ammo;
} Entity;
typedef struct {
Entity entity;
s64ModelHelper helper;
} AnimatedEntity;
typedef struct {
Entity entity;
Gfx *mesh;
} StaticEntity;
#endif