diff --git a/config/rel_slices.yml b/config/rel_slices.yml index 494e2201..933105be 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -1220,6 +1220,9 @@ ef_hanabi_dummy.c: ef_hanatiri.c: .text: [0x80610478, 0x8061061C] .data: [0x806D2C08, 0x806D2C20] +ef_kasamizu.c: + .text: [0x806127BC, 0x80612960] + .data: [0x806D2DE0, 0x806D2E08] ef_killer.c: .text: [0x80614178, 0x8061481C] .rodata: [0x8064C680, 0x8064C6C0] diff --git a/src/ef_kasamizu.c b/src/ef_kasamizu.c index bc21e585..5e63d8bf 100644 --- a/src/ef_kasamizu.c +++ b/src/ef_kasamizu.c @@ -1,5 +1,7 @@ #include "ef_effect_control.h" +#include "m_common_data.h" + static void eKasamizu_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1); static void eKasamizu_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg); static void eKasamizu_mv(eEC_Effect_c* effect, GAME* game); @@ -18,17 +20,32 @@ eEC_PROFILE_c iam_ef_kasamizu = { }; static void eKasamizu_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_KASAMIZU, pos, NULL, game, &angle, item_name, prio, arg0, arg1); } static void eKasamizu_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { - // TODO + static xyz_t base_offset = {0, 45.0f, -20.0f}; + xyz_t pos; + s16 angle = *(s16*)ct_arg; + Matrix_RotateY(angle, 0); + Matrix_Position(&base_offset, &pos); + xyz_t_add(&effect->position, &pos, &effect->position); + effect->effect_specific[0] = angle; + effect->timer = 24; } static void eKasamizu_mv(eEC_Effect_c* effect, GAME* game) { - // TODO + GAME_PLAY* play = (GAME_PLAY*)game; + if (eEC_CLIP != (eEC_EffectControl_Clip_c*)0) { + int mEnv_NowWeather(); + if (mEnv_NowWeather() == mEnv_WEATHER_RAIN && play->game_frame & 1) { + xyz_t pos = effect->position; + eEC_CLIP->effect_make_proc(eEC_EFFECT_KASAMIZUTAMA, pos, effect->prio, effect->effect_specific[0], game, + effect->item_name, 0, 0); + } + } } static void eKasamizu_dw(eEC_Effect_c* effect, GAME* game) { - // TODO + // Nothing }