Implement & link ef_turi_hane0

This commit is contained in:
Norgesnerd
2025-06-05 20:47:43 +02:00
parent 3a96d667c1
commit ab8bde5bcb
2 changed files with 60 additions and 5 deletions
+1 -1
View File
@@ -1344,7 +1344,7 @@ config.libs = [
Object(NonMatching, "effect/ef_tumble_bodyprint.c"),
Object(NonMatching, "effect/ef_tumble_dust.c"),
Object(Matching, "effect/ef_turi_hamon.c"),
Object(NonMatching, "effect/ef_turi_hane0.c"),
Object(Matching, "effect/ef_turi_hane0.c"),
Object(NonMatching, "effect/ef_turi_hane1.c"),
Object(Matching, "effect/ef_turi_mizu.c"),
Object(NonMatching, "effect/ef_turi_suiteki.c"),
+59 -4
View File
@@ -1,5 +1,16 @@
#include "ef_effect_control.h"
#include "m_common_data.h"
#include "m_rcp.h"
#include "sys_matrix.h"
extern Gfx ef_turi_hane01_00_modelT[];
extern u8 ef_turi_hane01_0_int_i4[];
extern u8 ef_turi_hane01_1_int_i4[];
extern u8 ef_turi_hane01_2_int_i4[];
extern u8 ef_turi_hane01_3_int_i4[];
static void eTH0_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1);
static void eTH0_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg);
static void eTH0_mv(eEC_Effect_c* effect, GAME* game);
@@ -17,18 +28,62 @@ eEC_PROFILE_c iam_ef_turi_hane0 = {
// clang-format on
};
static u8* eTuri_Hane0Ptn[] = {
ef_turi_hane01_0_int_i4, ef_turi_hane01_0_int_i4, ef_turi_hane01_1_int_i4, ef_turi_hane01_1_int_i4,
ef_turi_hane01_2_int_i4, ef_turi_hane01_2_int_i4, ef_turi_hane01_3_int_i4, ef_turi_hane01_3_int_i4,
};
static void eTH0_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_TURI_HANE0, pos, NULL, game, NULL, item_name, prio, 0, 0);
}
static void eTH0_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) {
// TODO
f32 scale;
effect->timer = 16;
switch (effect->arg0) {
case 1:
scale = 0.013f;
break;
case 2:
scale = 0.014f;
break;
case 3:
scale = 0.009f;
break;
case 4:
scale = 0.007f;
break;
default:
scale = 0.01f;
break;
}
effect->scale.x = scale;
effect->scale.y = scale;
effect->scale.z = scale;
}
static void eTH0_mv(eEC_Effect_c* effect, GAME* game) {
// TODO
return;
}
static void eTH0_dw(eEC_Effect_c* effect, GAME* game) {
// TODO
xyz_t scale = effect->scale;
s16 counter = (s16)(16 - effect->timer) >> 1;
counter = CLAMP(counter, 0, 8);
OPEN_DISP(game->graph);
_texture_z_light_fog_prim_xlu(game->graph);
Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE);
Matrix_scale(scale.x, scale.y, scale.z, TRUE);
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, eTuri_Hane0Ptn[counter]);
gSPDisplayList(NEXT_POLY_XLU_DISP, ef_turi_hane01_00_modelT);
CLOSE_DISP(game->graph);
}