mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-09 20:41:31 -04:00
link ef_clacker
This commit is contained in:
@@ -1018,6 +1018,10 @@ ef_car_light.c:
|
||||
.text: [0x806079CC, 0x80607B9C]
|
||||
.rodata: [0x8064BE18, 0x8064BE20]
|
||||
.data: [0x806D2070, 0x806D2088]
|
||||
ef_clacker.c:
|
||||
.text: [0x80607B9C, 0x80608060]
|
||||
.rodata: [0x8064BE20, 0x8064BE48]
|
||||
.data: [0x806D2088, 0x806D20C0]
|
||||
ef_coin.c:
|
||||
.text: [0x80608060, 0x806087EC]
|
||||
.rodata: [0x8064BE48, 0x8064BEA0]
|
||||
|
||||
+56
-5
@@ -1,4 +1,5 @@
|
||||
#include "ef_effect_control.h"
|
||||
#include "m_common_data.h"
|
||||
|
||||
static void eClacker_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1);
|
||||
static void eClacker_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg);
|
||||
@@ -17,18 +18,68 @@ eEC_PROFILE_c iam_ef_clacker = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
void eClacker_Make_Effect(eEC_Effect_c* effect, GAME* game) {
|
||||
static s16 angle_tbl[] = {0x071C, 0x58E3, 0xAAAB};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_TAPE, effect->position, effect->prio,
|
||||
effect->effect_specific[0] + angle_tbl[i], game, effect->item_name,
|
||||
effect->effect_specific[0], 0x1000);
|
||||
}
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
s16 arg0;
|
||||
|
||||
if (i < 5) {
|
||||
arg0 = 0;
|
||||
} else if (i < 10) {
|
||||
arg0 = 1;
|
||||
} else if (i < 15) {
|
||||
arg0 = 2;
|
||||
} else {
|
||||
arg0 = 3;
|
||||
}
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_KAMIFUBUKI, effect->position, effect->prio, effect->effect_specific[0],
|
||||
game, effect->item_name, arg0, 0x1000);
|
||||
}
|
||||
}
|
||||
|
||||
static void eClacker_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1) {
|
||||
// TODO
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_DUST, pos, prio, 0, game, item_name, arg0, 3);
|
||||
|
||||
eEC_CLIP->make_effect_proc(eEC_EFFECT_CLACKER, pos, NULL, game, &angle, item_name, prio, arg0, arg1);
|
||||
}
|
||||
|
||||
static void eClacker_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) {
|
||||
// TODO
|
||||
s16* arg = ct_arg;
|
||||
effect->effect_specific[0] = arg[0];
|
||||
effect->timer = 0x50;
|
||||
effect->velocity.x = 4.6f * sin_s(0x1000) * sin_s(effect->effect_specific[0]);
|
||||
effect->velocity.y = 4.6f * cos_s(0x1000);
|
||||
effect->velocity.z = 4.6f * sin_s(0x1000) * cos_s(effect->effect_specific[0]);
|
||||
effect->acceleration = ZeroVec;
|
||||
effect->acceleration.y = -0.125f;
|
||||
}
|
||||
|
||||
static void eClacker_mv(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
if (!(effect->timer & 7) && (effect->timer < 68)) {
|
||||
xyz_t pos = effect->position;
|
||||
pos.x += RANDOM2_F(100.0f);
|
||||
pos.y += RANDOM2_F(30.0f);
|
||||
pos.z += RANDOM2_F(100.0f);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_KIGAE_LIGHT, pos, effect->prio, 0, game, effect->item_name, 0, 0);
|
||||
}
|
||||
if (effect->timer == 76) {
|
||||
eClacker_Make_Effect(effect, game);
|
||||
}
|
||||
if (effect->timer < 76) {
|
||||
xyz_t_add(&effect->velocity, &effect->acceleration, &effect->velocity);
|
||||
xyz_t_add(&effect->position, &effect->velocity, &effect->position);
|
||||
xyz_t_mult_v(&effect->velocity, sqrtf(0.9));
|
||||
}
|
||||
}
|
||||
|
||||
static void eClacker_dw(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user