-
Notifications
You must be signed in to change notification settings - Fork 1
/
obj_.h
155 lines (122 loc) · 2.5 KB
/
obj_.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//
// This is the header for all obj_*.c files
//
#ifndef MCDIDDY_OBJ_H_
#define MCDIDDY_OBJ_H_
#include "mod.h"
//obj types
enum { OBJT_EMPTY = 0,
OBJT_CONTEXT, //from engine
OBJT_MOTHER,
OBJT_GHOST,
OBJT_DUMMY,
OBJT_PLAYER,
OBJT_BULLET,
OBJT_SLUG,
OBJT_AMIGO,
OBJT_AMIGOSWORD };
// MOTHER //
typedef struct{
char edit;
} MOTHER_t;
void obj_mother_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// GHOST //
typedef struct{
V pos;
V vel;
V hull[2];
int model;
int client;
int avatar;
int clipboard_x;
int clipboard_y;
CB *clipboard_data;
} GHOST_t;
void obj_ghost_draw( int objid, OBJ_t *o );
void obj_ghost_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// DUMMY //
typedef struct{
V pos;
V vel;
V hull[2];
int model;
} DUMMY_t;
void obj_dummy_draw( int objid, OBJ_t *o );
void obj_dummy_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// PLAYER //
typedef struct{
V pos;
V vel;
V hull[2];
V pvel;
int model;
int ghost;
char goingl;
char goingr;
char goingu;
char goingd;
char jumping;
char firing;
char cooldown;
char projectiles;
char gunback,gundown;
char grounded;
char facingr;
char turning;
char stabbing;
char hovertime;
} PLAYER_t;
void obj_player_draw( int objid, OBJ_t *o );
void obj_player_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// BULLET //
typedef struct{
V pos;
V vel;
int model;
int owner;
Uint8 ttl;
} BULLET_t;
void obj_bullet_draw( int objid, OBJ_t *o );
void obj_bullet_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// SLUG //
typedef struct{
V pos;
V vel;
V hull[2];
int model;
int dead;
} SLUG_t;
void obj_slug_draw( int objid, OBJ_t *o );
void obj_slug_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// AMIGO //
enum { AMIGO_HELLO,
AMIGO_COOLDOWN,
AMIGO_JUMP,
AMIGO_SLASH,
AMIGO_FLYKICK,
AMIGO_DASH };
typedef struct{
V pos;
V vel;
V hull[2];
int model;
char state;
int statetime;
int hatcounter;
int sword;
V sword_dist;
} AMIGO_t;
void obj_amigo_draw( int objid, OBJ_t *o );
void obj_amigo_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
// AMIGOSWORD //
typedef struct{
V pos;
V vel;
V hull[2];
int model;
int owner;
int spincounter;
} AMIGOSWORD_t;
void obj_amigosword_draw( int objid, OBJ_t *o );
void obj_amigosword_adv( int objid, Uint32 a, Uint32 b, OBJ_t *oa, OBJ_t *ob );
#endif