From 8ff88f45f915ed75bdbe6c9cde5ded62057b0c1b Mon Sep 17 00:00:00 2001 From: Prakxo Date: Sun, 21 Apr 2024 17:11:32 +0200 Subject: [PATCH] link ef_ase --- config/rel_slices.yml | 4 ++++ src/ef_ase.c | 27 +++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/config/rel_slices.yml b/config/rel_slices.yml index ecf75abc..46cb1b9a 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -982,6 +982,10 @@ ef_anahikari.c: .text: [0x80604C9C, 0x80604F78] .rodata: [0x8064BC78, 0x8064BC90] .data: [0x806D1E60, 0x806D1E88] +ef_ase.c: + .text: [0x80604F78, 0x806050E4] + .rodata: [0x8064BC90, 0x8064BC98] + .data: [0x806D1E88, 0x806D1EA0] ef_coin.c: .text: [0x80608060, 0x806087EC] .rodata: [0x8064BE48, 0x8064BEA0] diff --git a/src/ef_ase.c b/src/ef_ase.c index d3cd033a..ffaa559e 100644 --- a/src/ef_ase.c +++ b/src/ef_ase.c @@ -1,4 +1,5 @@ #include "ef_effect_control.h" +#include "m_common_data.h" static void eAS_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1); static void eAS_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg); @@ -16,19 +17,33 @@ eEC_PROFILE_c iam_ef_ase = { eEC_DEFAULT_DEATH_DIST, // clang-format on }; - static void eAS_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1) { - // TODO + xyz_t offs; + + offs.x = 0.0f; + offs.y = 15.0f; + offs.z = 0.0f; + eEC_CLIP->make_effect_proc(eEC_EFFECT_ASE,pos,&offs,game,NULL,item_name,prio,0,0); } static void eAS_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { - // TODO + effect->timer = 26; } static void eAS_mv(eEC_Effect_c* effect, GAME* game) { - // TODO + int prio; + int name; + GAME_PLAY* play = (GAME_PLAY*)game; + + name = effect->item_name; + prio = effect->prio; + eEC_CLIP->set_continious_env_proc(effect,26,52); + + if((eEC_CLIP != NULL) && (effect->timer & 1)){ + eEC_CLIP->effect_make_proc(eEC_EFFECT_ASE_CH,effect->position,prio,0,&play->game,name,0,0); + } } static void eAS_dw(eEC_Effect_c* effect, GAME* game) { - // TODO -} + +} \ No newline at end of file