-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
60 lines (46 loc) · 888 Bytes
/
Copy pathmain.c
File metadata and controls
60 lines (46 loc) · 888 Bytes
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
#define MAX_USERS 32
enum log_level {
DEBUG, // HANDY INFO FOR ME
INFO, // IMPORTANT INFO
WARNING, // SOMETHING THAT PROBABLY SHOULDNT HAPPEN
ERROR, // SOMETHING THAT SHOULD NOT HAPEN
FATAL, // KILLS THE PROGRAM
OFF, //
};
/* set_log_level(log_level.debug); */
typedef struct {
int x;
int y;
int z;
} vec3_t;
typedef struct {
int x;
int y;
} vec2_t;
typedef struct entity_s {
int mesh_id;
vec3_t position;
vec3_t velocity;
} entity_t;
typedef struct {
int socket;
int ip_address;
int ping;
int joined_at;
} net_info_t;
typedef struct user_s {
net_info_t net_info;
char *username;
char *real_name;
} user_t;
typedef struct net_msg_t {
int type;
void *data;
} net_msg_t;
user_t *users[MAX_USERS];
void zlog( log_level level, char *msg ) {
printf( msg );
}
int main(int argc, char **argv ) {
zlog(INFO, "Starting server");
}