-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathft_0C31.c
414 lines (341 loc) · 7.7 KB
/
ft_0C31.c
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
#include <placeholder.h>
#include "ft/forward.h"
#include "ftCommon/forward.h"
#include <dolphin/mtx/forward.h>
#include "ft_0C31.h"
#include "ft_081B.h"
#include "ft_0852.h"
#include "ftcommon.h"
#include "ft/fighter.h"
#include "ft/ftanim.h"
#include "ft/ftcoll.h"
#include "ft/types.h"
#include "ftCommon/ftCo_DamageFall.h"
#include "ftCommon/ftCo_DownBound.h"
#include "ftCommon/types.h"
#include "it/it_26B1.h"
#include "it/items/itgreatfoxlaser.h"
#include "it/items/itleadead.h"
#include "it/items/itlikelike.h"
#include "pl/player.h"
#include <baselib/dobj.h>
#include <baselib/jobj.h>
void ftCo_800C61B0(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_Entry_Anim(Fighter_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
if (fp->mv.co.entry.timer == 0) {
ftCo_800C6408(gobj);
}
--fp->mv.co.entry.timer;
}
void ftCo_Entry_IASA(ftCo_GObj* gobj) {}
void ftCo_Entry_Phys(ftCo_GObj* gobj) {}
void fn_800C63BC(ftCo_GObj* gobj)
{
ftCommon_8007D7FC(GET_FIGHTER(gobj));
}
void fn_800C63E0(ftCo_GObj* gobj)
{
ftCommon_8007D5D4(GET_FIGHTER(gobj));
}
void ftCo_Entry_Coll(ftCo_GObj* gobj) {}
void ftCo_800C6408(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_EntryStart_Anim(Fighter_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
--fp->mv.co.entry.timer;
if (fp->mv.co.entry.timer == 0) {
ftCo_800C6B6C(gobj);
}
}
void ftCo_EntryStart_IASA(ftCo_GObj* gobj) {}
void ftCo_EntryStart_Phys(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_EntryStart_Coll(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_800C6AFC(HSD_JObj* jobj)
{
if (jobj == NULL || HSD_JObjMtxIsDirty(jobj)) {
return;
}
HSD_JObjSetMtxDirtySub(jobj);
}
void ftCo_800C6B6C(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_EntryEnd_Anim(Fighter_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
--fp->mv.co.entry.timer;
if (fp->mv.co.entry.timer == 0) {
if (Player_GetFlagsBit4(fp->player_id)) {
ftColl_8007B760(gobj, p_ftCommonData->x6C8);
}
ftCommon_8007D92C(gobj);
}
}
void ftCo_EntryEnd_IASA(ftCo_GObj* gobj) {}
void ftCo_EntryEnd_Phys(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_EntryEnd_Coll(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
extern float ftCo_804D8DE8;
void ftCo_800C703C(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
fp->xA4_unk_vel.x = fp->self_vel.x;
fp->xA4_unk_vel.y = p_ftCommonData->x6D0;
fp->xA4_unk_vel.z = 0;
fp->dmg.x1948 = fp->dmg.x194C = p_ftCommonData->x6CC;
}
/// @todo #ftCo_800C6150
void ftCo_800C7070(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
Fighter_ChangeMotionState(gobj, ftCo_MS_RebirthWait, 0, 0, 1, 0, NULL);
fp->x2219_b2 = true;
fp->x2219_b1 = true;
}
void ftCo_800C70D0(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_800C7158(Fighter_GObj* gobj)
{
ft_8008521C(gobj);
}
void ftCo_800C7178(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_800C7200(Fighter_GObj* gobj)
{
ft_8008521C(gobj);
}
static inline void inlineB0(ftCo_GObj* gobj)
{
ftCo_800C7070(gobj);
}
static inline void inlineB1(ftCo_GObj* gobj)
{
inlineB0(gobj);
}
static inline void inlineB2(ftCo_GObj* gobj)
{
inlineB1(gobj);
}
void ftCo_800C7220(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
if (fp->kind != FTKIND_KIRBY) {
inlineB2(gobj);
} else {
ftCo_800C7070(gobj);
}
}
void ftCo_800C7294(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
if (fp->kind != FTKIND_KIRBY) {
inlineB2(gobj);
} else {
ftCo_800C7070(gobj);
}
}
void ftCo_800C7308(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
if (fp->kind != FTKIND_KIRBY) {
inlineB2(gobj);
} else {
ftCo_800C7070(gobj);
}
}
void ftCo_800C737C(ftCo_GObj* gobj)
{
ft_8008521C(gobj);
}
void ftCo_800C739C(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_800C7414(ftCo_GObj* gobj)
{
ft_8008521C(gobj);
}
static inline void inlineC0(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
Fighter_ChangeMotionState(gobj, 0xE, 0, 0, 1, 0, NULL);
fp->x2219_b1 = true;
fp->x2219_b2 = true;
}
static inline void inlineC1(ftCo_GObj* gobj)
{
inlineC0(gobj);
}
static inline void inlineC2(ftCo_GObj* gobj)
{
inlineC1(gobj);
}
void ftCo_800C7434(ftCo_GObj* gobj)
{
Fighter* temp_r31 = GET_FIGHTER(gobj);
if (temp_r31->kind == FTKIND_GKOOPS) {
inlineC2(gobj);
} else {
inlineB2(gobj);
}
}
void ftCo_800C74AC(ftCo_GObj* gobj)
{
ft_8008521C(gobj);
}
void fn_800C74CC(ftCo_GObj* gobj)
{
it_802EADD8(GET_FIGHTER(gobj)->mv.co.captureleadead.x0);
}
bool ftCo_800C74F4(Fighter_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
if (fp->dmg.x1860_element == 16 && fp->capture_timer == 0 &&
fp->motion_id != ftCo_MS_CaptureLeadead &&
it_802EAF28(fp->dmg.x1868_source) == NULL)
{
ftCo_800C7590(gobj);
return true;
}
return false;
}
void fn_800C7568(ftCo_GObj* gobj)
{
it_802EADD8(GET_FIGHTER(gobj)->mv.co.captureleadead.x0);
}
void ftCo_800C7590(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_CaptureLeadead_Anim(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_CaptureLeadead_IASA(ftCo_GObj* gobj) {}
void ftCo_CaptureLeadead_Phys(ftCo_GObj* gobj) {}
static void fn_800C77E0(ftCo_GObj* arg0)
{
ftCo_80090780(arg0);
}
void ftCo_CaptureLeadead_Coll(Fighter_GObj* gobj)
{
ft_8008403C(gobj, fn_800C77E0);
}
UNK_RET ftCo_800C7800(UNK_PARAMS)
{
NOT_IMPLEMENTED;
}
void fn_800C7890(ftCo_GObj* gobj)
{
ftCo_800C7A30(gobj);
}
UNK_RET ftCo_800C78B0(UNK_PARAMS)
{
NOT_IMPLEMENTED;
}
void ftCo_800C7A30(ftCo_GObj* gobj)
{
it_802DBA68(GET_FIGHTER(gobj)->mv.co.capturelikelike.x0);
}
void ftCo_CaptureLikelike_Anim(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_CaptureLikelike_IASA(ftCo_GObj* gobj) {}
void ftCo_CaptureLikelike_Phys(ftCo_GObj* gobj) {}
void ftCo_CaptureLikelike_Coll(ftCo_GObj* gobj) {}
void fn_800C7AE0(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
it_8026B294(fp->mv.co.captureleadead.x0, &fp->cur_pos);
}
UNK_RET ftCo_800C7B0C(UNK_PARAMS)
{
NOT_IMPLEMENTED;
}
void ftCo_800C7C60(ftCo_GObj* gobj, int damage_amount)
{
Fighter_TakeDamage_8006CC7C(GET_FIGHTER(gobj), damage_amount);
}
bool ftCo_800C7CA0(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
void ftCo_DownReflect_Anim(Fighter_GObj* gobj)
{
if (!ftAnim_IsFramesRemaining(gobj)) {
ftCo_80090780(gobj);
}
}
void ftCo_DownReflect_IASA(ftCo_GObj* gobj) {}
void ftCo_DownReflect_Phys(ftCo_GObj* gobj)
{
ft_80084DB0(gobj);
}
void ftCo_DownReflect_Coll(ftCo_GObj* gobj)
{
if (ft_80081DD4(gobj)) {
ftCo_80097D88(gobj);
}
}
void ftCo_800C8064(void)
{
HSD_DObj* temp_r3;
HSD_MObj* var_r0;
temp_r3 = HSD_JObjGetDObj(HSD_JObjLoadJoint(Fighter_804D6504));
if (temp_r3 != NULL) {
var_r0 = temp_r3->mobj;
} else {
var_r0 = NULL;
}
ft_804D6580 = var_r0;
}
void ft_800C80A4(Fighter* fp)
{
size_t i;
int idx;
for (i = idx = 0; i < ftPartsTable[fp->kind]->parts_num; idx++, i++) {
FighterBone* bone = &fp->parts[idx];
if (bone->flags_b1) {
HSD_JObj* jobj = bone->joint;
HSD_DObj* dobj = HSD_JObjGetDObj(jobj);
HSD_JObjSetFlags(jobj, JOBJ_LIGHTING | JOBJ_TEXGEN |
JOBJ_SPECULAR | JOBJ_UNK_B18);
HSD_JObjClearFlags(jobj, JOBJ_UNK_B19 | JOBJ_UNK_B20);
while (dobj != NULL) {
HSD_DObj* cur;
HSD_DObjModifyFlags(dobj, 2, 0xE);
if (dobj != NULL) {
cur = dobj->next;
} else {
cur = NULL;
}
dobj = cur;
}
}
}
}