mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-17 22:12:44 -04:00
Implement & link ef_motiyuge
This commit is contained in:
+1
-1
@@ -1294,7 +1294,7 @@ config.libs = [
|
||||
Object(Matching, "effect/ef_lovelove_heart.c"),
|
||||
Object(Matching, "effect/ef_make_hem.c"),
|
||||
Object(Matching, "effect/ef_mizutama.c"),
|
||||
Object(NonMatching, "effect/ef_motiyuge.c"),
|
||||
Object(Matching, "effect/ef_motiyuge.c"),
|
||||
Object(Matching, "effect/ef_muka.c"),
|
||||
Object(Matching, "effect/ef_naku.c"),
|
||||
Object(Matching, "effect/ef_namida.c"),
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
#include "ef_effect_control.h"
|
||||
|
||||
#include "m_common_data.h"
|
||||
#include "m_rcp.h"
|
||||
#include "sys_matrix.h"
|
||||
|
||||
extern u8 ef_mitiyuge01_0_int_i4[];
|
||||
extern u8 ef_motiyuge01_1_int_i4[];
|
||||
extern u8 ef_motiyuge01_2_int_i4[];
|
||||
|
||||
static u8* eMotiyuge_yuge_texture_table[] = {
|
||||
ef_mitiyuge01_0_int_i4, ef_motiyuge01_1_int_i4, ef_motiyuge01_2_int_i4,
|
||||
};
|
||||
|
||||
static void eMotiyuge_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1);
|
||||
static void eMotiyuge_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg);
|
||||
static void eMotiyuge_mv(eEC_Effect_c* effect, GAME* game);
|
||||
@@ -18,17 +30,57 @@ eEC_PROFILE_c iam_ef_motiyuge = {
|
||||
};
|
||||
|
||||
static void eMotiyuge_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_MOTIYUGE, pos, NULL, game, NULL, item_name, prio, arg0, arg1);
|
||||
}
|
||||
|
||||
static void eMotiyuge_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) {
|
||||
// TODO
|
||||
effect->effect_specific[0] = DEG2SHORT_ANGLE2(RANDOM2_F(40.0f));
|
||||
effect->effect_specific[1] = 0;
|
||||
effect->scale.x = 0.0006f;
|
||||
effect->scale.y = 0.0006f;
|
||||
effect->scale.z = 0.0006f;
|
||||
effect->timer = 30;
|
||||
}
|
||||
|
||||
static void eMotiyuge_mv(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
if (effect->timer >= 24) {
|
||||
effect->scale.x = eEC_CLIP->calc_adjust_proc(effect->timer, 24, 30, 0.003f, 0.0006f);
|
||||
effect->scale.y = eEC_CLIP->calc_adjust_proc(effect->timer, 24, 30, 0.009000001f, 0.0006f);
|
||||
} else {
|
||||
effect->scale.x = eEC_CLIP->calc_adjust_proc(effect->timer, 0, 24, 0.0045000003, 0.003f);
|
||||
effect->scale.y = eEC_CLIP->calc_adjust_proc(effect->timer, 0, 24, 0.0045000003f, 0.009000001f);
|
||||
}
|
||||
|
||||
if ((play->game_frame & 3) == 0) {
|
||||
if (effect->effect_specific[1] >= 2) {
|
||||
effect->effect_specific[1] = 0;
|
||||
} else {
|
||||
effect->effect_specific[1]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern Gfx ef_motiyuge01_00_modelT[];
|
||||
|
||||
static void eMotiyuge_dw(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
u8* tex_p = eMotiyuge_yuge_texture_table[effect->effect_specific[1]];
|
||||
u8 a = (int)eEC_CLIP->calc_adjust_proc(effect->timer, 0, 16, 0.0f, 100.0f);
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
_texture_z_light_fog_prim_xlu(game->graph);
|
||||
Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0);
|
||||
Matrix_mult(&play->billboard_matrix, 1);
|
||||
Matrix_RotateZ(effect->effect_specific[0], 1);
|
||||
Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1);
|
||||
|
||||
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, ANIME_1_TXT_SEG, tex_p);
|
||||
gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 255, 255, 255, 255, a);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, ef_motiyuge01_00_modelT);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user