From b266e845d6905f651db7e666952ac7b8886bf01a Mon Sep 17 00:00:00 2001 From: Norgesnerd <5824576+Norgesnerd@users.noreply.github.com> Date: Sun, 25 May 2025 13:30:35 +0200 Subject: [PATCH 1/2] Implement & link ef_uranai --- configure.py | 2 +- src/effect/ef_uranai.c | 54 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/configure.py b/configure.py index 4368ce2f..6d4cb48d 100644 --- a/configure.py +++ b/configure.py @@ -1350,7 +1350,7 @@ config.libs = [ Object(NonMatching, "effect/ef_turi_suiteki.c"), Object(NonMatching, "effect/ef_turn_asimoto.c"), Object(NonMatching, "effect/ef_turn_footprint.c"), - Object(NonMatching, "effect/ef_uranai.c"), + Object(Matching, "effect/ef_uranai.c"), Object(Matching, "effect/ef_wait_asimoto.c"), Object(Matching, "effect/ef_walk_asimoto.c"), Object(Matching, "effect/ef_warau.c"), diff --git a/src/effect/ef_uranai.c b/src/effect/ef_uranai.c index 79d12057..269e99e3 100644 --- a/src/effect/ef_uranai.c +++ b/src/effect/ef_uranai.c @@ -1,5 +1,11 @@ #include "ef_effect_control.h" +#include "m_common_data.h" +#include "m_rcp.h" + +extern Gfx ef_uranai01_00_modelT[]; +extern EVW_ANIME_DATA ef_uranai01_00_evw_anime; + static void eUranai_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1); static void eUranai_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg); static void eUranai_mv(eEC_Effect_c* effect, GAME* game); @@ -18,17 +24,57 @@ eEC_PROFILE_c iam_ef_uranai = { }; static void eUranai_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_URANAI, pos, NULL, game, NULL, item_name, prio, arg0, arg1); } static void eUranai_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { - // TODO + effect->scale.x = 0.01f; + effect->scale.y = 0.01f; + effect->scale.z = 0.01f; + effect->offset = ZeroVec; + effect->timer = 80; + + sAdo_OngenTrgStart(NA_SE_AXE_BALL_HIT, &effect->position); } static void eUranai_mv(eEC_Effect_c* effect, GAME* game) { - // TODO + if (effect->timer >= 70) { + effect->scale.x = 0.01f; + effect->scale.y = 0.01f; + effect->scale.z = 0.01f; + } else { + effect->scale.x = eEC_CLIP->calc_adjust_proc(effect->timer, 0, 70, 0.0139999999f, 0.01f); + effect->scale.y = eEC_CLIP->calc_adjust_proc(effect->timer, 0, 70, 0.012f, 0.01f); + effect->scale.z = 0.01f; + } } static void eUranai_dw(eEC_Effect_c* effect, GAME* game) { - // TODO + u8 r, g, b, a; + GRAPH* graph; + GAME_PLAY* play = (GAME_PLAY*)game; + + if (effect->timer >= 70) { + r = 255; + g = 0; + b = 100; + a = (s8)eEC_CLIP->calc_adjust_proc(effect->timer, 70, 80, 255.0f, 0.0f); + } else { + r = 255; + g = 0; + b = (s8)eEC_CLIP->calc_adjust_proc(effect->timer, 0, 70, 255.0f, 100.0f); + a = (s8)eEC_CLIP->calc_adjust_proc(effect->timer, 0, 70, 0.0f, 255.0f); + } + + graph = game->graph; + _texture_z_light_fog_prim_xlu(graph); + Evw_Anime_Set(play, &ef_uranai01_00_evw_anime); + + OPEN_DISP(graph); + + eEC_CLIP->auto_matrix_xlu_offset_proc(game, &effect->position, &effect->scale, &effect->offset); + gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 255, r, g, b, a); + gSPDisplayList(NEXT_POLY_XLU_DISP, ef_uranai01_00_modelT); + + CLOSE_DISP(graph); } From c95fd081b028ee878dba522ab1a45d52ae96d91f Mon Sep 17 00:00:00 2001 From: Norgesnerd <5824576+Norgesnerd@users.noreply.github.com> Date: Sun, 25 May 2025 16:30:09 +0200 Subject: [PATCH 2/2] Implement & link ef_lovelove --- configure.py | 2 +- src/effect/ef_lovelove.c | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/configure.py b/configure.py index 6d4cb48d..39dab37d 100644 --- a/configure.py +++ b/configure.py @@ -1289,7 +1289,7 @@ config.libs = [ Object(NonMatching, "effect/ef_kpun.c"), Object(Matching, "effect/ef_kyousou_onpu.c"), Object(Matching, "effect/ef_lamp_light.c"), - Object(NonMatching, "effect/ef_lovelove.c"), + Object(Matching, "effect/ef_lovelove.c"), Object(NonMatching, "effect/ef_lovelove2.c"), Object(NonMatching, "effect/ef_lovelove_heart.c"), Object(Matching, "effect/ef_make_hem.c"), diff --git a/src/effect/ef_lovelove.c b/src/effect/ef_lovelove.c index bccc0f20..53e9b6d9 100644 --- a/src/effect/ef_lovelove.c +++ b/src/effect/ef_lovelove.c @@ -1,5 +1,7 @@ #include "ef_effect_control.h" +#include "m_common_data.h" + static void eLove_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1); static void eLove_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg); static void eLove_mv(eEC_Effect_c* effect, GAME* game); @@ -18,17 +20,30 @@ eEC_PROFILE_c iam_ef_lovelove = { }; static void eLove_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1) { - // TODO + pos.y -= 10.0f; + eEC_CLIP->make_effect_proc(eEC_EFFECT_LOVELOVE, pos, NULL, game, NULL, item_name, prio, 0, 0); } static void eLove_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { - // TODO + effect->timer = 52; } static void eLove_mv(eEC_Effect_c* effect, GAME* game) { - // TODO + s32 prio; + u16 name; + + eEC_CLIP->set_continious_env_proc(effect, 52, 102); + sAdo_OngenPos((u32)effect, 14, &effect->position); + + if ((effect->timer & 7) == 0) { + name = effect->item_name; + prio = effect->prio; + if ((eEC_CLIP != NULL)) { + eEC_CLIP->effect_make_proc(eEC_EFFECT_LOVELOVE_HEART, effect->position, prio, 0, game, name, 0, 0); + } + } } static void eLove_dw(eEC_Effect_c* effect, GAME* game) { - // TODO + return; }