mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-09-03 08:57:02 -04:00
Finish off furniture, all game code diffed
This commit is contained in:
@@ -42,6 +42,46 @@ static void fIIH_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
cKF_SkeletonInfo_R_play(keyf);
|
||||
}
|
||||
|
||||
// Aus version reworks the treasure chest movement animation to process the state
|
||||
// on the current frame instead of the previous frame's state.
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
void fIIH_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
cKF_SkeletonInfo_R_c* keyf = &ftr_actor->keyframe;
|
||||
int state = cKF_SkeletonInfo_R_play(keyf);
|
||||
|
||||
if (state == cKF_STATE_STOPPED) {
|
||||
keyf->frame_control.speed = 0.0f;
|
||||
}
|
||||
|
||||
if ((ftr_actor->switch_changed_flag != FALSE) &&
|
||||
(aMR_GetContactInfoLayer1()->contact_direction == aMR_CONTACT_DIR_FRONT) &&
|
||||
(state == cKF_STATE_STOPPED)) {
|
||||
ftr_actor->dynamic_work_s[0] = (ftr_actor->dynamic_work_s[0] + 1) & 1;
|
||||
if (ftr_actor->dynamic_work_s[0] != FALSE) {
|
||||
cKF_SkeletonInfo_R_init_standard_stop(keyf, &cKF_ba_r_int_ike_island_hako01, NULL);
|
||||
keyf->frame_control.start_frame = 1.0f;
|
||||
keyf->frame_control.end_frame = cKF_ba_r_int_ike_island_hako01.frames;
|
||||
keyf->frame_control.speed = 0.5f;
|
||||
sAdo_OngenTrgStart(0x16AU, &ftr_actor->position);
|
||||
} else {
|
||||
cKF_SkeletonInfo_R_init_standard_stop(keyf, &cKF_ba_r_int_ike_island_hako02, NULL);
|
||||
keyf->frame_control.start_frame = 1.0f;
|
||||
keyf->frame_control.end_frame = cKF_ba_r_int_ike_island_hako02.frames;
|
||||
keyf->frame_control.speed = 0.5f;
|
||||
sAdo_OngenTrgStart(0x16B, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
if (ftr_actor->dynamic_work_s[0] != 0) {
|
||||
if (keyf->frame_control.current_frame > 25.0f) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 0x52, &ftr_actor->position);
|
||||
}
|
||||
} else if (keyf->frame_control.current_frame < 25.0f) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 0x52, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void fIIH_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
cKF_SkeletonInfo_R_c* keyf;
|
||||
|
||||
@@ -77,6 +117,7 @@ void fIIH_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
keyf->frame_control.speed = 0.0f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void fIIH_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
+137
-44
@@ -1,3 +1,106 @@
|
||||
// Aus version changed the naming to use their 'standard'
|
||||
// It also updates the mv func to remove the animation frame logic.
|
||||
// The dw function was updated to use the game frame instead of an internal counter.
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
static void fKST_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fKST_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fKST_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fKST_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
|
||||
extern u8 int_kon_snowtv07a_TA_tex_txt[];
|
||||
extern u8 int_kon_snowtv07b_TA_tex_txt[];
|
||||
extern u8 int_kon_snowtv07c_TA_tex_txt[];
|
||||
extern u8 int_kon_snowtv07d_TA_tex_txt[];
|
||||
|
||||
extern Gfx int_kon_snowtv_body_model[];
|
||||
extern Gfx int_kon_snowtv_face_model[];
|
||||
|
||||
u8* fKST_on_anime_table[] = {
|
||||
int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07b_TA_tex_txt,
|
||||
int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07b_TA_tex_txt,
|
||||
int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07b_TA_tex_txt,
|
||||
int_kon_snowtv07b_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt,
|
||||
int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt,
|
||||
int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt,
|
||||
int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07c_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt,
|
||||
int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt,
|
||||
int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt,
|
||||
int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt,
|
||||
};
|
||||
|
||||
static void fKST_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
}
|
||||
|
||||
static void fKST_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 0x2B, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
|
||||
if (ftr_actor->switch_changed_flag != FALSE) {
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
sAdo_OngenTrgStart(0x16, &ftr_actor->position);
|
||||
} else {
|
||||
sAdo_OngenTrgStart(0x17, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void fKST_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
u8* anime;
|
||||
u32 ctr_ofs;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
if (ftr_actor->ctr_type == aFTR_CTR_TYPE_GAME_PLAY) {
|
||||
ctr_ofs = play->game_frame;
|
||||
} else {
|
||||
ctr_ofs = game->frame_counter;
|
||||
}
|
||||
anime = fKST_on_anime_table[(ctr_ofs >> 1) % ARRAY_COUNT(fKST_on_anime_table)];
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, anime);
|
||||
} else {
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, int_kon_snowtv07a_TA_tex_txt);
|
||||
}
|
||||
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_kon_snowtv_face_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_kon_snowtv_body_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void fKST_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fKST_func = {
|
||||
&fKST_ct, &fKST_mv, &fKST_dw, &fKST_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_kon_snowtv = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
18.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEA,
|
||||
mCoBG_FTR_TYPEA,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_START_DISABLED,
|
||||
&fKST_func,
|
||||
};
|
||||
#else
|
||||
static void aKonsnowtv_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void aKonsnowtv_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void aKonsnowtv_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
@@ -24,80 +127,70 @@ u8* aKonsnowtv_on_anime[] = {
|
||||
int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt, int_kon_snowtv07d_TA_tex_txt,
|
||||
};
|
||||
|
||||
static void aKonsnowtv_ct(FTR_ACTOR* ftr_actor, u8* data){
|
||||
|
||||
static void aKonsnowtv_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
}
|
||||
static void aKonsnowtv_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data){
|
||||
static void aKonsnowtv_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
|
||||
if(ftr_actor->switch_bit != FALSE){
|
||||
if(aFTR_CAN_PLAY_SE(ftr_actor)){
|
||||
sAdo_OngenPos((u32) ftr_actor, 0x2B, &ftr_actor->position);
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 0x2B, &ftr_actor->position);
|
||||
}
|
||||
ftr_actor->tex_animation.frame++;
|
||||
|
||||
if(ftr_actor->tex_animation.frame >= 60 || ftr_actor->tex_animation.frame < 0){
|
||||
if (ftr_actor->tex_animation.frame >= 60 || ftr_actor->tex_animation.frame < 0) {
|
||||
ftr_actor->tex_animation.frame = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(ftr_actor->switch_changed_flag != FALSE){
|
||||
if(ftr_actor->switch_bit != FALSE){
|
||||
if (ftr_actor->switch_changed_flag != FALSE) {
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
sAdo_OngenTrgStart(0x16, &ftr_actor->position);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
sAdo_OngenTrgStart(0x17, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
static void aKonsnowtv_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP,_Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if(ftr_actor->switch_bit != FALSE){
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
u8* anime = aKonsnowtv_on_anime[(s16)(ftr_actor->tex_animation.frame >> 1)];
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, anime);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, int_kon_snowtv07a_TA_tex_txt);
|
||||
}
|
||||
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP,int_kon_snowtv_face_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP,int_kon_snowtv_body_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_kon_snowtv_face_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_kon_snowtv_body_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
static void aKonsnowtv_dt(FTR_ACTOR* ftr_actor, u8* data){
|
||||
|
||||
static void aKonsnowtv_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
}
|
||||
|
||||
|
||||
static aFTR_vtable_c aKonsnowtv_func = {
|
||||
&aKonsnowtv_ct,
|
||||
&aKonsnowtv_mv,
|
||||
&aKonsnowtv_dw,
|
||||
&aKonsnowtv_dt,
|
||||
NULL,
|
||||
&aKonsnowtv_ct, &aKonsnowtv_mv, &aKonsnowtv_dw, &aKonsnowtv_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_kon_snowtv = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
18.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEA,
|
||||
mCoBG_FTR_TYPEA,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_START_DISABLED,
|
||||
&aKonsnowtv_func,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
18.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEA,
|
||||
mCoBG_FTR_TYPEA,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_START_DISABLED,
|
||||
&aKonsnowtv_func,
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -49,9 +49,11 @@ static void aNogFan_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
}
|
||||
|
||||
static void aNogFan_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
static int fan_kurukuru_data[] = {
|
||||
1, 1, 1, 2, 2, 2, 2, 2, 3, 0xFFFFFFFF,
|
||||
};
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
static int fan_rot_frame_counter_dat[] = { 1, 1, 1, 2, 2, 2, 2, 2, 3, -1 };
|
||||
#else
|
||||
static int fan_kurukuru_data[] = { 1, 1, 1, 2, 2, 2, 2, 2, 3, -1 };
|
||||
#endif
|
||||
int num;
|
||||
int idx;
|
||||
|
||||
@@ -61,27 +63,36 @@ static void aNogFan_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u
|
||||
|
||||
aNogFan_ChangeSwitch(ftr_actor);
|
||||
if (ftr_actor->switch_bit != FALSE) {
|
||||
f32 step = sqrtf(0.94999998807907);
|
||||
|
||||
add_calc(&ftr_actor->dynamic_work_f[0], 0.5f, 1.0f - step, 0.25f, 0.0005f);
|
||||
add_calc(&ftr_actor->dynamic_work_f[0], 0.5f, CALC_EASE(0.05f), 0.25f, 0.0005f);
|
||||
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 1, &ftr_actor->position);
|
||||
}
|
||||
} else {
|
||||
f32 step = sqrtf(0.94999998807907);
|
||||
|
||||
add_calc(&ftr_actor->dynamic_work_f[0], 0.0f, 1.0f - step, 0.25f, 0.0005f);
|
||||
add_calc(&ftr_actor->dynamic_work_f[0], 0.0f, CALC_EASE(0.05f), 0.25f, 0.0005f);
|
||||
}
|
||||
|
||||
keyf->frame_control.speed = ftr_actor->dynamic_work_f[0];
|
||||
cKF_SkeletonInfo_R_play(keyf);
|
||||
|
||||
idx = 9.0f - (2.0f * (ftr_actor->dynamic_work_f[0] * 9.0f));
|
||||
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
if ((idx != ARRAY_COUNT(fan_rot_frame_counter_dat) - 1)) {
|
||||
ftr_actor->dynamic_work_s[0]++;
|
||||
num = fan_rot_frame_counter_dat[idx];
|
||||
if ((ftr_actor->dynamic_work_s[0] >= num)) {
|
||||
ftr_actor->dynamic_work_s[0] = 0;
|
||||
ftr_actor->tex_animation.frame++;
|
||||
|
||||
if (ftr_actor->tex_animation.frame >= 6 || ftr_actor->tex_animation.frame < 0) {
|
||||
ftr_actor->tex_animation.frame = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
ftr_actor->dynamic_work_s[0]++;
|
||||
|
||||
num = fan_kurukuru_data[idx];
|
||||
|
||||
if ((num != -1) && (ftr_actor->dynamic_work_s[0] >= num)) {
|
||||
ftr_actor->dynamic_work_s[0] = 0;
|
||||
ftr_actor->tex_animation.frame++;
|
||||
@@ -90,6 +101,7 @@ static void aNogFan_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u
|
||||
ftr_actor->tex_animation.frame = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void aNogFan_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
|
||||
@@ -17,7 +17,6 @@ u8* fNNB_texture_table[] = {
|
||||
extern Gfx int_nog_nabe_fire_model[];
|
||||
void fNNB_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
cKF_SkeletonInfo_R_c* keyf;
|
||||
u32 t;
|
||||
|
||||
keyf = &ftr_actor->keyframe;
|
||||
cKF_SkeletonInfo_R_ct(keyf, &cKF_bs_r_int_nog_nabe, &cKF_ba_r_int_nog_nabe, ftr_actor->joint, ftr_actor->morph);
|
||||
@@ -25,9 +24,8 @@ void fNNB_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
keyf->frame_control.speed = 0.0f;
|
||||
keyf->frame_control.start_frame = 1.0f;
|
||||
keyf->frame_control.end_frame = cKF_ba_r_int_nog_nabe.frames;
|
||||
t = 1 - ftr_actor->switch_bit;
|
||||
ftr_actor->dynamic_work_s[0] = t > 0;
|
||||
if (ftr_actor->dynamic_work_s[0] == 0) {
|
||||
ftr_actor->dynamic_work_s[0] = ftr_actor->switch_bit != TRUE;
|
||||
if (!ftr_actor->dynamic_work_s[0]) {
|
||||
keyf->frame_control.current_frame = cKF_ba_r_int_nog_nabe.frames;
|
||||
}
|
||||
cKF_SkeletonInfo_R_play(keyf);
|
||||
|
||||
@@ -10,7 +10,11 @@ aFTR_PROFILE iam_sum_hal_table01 = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
33.0f,
|
||||
#else
|
||||
32.0f,
|
||||
#endif
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEC,
|
||||
mCoBG_FTR_TYPEC,
|
||||
|
||||
@@ -1,3 +1,105 @@
|
||||
// Aus version changed the naming to use their 'standard'
|
||||
// It also updates the mv func to remove the animation frame logic.
|
||||
// The dw function was updated to use the game frame instead of an internal counter.
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
static void fST01_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fST01_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
if (ftr_actor->switch_bit) {
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 5, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
|
||||
if (ftr_actor->switch_changed_flag) {
|
||||
if (ftr_actor->switch_bit) {
|
||||
sAdo_OngenTrgStart(0x16, &ftr_actor->position);
|
||||
} else {
|
||||
sAdo_OngenTrgStart(0x17, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern u8 int_sum_tv01_front1_TA_tex_txt[];
|
||||
extern u8 int_sum_tv01_front2_TA_tex_txt[];
|
||||
extern u8 int_sum_tv01_front3_TA_tex_txt[];
|
||||
extern u8 int_sum_tv01_front4_TA_tex_txt[];
|
||||
|
||||
extern Gfx int_sum_tv01_on_model[];
|
||||
extern Gfx int_sum_tv01_off_model[];
|
||||
|
||||
static u8* fST01_on_anime[] = {
|
||||
int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt,
|
||||
int_sum_tv01_front3_TA_tex_txt, int_sum_tv01_front3_TA_tex_txt, int_sum_tv01_front3_TA_tex_txt,
|
||||
int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt,
|
||||
int_sum_tv01_front3_TA_tex_txt, int_sum_tv01_front3_TA_tex_txt, int_sum_tv01_front3_TA_tex_txt,
|
||||
int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt,
|
||||
int_sum_tv01_front3_TA_tex_txt, int_sum_tv01_front3_TA_tex_txt, int_sum_tv01_front3_TA_tex_txt,
|
||||
int_sum_tv01_front4_TA_tex_txt, int_sum_tv01_front4_TA_tex_txt, int_sum_tv01_front4_TA_tex_txt,
|
||||
int_sum_tv01_front4_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt,
|
||||
int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt, int_sum_tv01_front2_TA_tex_txt,
|
||||
};
|
||||
|
||||
static void fST01_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
u32 ctr_ofs;
|
||||
u8* tex;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (ftr_actor->switch_bit) {
|
||||
if (ftr_actor->ctr_type == aFTR_CTR_TYPE_GAME_PLAY) {
|
||||
ctr_ofs = play->game_frame;
|
||||
} else {
|
||||
ctr_ofs = game->frame_counter;
|
||||
}
|
||||
|
||||
tex = fST01_on_anime[(ctr_ofs >> 1) % ARRAY_COUNT(fST01_on_anime)];
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, tex);
|
||||
} else {
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, int_sum_tv01_front1_TA_tex_txt);
|
||||
}
|
||||
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_sum_tv01_on_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_sum_tv01_off_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void fST01_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fST01_func = {
|
||||
&fST01_ct, &fST01_mv, &fST01_dw, &fST01_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_sum_tv01 = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
18.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEA,
|
||||
mCoBG_FTR_TYPEA,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_START_DISABLED,
|
||||
&fST01_func,
|
||||
// clang-format on
|
||||
};
|
||||
#else
|
||||
static void aSumTv01_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
@@ -92,3 +194,4 @@ aFTR_PROFILE iam_sum_tv01 = {
|
||||
&aSumTv01_func,
|
||||
// clang-format on
|
||||
};
|
||||
#endif
|
||||
|
||||
+104
-9
@@ -1,8 +1,102 @@
|
||||
static void aSumTv02_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// Aus version changed the naming to use their 'standard'
|
||||
// It also updates the mv func to remove the animation frame logic.
|
||||
// The dw function was updated to use the game frame instead of an internal counter.
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
static void fST02_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void aSumTv02_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
static void fST02_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
if (ftr_actor->switch_bit) {
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 4, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
|
||||
if (ftr_actor->switch_changed_flag) {
|
||||
if (ftr_actor->switch_bit) {
|
||||
sAdo_OngenTrgStart(0x16, &ftr_actor->position);
|
||||
} else {
|
||||
sAdo_OngenTrgStart(0x17, &ftr_actor->position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern u8 int_sum_tv02_front1_TA_tex_txt[];
|
||||
extern u8 int_sum_tv02_front2_TA_tex_txt[];
|
||||
extern u8 int_sum_tv02_front3_TA_tex_txt[];
|
||||
|
||||
extern Gfx int_sum_tv02_on_model[];
|
||||
extern Gfx int_sum_tv02_off_model[];
|
||||
|
||||
static u8* fST02_on_anime[] = {
|
||||
int_sum_tv02_front2_TA_tex_txt, int_sum_tv02_front2_TA_tex_txt, int_sum_tv02_front3_TA_tex_txt,
|
||||
int_sum_tv02_front3_TA_tex_txt, int_sum_tv02_front3_TA_tex_txt,
|
||||
};
|
||||
|
||||
static void fST02_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
u32 ctr_ofs;
|
||||
u8* tex;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (ftr_actor->switch_bit) {
|
||||
if (ftr_actor->ctr_type == aFTR_CTR_TYPE_GAME_PLAY) {
|
||||
ctr_ofs = play->game_frame;
|
||||
} else {
|
||||
ctr_ofs = game->frame_counter;
|
||||
}
|
||||
|
||||
tex = fST02_on_anime[(ctr_ofs >> 1) % ARRAY_COUNT(fST02_on_anime)];
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, tex);
|
||||
} else {
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, int_sum_tv02_front1_TA_tex_txt);
|
||||
}
|
||||
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_sum_tv02_on_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_sum_tv02_off_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void fST02_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fST02_func = {
|
||||
&fST02_ct, &fST02_mv, &fST02_dw, &fST02_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_sum_tv02 = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
18.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEB_0,
|
||||
mCoBG_FTR_TYPEB_0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_START_DISABLED,
|
||||
&fST02_func,
|
||||
// clang-format on
|
||||
};
|
||||
#else
|
||||
static void fST02_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fST02_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
if (ftr_actor->switch_bit) {
|
||||
if (aFTR_CAN_PLAY_SE(ftr_actor)) {
|
||||
sAdo_OngenPos((u32)ftr_actor, 4, &ftr_actor->position);
|
||||
@@ -30,19 +124,19 @@ extern u8 int_sum_tv02_front3_TA_tex_txt[];
|
||||
extern Gfx int_sum_tv02_on_model[];
|
||||
extern Gfx int_sum_tv02_off_model[];
|
||||
|
||||
static u8* aSumTv02_on_anime[] = {
|
||||
static u8* fST02_on_anime[] = {
|
||||
int_sum_tv02_front2_TA_tex_txt, int_sum_tv02_front2_TA_tex_txt, int_sum_tv02_front3_TA_tex_txt,
|
||||
int_sum_tv02_front3_TA_tex_txt, int_sum_tv02_front3_TA_tex_txt,
|
||||
};
|
||||
|
||||
static void aSumTv02_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
static void fST02_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (ftr_actor->switch_bit) {
|
||||
int frame = (s16)(ftr_actor->tex_animation.frame >> 1);
|
||||
u8* tex = aSumTv02_on_anime[frame];
|
||||
u8* tex = fST02_on_anime[frame];
|
||||
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, tex);
|
||||
} else {
|
||||
@@ -55,12 +149,12 @@ static void aSumTv02_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game,
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void aSumTv02_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
static void fST02_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static aFTR_vtable_c aSumTv02_func = {
|
||||
&aSumTv02_ct, &aSumTv02_mv, &aSumTv02_dw, &aSumTv02_dt, NULL,
|
||||
static aFTR_vtable_c fST02_func = {
|
||||
&fST02_ct, &fST02_mv, &fST02_dw, &fST02_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_sum_tv02 = {
|
||||
@@ -81,6 +175,7 @@ aFTR_PROFILE iam_sum_tv02 = {
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_START_DISABLED,
|
||||
&aSumTv02_func,
|
||||
&fST02_func,
|
||||
// clang-format on
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,11 @@ aFTR_PROFILE iam_tak_table02 = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#if VERSION >= VER_GAFU01_00
|
||||
31.0f,
|
||||
#else
|
||||
30.0f,
|
||||
#endif
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEC,
|
||||
mCoBG_FTR_TYPEC,
|
||||
|
||||
Reference in New Issue
Block a user