Implement & link ef_halloween.c

This commit is contained in:
Reaperoe
2024-08-07 01:30:40 -04:00
parent d67007d8a5
commit 9dc78031f8
2 changed files with 699 additions and 683 deletions
+680 -679
View File
File diff suppressed because it is too large Load Diff
+19 -4
View File
@@ -1,5 +1,7 @@
#include "ef_effect_control.h"
#include "m_common_data.h"
static void eHalloween_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1);
static void eHalloween_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg);
static void eHalloween_mv(eEC_Effect_c* effect, GAME* game);
@@ -18,17 +20,30 @@ eEC_PROFILE_c iam_ef_halloween = {
};
static void eHalloween_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1) {
// TODO
(*eEC_CLIP->make_effect_proc)(eEC_EFFECT_HALLOWEEN, pos, NULL, game, &angle, item_name, prio, arg0, arg1);
}
static void eHalloween_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) {
// TODO
effect->timer = 0x28;
effect->effect_specific[0] = 0;
sAdo_OngenTrgStart(0x107, &effect->position);
}
static void eHalloween_mv(eEC_Effect_c* effect, GAME* game) {
// TODO
if (effect->effect_specific[0] == 4) {
s16 rnd_angle = qrand();
xyz_t pos = effect->position;
pos.x += 18.0f * sin_s(rnd_angle);
pos.y += -25.0f + RANDOM_F(30.0f);
pos.z += 5.0f + (18.0f * cos_s(rnd_angle));
effect->effect_specific[0] = 0;
eEC_CLIP->effect_make_proc(eEC_EFFECT_HALLOWEEN_SMOKE, pos, effect->prio, rnd_angle, game, effect->item_name, 0, 0);
}
effect->effect_specific[0]++;
}
static void eHalloween_dw(eEC_Effect_c* effect, GAME* game) {
// TODO
// empty
}