mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 22:45:09 -04:00
Implement & link ef_taberu
This commit is contained in:
+1
-1
@@ -1334,7 +1334,7 @@ config.libs = [
|
||||
Object(NonMatching, "effect/ef_swing_axe.c"),
|
||||
Object(NonMatching, "effect/ef_swing_net.c"),
|
||||
Object(NonMatching, "effect/ef_swing_rod.c"),
|
||||
Object(NonMatching, "effect/ef_taberu.c"),
|
||||
Object(Matching, "effect/ef_taberu.c"),
|
||||
Object(Matching, "effect/ef_takurami.c"),
|
||||
Object(Matching, "effect/ef_takurami_kira.c"),
|
||||
Object(Matching, "effect/ef_tamaire.c"),
|
||||
|
||||
+50
-4
@@ -1,10 +1,24 @@
|
||||
#include "ef_effect_control.h"
|
||||
|
||||
#include "m_common_data.h"
|
||||
|
||||
static void eTaberu_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1);
|
||||
static void eTaberu_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg);
|
||||
static void eTaberu_mv(eEC_Effect_c* effect, GAME* game);
|
||||
static void eTaberu_dw(eEC_Effect_c* effect, GAME* game);
|
||||
|
||||
extern Gfx ef_taberu01_00_modelT[];
|
||||
extern Gfx ef_taberu01_01_modelT[];
|
||||
extern Gfx ef_taberu01_02_modelT[];
|
||||
extern Gfx ef_taberu01_03_modelT[];
|
||||
|
||||
static Gfx* eTaberu_model_table[] = {
|
||||
ef_taberu01_00_modelT,
|
||||
ef_taberu01_01_modelT,
|
||||
ef_taberu01_02_modelT,
|
||||
ef_taberu01_03_modelT,
|
||||
};
|
||||
|
||||
eEC_PROFILE_c iam_ef_taberu = {
|
||||
// clang-format off
|
||||
&eTaberu_init,
|
||||
@@ -18,17 +32,49 @@ eEC_PROFILE_c iam_ef_taberu = {
|
||||
};
|
||||
|
||||
static void eTaberu_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1) {
|
||||
// TODO
|
||||
xyz_t ofs;
|
||||
|
||||
ofs.x = 0.0f;
|
||||
ofs.y = 0.0f;
|
||||
ofs.z = 0.0f;
|
||||
|
||||
eEC_CLIP->make_effect_proc(eEC_EFFECT_TABERU, pos, &ofs, game, &angle, item_name, prio, 0, 0);
|
||||
}
|
||||
|
||||
static void eTaberu_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) {
|
||||
// TODO
|
||||
s16 angle = *(s16*)ct_arg;
|
||||
|
||||
if (effect->item_name == SP_NPC_ARTIST) {
|
||||
effect->position.x += sin_s(angle) * 15.0f;
|
||||
effect->position.y += -15.0f;
|
||||
effect->position.z += cos_s(angle) * 15.0f;
|
||||
} else {
|
||||
effect->position.x += sin_s(angle) * 13.0f;
|
||||
effect->position.y += -10.0f;
|
||||
effect->position.z += cos_s(angle) * 13.0f;
|
||||
}
|
||||
|
||||
effect->scale.x = 0.0045f;
|
||||
effect->scale.y = 0.0045f;
|
||||
effect->scale.z = 0.0045f;
|
||||
|
||||
effect->effect_specific[0] = 0;
|
||||
|
||||
effect->timer = 44;
|
||||
}
|
||||
|
||||
static void eTaberu_mv(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
effect->effect_specific[0] += 1;
|
||||
}
|
||||
|
||||
static void eTaberu_dw(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
s16 idx = ((u16)effect->effect_specific[0] >> 2) & 3;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
eEC_CLIP->auto_matrix_xlu_offset_proc(game, &effect->position, &effect->scale, &effect->offset);
|
||||
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, eTaberu_model_table[idx]);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user