mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-29 08:12:54 -04:00
Implement & link ef_kasamizutama
This commit is contained in:
+1
-1
@@ -1268,7 +1268,7 @@ config.libs = [
|
||||
Object(NonMatching, "effect/ef_kangaeru.c"),
|
||||
Object(NonMatching, "effect/ef_kantanhu.c"),
|
||||
Object(Matching, "effect/ef_kasamizu.c"),
|
||||
Object(NonMatching, "effect/ef_kasamizutama.c"),
|
||||
Object(Matching, "effect/ef_kasamizutama.c"),
|
||||
Object(NonMatching, "effect/ef_kaze.c"),
|
||||
Object(NonMatching, "effect/ef_kaze_happa.c"),
|
||||
Object(NonMatching, "effect/ef_kigae.c"),
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
#include "ef_effect_control.h"
|
||||
|
||||
#include "m_common_data.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
|
||||
static f32 eKasamizutama_scale_table;
|
||||
extern Gfx ef_koke_suiteki01_0_int_i4[];
|
||||
extern Gfx ef_koke_suiteki01_00_modelT[];
|
||||
|
||||
static void eKasamizutama_init(xyz_t pos, int prio, s16 angle, GAME* game, u16 item_name, s16 arg0, s16 arg1);
|
||||
static void eKasamizutama_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg);
|
||||
static void eKasamizutama_mv(eEC_Effect_c* effect, GAME* game);
|
||||
@@ -18,17 +27,44 @@ eEC_PROFILE_c iam_ef_kasamizutama = {
|
||||
};
|
||||
|
||||
static void eKasamizutama_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_KASAMIZUTAMA, pos, NULL, game, &angle, item_name, prio, arg0, arg1);
|
||||
}
|
||||
|
||||
static void eKasamizutama_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) {
|
||||
// TODO
|
||||
s16 angle = *(s16*)ct_arg;
|
||||
s16 rand = qrand();
|
||||
s16 rand_angle = DEG2SHORT_ANGLE2(45.0f) + DEG2SHORT_ANGLE2(RANDOM_F(45.0f));
|
||||
xyz_t pos;
|
||||
f32 sin = 2.5f * sin_s(rand_angle);
|
||||
|
||||
Matrix_RotateY(angle, 0);
|
||||
Matrix_RotateX(-0x2000, 1);
|
||||
|
||||
pos.x = (sin) * sin_s(rand);
|
||||
pos.y = 2.5f * cos_s(rand_angle);
|
||||
pos.z = (sin) * cos_s(rand);
|
||||
|
||||
Matrix_Position(&pos, &effect->velocity);
|
||||
|
||||
effect->acceleration = ZeroVec;
|
||||
effect->acceleration.y = -0.105f;
|
||||
effect->timer = 20;
|
||||
}
|
||||
|
||||
static void eKasamizutama_mv(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
xyz_t_add(&effect->velocity, &effect->acceleration, &effect->velocity);
|
||||
xyz_t_add(&effect->position, &effect->velocity, &effect->position);
|
||||
}
|
||||
|
||||
static void eKasamizutama_dw(eEC_Effect_c* effect, GAME* game) {
|
||||
// TODO
|
||||
effect->scale.x = effect->scale.y = effect->scale.z = *(f32*)(&eKasamizutama_scale_table + (s16) ((s16)(20 - effect->timer) >> 1)) * 0.005f;
|
||||
_texture_z_light_fog_prim_xlu(game->graph);
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
eEC_CLIP->auto_matrix_xlu_proc(game, &effect->position, &effect->scale);
|
||||
gSPSegment(NEXT_POLY_XLU_DISP, 8, ef_koke_suiteki01_0_int_i4);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, ef_koke_suiteki01_00_modelT);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user