diff --git a/config/rel_slices.yml b/config/rel_slices.yml index c855b098..fa30808d 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -1159,6 +1159,9 @@ ef_hanabi_dummy.c: .text: [0x8060E6D8, 0x8060E9B8] .rodata: [0x8064C2A0, 0x8064C2C0] .data: [0x806D2858, 0x806D2888] +ef_hanatiri.c: + .text: [0x80610478, 0x8061061C] + .data: [0x806D2C08, 0x806D2C20] ef_killer.c: .text: [0x80614178, 0x8061481C] .rodata: [0x8064C680, 0x8064C6C0] diff --git a/src/ef_hanatiri.c b/src/ef_hanatiri.c index 9102f464..8cfa3966 100644 --- a/src/ef_hanatiri.c +++ b/src/ef_hanatiri.c @@ -1,5 +1,7 @@ #include "ef_effect_control.h" +#include "m_common_data.h" + static void eHanatiri_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1); static void eHanatiri_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg); static void eHanatiri_mv(eEC_Effect_c* effect, GAME* game); @@ -18,17 +20,32 @@ eEC_PROFILE_c iam_ef_hanatiri = { }; static void eHanatiri_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_HANATIRI, pos, NULL, game, NULL, item_name, prio, arg0, arg1); } static void eHanatiri_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { - // TODO + int i; + + if (effect->arg0 >= FLOWER_PANSIES0 && effect->arg0 <= FLOWER_TULIP2) { + s16 flower_idx = effect->arg0 - FLOWER_PANSIES0; + + for (i = 0; i < 5; i++) { + eEC_CLIP->effect_make_proc(eEC_EFFECT_HANABIRA, effect->position, effect->prio, 0, game, effect->item_name, flower_idx, 5); + } + } + + for (i = 0; i < 4; i++){ + eEC_CLIP->effect_make_proc(eEC_EFFECT_HANABIRA, effect->position, effect->prio, 0, game, effect->item_name, 9, 5); + } + + effect->timer = 0; } static void eHanatiri_mv(eEC_Effect_c* effect, GAME* game) { - // TODO + // empty } static void eHanatiri_dw(eEC_Effect_c* effect, GAME* game) { - // TODO + // empty } +