mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Merge branch 'master' into ac_my_room_scaffold
This commit is contained in:
@@ -260,6 +260,7 @@ extern aMR_contact_info_c* aMR_GetContactInfoLayer1(void);
|
||||
extern FTR_ACTOR* aMR_GetParentFactor();
|
||||
extern s16 aMR_GetParentAngleOffset(FTR_ACTOR* ftr_actor, MY_ROOM_ACTOR* my_room_actor);
|
||||
extern void aMR_SetSurprise(ACTOR* my_room_actor, s16 rot);
|
||||
extern void aMR_RadioCommonMove(FTR_ACTOR* ftr_actor, ACTOR* my_room_actorx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+12
-12
@@ -198,18 +198,18 @@ static Gfx* fFTR_GetTwoTileGfx(int width0, int height0, int scroll_x0, int scrol
|
||||
#include "../src/ftr/ac_ike_jny_syon01.c"
|
||||
#include "../src/ftr/ac_ike_jny_tower01.c"
|
||||
#include "../src/ftr/ac_ike_jny_truth01.c"
|
||||
// #include "../src/ftr/ac_ike_jpn_tansu01.c"
|
||||
#include "../src/ftr/ac_ike_jpn_tansu01.c"
|
||||
// #include "../src/ftr/ac_ike_kama_danro01.c"
|
||||
// #include "../src/ftr/ac_ike_k_count01.c"
|
||||
#include "../src/ftr/ac_ike_k_iveboy01.c"
|
||||
#include "../src/ftr/ac_ike_k_kid01.c"
|
||||
#include "../src/ftr/ac_ike_k_kid02.c"
|
||||
// #include "../src/ftr/ac_ike_k_mame01.c"
|
||||
#include "../src/ftr/ac_ike_k_mame01.c"
|
||||
#include "../src/ftr/ac_ike_k_sum01.c"
|
||||
#include "../src/ftr/ac_ike_k_otome01.c"
|
||||
// #include "../src/ftr/ac_ike_k_sinnen01.c"
|
||||
#include "../src/ftr/ac_ike_k_sinnen01.c"
|
||||
// #include "../src/ftr/ac_ike_k_tanabata01.c"
|
||||
// #include "../src/ftr/ac_ike_k_turis01.c"
|
||||
#include "../src/ftr/ac_ike_k_turis01.c"
|
||||
#include "../src/ftr/ac_ike_nikki_fan1.c"
|
||||
#include "../src/ftr/ac_ike_nikki_fan2.c"
|
||||
#include "../src/ftr/ac_ike_nikki_fan3.c"
|
||||
@@ -700,10 +700,10 @@ static Gfx* fFTR_GetTwoTileGfx(int width0, int height0, int scroll_x0, int scrol
|
||||
#include "../src/ftr/ac_tak_snowlamp.c"
|
||||
#include "../src/ftr/ac_tak_station.c"
|
||||
#include "../src/ftr/ac_tak_table02.c"
|
||||
// #include "../src/ftr/ac_tak_tailor.c"
|
||||
#include "../src/ftr/ac_tak_tailor.c"
|
||||
#include "../src/ftr/ac_tak_tekkin.c"
|
||||
#include "../src/ftr/ac_tak_tetra.c"
|
||||
// #include "../src/ftr/ac_tak_toudai.c"
|
||||
#include "../src/ftr/ac_tak_toudai.c"
|
||||
#include "../src/ftr/ac_tak_ufo.c"
|
||||
#include "../src/ftr/ac_tak_yaji.c"
|
||||
#include "../src/ftr/ac_tak_yoroi.c"
|
||||
@@ -716,12 +716,12 @@ static Gfx* fFTR_GetTwoTileGfx(int width0, int height0, int scroll_x0, int scrol
|
||||
#include "../src/ftr/ac_iid_snow.c"
|
||||
#include "../src/ftr/ac_iid_surf.c"
|
||||
#include "../src/ftr/ac_iid_yuki.c"
|
||||
// #include "../src/ftr/ac_hayakawa_famicom.c"
|
||||
// #include "../src/ftr/ac_radio_test.c"
|
||||
// #include "../src/ftr/ac_gold_item.c"
|
||||
// #include "../src/ftr/ac_utiwa.c"
|
||||
// #include "../src/ftr/ac_kazaguruma.c"
|
||||
// #include "../src/ftr/ac_tool.c"
|
||||
#include "../src/ftr/ac_hayakawa_famicom.c"
|
||||
#include "../src/ftr/ac_radio_test.c"
|
||||
#include "../src/ftr/ac_gold_item.c"
|
||||
#include "../src/ftr/ac_utiwa.c"
|
||||
#include "../src/ftr/ac_kazaguruma.c"
|
||||
#include "../src/ftr/ac_tool.c"
|
||||
#include "../src/ftr/ac_hos_deskL.c"
|
||||
#include "../src/ftr/ac_hos_deskR.c"
|
||||
#include "../src/ftr/ac_hos_flip.c"
|
||||
|
||||
+61
-9
@@ -1,17 +1,68 @@
|
||||
static void fGI_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fGI_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fGI_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fGI_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fGI_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fGI_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fGI_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
extern Gfx obj_net2T_gfx_model[];
|
||||
extern Gfx obj_net2T_mat_model[];
|
||||
|
||||
extern Gfx obj_axe2T_gfx_model[];
|
||||
extern Gfx obj_axe2T_mat_model[];
|
||||
|
||||
extern Gfx obj_shovel2T_gfx_model[];
|
||||
extern Gfx obj_shovel2T_mat_model[];
|
||||
|
||||
extern Gfx obj_rod2T_gfx_model[];
|
||||
extern Gfx obj_rod2T_mat_model[];
|
||||
|
||||
extern Gfx obj_rod_line2T_gfx_model[];
|
||||
extern Gfx obj_rod_line2T_mat_model[];
|
||||
|
||||
static Gfx* fGI_mat_table[] = {
|
||||
obj_net2T_mat_model,
|
||||
obj_axe2T_mat_model,
|
||||
obj_shovel2T_mat_model,
|
||||
obj_rod_line2T_mat_model,
|
||||
};
|
||||
|
||||
static Gfx* fGI_gfx_table[] = {
|
||||
obj_net2T_gfx_model,
|
||||
obj_axe2T_gfx_model,
|
||||
obj_shovel2T_gfx_model,
|
||||
obj_rod_line2T_gfx_model,
|
||||
};
|
||||
|
||||
static void fGI_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
int tool_idx = (ftr_actor->name - 0x44F) & 3;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fGI_mat_table[tool_idx]);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fGI_gfx_table[tool_idx]);
|
||||
|
||||
if (ftr_actor->name == 0x452) {
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, obj_rod2T_mat_model);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, obj_rod2T_gfx_model);
|
||||
}
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fGI_func = {
|
||||
&fGI_ct,
|
||||
&fGI_mv,
|
||||
&fGI_dw,
|
||||
&fGI_dt,
|
||||
NULL,
|
||||
&fGI_ct, &fGI_mv, &fGI_dw, &fGI_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_gold_item = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -29,4 +80,5 @@ aFTR_PROFILE iam_gold_item = {
|
||||
0,
|
||||
0,
|
||||
&fGI_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -1,33 +1,60 @@
|
||||
static void fHF_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fHF_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fHF_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fHF_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fHF_dma(mActor_name_t ftr_name, u8* data);
|
||||
static void fHF_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fHF_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
(*Common_Get(clip).my_room_clip->famicom_emu_common_move_proc)(ftr_actor, my_room_actor, game, 20, 20); // FDS LoZ
|
||||
}
|
||||
|
||||
extern u8 int_tak_nes_ds_tex_rgb_i4[];
|
||||
extern u16 int_tak_nes_cl_pal[];
|
||||
extern Gfx int_tak_nes01_on_model[];
|
||||
extern Gfx int_tak_nes01_onT_model[];
|
||||
extern Gfx int_tak_nes01_game_on_model[];
|
||||
|
||||
static void fHF_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);
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, int_tak_nes_ds_tex_rgb_i4);
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_9, int_tak_nes_cl_pal);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_tak_nes01_on_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_tak_nes01_onT_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_tak_nes01_game_on_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void fHF_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fHF_dma(mActor_name_t ftr_name, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fHF_func = {
|
||||
&fHF_ct,
|
||||
&fHF_mv,
|
||||
&fHF_dw,
|
||||
&fHF_dt,
|
||||
&fHF_dma,
|
||||
&fHF_ct, &fHF_mv, &fHF_dw, &fHF_dt, &fHF_dma,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_hayakawa_famicom = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
18.0f,
|
||||
0.01f,
|
||||
aFTR_SHAPE_TYPEA,
|
||||
mCoBG_FTR_TYPEA,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
aFTR_INTERACTION_FAMICOM,
|
||||
&fHF_func,
|
||||
// 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_FAMICOM,
|
||||
&fHF_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
+39
-9
@@ -1,17 +1,46 @@
|
||||
static void fKZ_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fKZ_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fKZ_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fKZ_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fKZ_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fKZ_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fKZ_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
extern Gfx obj_shop_kaza1_model[];
|
||||
extern Gfx obj_shop_kaza2_model[];
|
||||
extern Gfx obj_shop_kaza3_model[];
|
||||
extern Gfx obj_shop_kaza4_model[];
|
||||
extern Gfx obj_shop_kaza5_model[];
|
||||
extern Gfx obj_shop_kaza6_model[];
|
||||
extern Gfx obj_shop_kaza7_model[];
|
||||
extern Gfx obj_shop_kaza8_model[];
|
||||
|
||||
static Gfx* fKZ_model_table[] = {
|
||||
obj_shop_kaza1_model, obj_shop_kaza2_model, obj_shop_kaza3_model, obj_shop_kaza4_model,
|
||||
obj_shop_kaza5_model, obj_shop_kaza6_model, obj_shop_kaza7_model, obj_shop_kaza8_model,
|
||||
};
|
||||
|
||||
static void fKZ_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
int windmill_idx = (ftr_actor->name - 0x45B) & 7;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fKZ_model_table[windmill_idx]);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fKZ_func = {
|
||||
&fKZ_ct,
|
||||
&fKZ_mv,
|
||||
&fKZ_dw,
|
||||
&fKZ_dt,
|
||||
NULL,
|
||||
&fKZ_ct, &fKZ_mv, &fKZ_dw, &fKZ_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_kazaguruma = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -29,4 +58,5 @@ aFTR_PROFILE iam_kazaguruma = {
|
||||
0,
|
||||
0,
|
||||
&fKZ_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
+45
-9
@@ -1,17 +1,52 @@
|
||||
static void fRT_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fRT_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fRT_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fRT_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fRT_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fRT_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
aMR_RadioCommonMove(ftr_actor, my_room_actor);
|
||||
|
||||
if (ftr_actor->switch_bit == TRUE) {
|
||||
if (ftr_actor->dynamic_work_s[0] >= 36) {
|
||||
xyz_t pos = ftr_actor->position;
|
||||
|
||||
pos.y -= 3.0f;
|
||||
|
||||
(*Common_Get(clip).effect_clip->effect_make_proc)(eEC_EFFECT_KONPU, pos, 1,
|
||||
ftr_actor->s_angle_y + DEG2SHORT_ANGLE(337.5f), game,
|
||||
FTR_AEROBICS_RADIO, 1, 0);
|
||||
ftr_actor->dynamic_work_s[0] = 0;
|
||||
}
|
||||
|
||||
ftr_actor->dynamic_work_s[0]++;
|
||||
}
|
||||
}
|
||||
|
||||
extern Gfx radio_DL_model[];
|
||||
|
||||
static void fRT_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
static u16 radio_pal[] = { 0x0335, 0xE79D, 0xCEF9, 0xB212, 0x9D4A, 0x8CC7, 0xD0A8, 0xC655,
|
||||
0xB5D1, 0xA96D, 0x98EA, 0x8887, 0xA12B, 0xC5A2, 0xEEE9, 0xF7D7 };
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
Matrix_RotateY(DEG2SHORT_ANGLE(-157.5f), 1);
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, radio_pal);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, radio_DL_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static void fRT_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fRT_func = {
|
||||
&fRT_ct,
|
||||
&fRT_mv,
|
||||
&fRT_dw,
|
||||
&fRT_dt,
|
||||
NULL,
|
||||
&fRT_ct, &fRT_mv, &fRT_dw, &fRT_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_radio_test = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -29,4 +64,5 @@ aFTR_PROFILE iam_radio_test = {
|
||||
0,
|
||||
0,
|
||||
&fRT_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
+38
-9
@@ -1,17 +1,45 @@
|
||||
static void fTTR_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fTTR_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fTTR_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fTTR_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
extern u16 int_tak_tailor_off_pal[];
|
||||
extern u16 int_tak_tailor_on_pal[];
|
||||
|
||||
static void fTTR_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
ftr_actor->pal_p = (u16*)zelda_malloc_align(16 * sizeof(u16), 32);
|
||||
fFTR_MorphHousepaletteCt(ftr_actor->pal_p, int_tak_tailor_off_pal, int_tak_tailor_on_pal, ftr_actor);
|
||||
}
|
||||
|
||||
static void fTTR_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
fFTR_MorphHousePalette(ftr_actor->pal_p, int_tak_tailor_off_pal, int_tak_tailor_on_pal, ftr_actor);
|
||||
}
|
||||
|
||||
static void fTTR_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
if (ftr_actor->pal_p != NULL) {
|
||||
zelda_free(ftr_actor->pal_p);
|
||||
}
|
||||
}
|
||||
|
||||
extern Gfx int_tak_tailor_on_model[];
|
||||
extern Gfx int_tak_tailor_onT_model[];
|
||||
extern Gfx int_tak_tailor_offT_model[];
|
||||
|
||||
static void fTTR_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
u16* pal_p = ftr_actor->pal_p;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, pal_p);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_tak_tailor_on_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_tak_tailor_onT_model);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, int_tak_tailor_offT_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fTTR_func = {
|
||||
&fTTR_ct,
|
||||
&fTTR_mv,
|
||||
&fTTR_dw,
|
||||
&fTTR_dt,
|
||||
NULL,
|
||||
&fTTR_ct, &fTTR_mv, &fTTR_dw, &fTTR_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_tak_tailor = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -29,4 +57,5 @@ aFTR_PROFILE iam_tak_tailor = {
|
||||
0,
|
||||
0,
|
||||
&fTTR_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
+92
-8
@@ -1,16 +1,99 @@
|
||||
static void fTTD_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fTTD_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fTTD_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
extern cKF_Skeleton_R_c cKF_bs_r_int_tak_toudai;
|
||||
extern cKF_Animation_R_c cKF_ba_r_int_tak_toudai;
|
||||
|
||||
static void fTTD_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
cKF_SkeletonInfo_R_c* keyframe = &ftr_actor->keyframe;
|
||||
|
||||
cKF_SkeletonInfo_R_ct(keyframe, &cKF_bs_r_int_tak_toudai, &cKF_ba_r_int_tak_toudai, ftr_actor->joint,
|
||||
ftr_actor->morph);
|
||||
cKF_SkeletonInfo_R_init_standard_repeat(keyframe, &cKF_ba_r_int_tak_toudai, NULL);
|
||||
cKF_SkeletonInfo_R_play(keyframe);
|
||||
|
||||
if (ftr_actor->switch_bit == TRUE) {
|
||||
keyframe->frame_control.speed = 1.0f;
|
||||
ftr_actor->dynamic_work_f[0] = 1.0f;
|
||||
} else {
|
||||
keyframe->frame_control.speed = 0.0f;
|
||||
ftr_actor->dynamic_work_f[0] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
static void fTTD_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
cKF_SkeletonInfo_R_c* keyframe = &ftr_actor->keyframe;
|
||||
f32 target;
|
||||
|
||||
if (ftr_actor->switch_bit == TRUE) {
|
||||
target = 1.0f;
|
||||
} else {
|
||||
target = 0.0f;
|
||||
}
|
||||
|
||||
add_calc(&ftr_actor->dynamic_work_f[0], target, 0.3f, 0.3f, 0.0001f);
|
||||
keyframe->frame_control.speed = ftr_actor->dynamic_work_f[0] * 0.5f * 2.0f;
|
||||
cKF_SkeletonInfo_R_play(keyframe);
|
||||
}
|
||||
|
||||
static int fTTD_DrawBefore(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint_idx, Gfx** joint_shape,
|
||||
u8* joint_flags, void* arg, s_xyz* joint_rot, xyz_t* joint_pos) {
|
||||
FTR_ACTOR* ftr_actor = (FTR_ACTOR*)arg;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
if (joint_idx == 3 || joint_idx == 7) {
|
||||
*joint_shape = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
extern Gfx int_tak_toudai_evw_model[];
|
||||
extern Gfx int_tak_toudai_right_model[];
|
||||
|
||||
static int fTTD_DrawAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint_idx, Gfx** joint_shape, u8* joint_flags,
|
||||
void* arg, s_xyz* joint_rot, xyz_t* joint_pos) {
|
||||
FTR_ACTOR* ftr_actor = (FTR_ACTOR*)arg;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
u8 l = (int)(ftr_actor->dynamic_work_f[0] * 255.0f);
|
||||
|
||||
if (joint_idx == 3) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, int_tak_toudai_evw_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
} else if (joint_idx == 7) {
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, l, 255, 255, 150, 255);
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, int_tak_toudai_right_model);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void fTTD_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
cKF_SkeletonInfo_R_c* keyframe = &ftr_actor->keyframe;
|
||||
Mtx* mtx = ftr_actor->skeleton_mtx[game->frame_counter & 1];
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
|
||||
cKF_Si3_draw_R_SV(game, keyframe, mtx, &fTTD_DrawBefore, &fTTD_DrawAfter, ftr_actor);
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fTTD_func = {
|
||||
&fTTD_ct,
|
||||
&fTTD_mv,
|
||||
&fTTD_dw,
|
||||
NULL,
|
||||
NULL,
|
||||
&fTTD_ct, &fTTD_mv, &fTTD_dw, NULL, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_tak_toudai = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -28,4 +111,5 @@ aFTR_PROFILE iam_tak_toudai = {
|
||||
0,
|
||||
0,
|
||||
&fTTD_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
+61
-9
@@ -1,17 +1,68 @@
|
||||
static void fTOOL_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fTOOL_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fTOOL_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fTOOL_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fTOOL_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fTOOL_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fTOOL_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
extern Gfx obj_netT_gfx_model[];
|
||||
extern Gfx obj_netT_mat_model[];
|
||||
|
||||
extern Gfx obj_axeT_gfx_model[];
|
||||
extern Gfx obj_axeT_mat_model[];
|
||||
|
||||
extern Gfx obj_shovelT_gfx_model[];
|
||||
extern Gfx obj_shovelT_mat_model[];
|
||||
|
||||
extern Gfx obj_rodT_gfx_model[];
|
||||
extern Gfx obj_rodT_mat_model[];
|
||||
|
||||
extern Gfx obj_rod_lineT_gfx_model[];
|
||||
extern Gfx obj_rod_lineT_mat_model[];
|
||||
|
||||
static Gfx* fTOOL_mat_table[] = {
|
||||
obj_netT_mat_model,
|
||||
obj_axeT_mat_model,
|
||||
obj_shovelT_mat_model,
|
||||
obj_rod_lineT_mat_model,
|
||||
};
|
||||
|
||||
static Gfx* fTOOL_gfx_table[] = {
|
||||
obj_netT_gfx_model,
|
||||
obj_axeT_gfx_model,
|
||||
obj_shovelT_gfx_model,
|
||||
obj_rod_lineT_gfx_model,
|
||||
};
|
||||
|
||||
static void fTOOL_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
int tool_idx = (ftr_actor->name - 0x463) & 3;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fTOOL_mat_table[tool_idx]);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fTOOL_gfx_table[tool_idx]);
|
||||
|
||||
if (ftr_actor->name == 0x466) {
|
||||
gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, obj_rodT_mat_model);
|
||||
gSPDisplayList(NEXT_POLY_XLU_DISP, obj_rodT_gfx_model);
|
||||
}
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fTOOL_func = {
|
||||
&fTOOL_ct,
|
||||
&fTOOL_mv,
|
||||
&fTOOL_dw,
|
||||
&fTOOL_dt,
|
||||
NULL,
|
||||
&fTOOL_ct, &fTOOL_mv, &fTOOL_dw, &fTOOL_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_tool = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -29,4 +80,5 @@ aFTR_PROFILE iam_tool = {
|
||||
0,
|
||||
0,
|
||||
&fTOOL_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
+54
-9
@@ -1,17 +1,61 @@
|
||||
static void fUW_ct(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fUW_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fUW_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data);
|
||||
static void fUW_dt(FTR_ACTOR* ftr_actor, u8* data);
|
||||
static void fUW_ct(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fUW_mv(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
static void fUW_dt(FTR_ACTOR* ftr_actor, u8* data) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
extern Gfx obj_shop_utiwa1_mat_model[];
|
||||
extern Gfx obj_shop_utiwa2_mat_model[];
|
||||
extern Gfx obj_shop_utiwa3_mat_model[];
|
||||
extern Gfx obj_shop_utiwa4_mat_model[];
|
||||
extern Gfx obj_shop_utiwa5_mat_model[];
|
||||
extern Gfx obj_shop_utiwa6_mat_model[];
|
||||
extern Gfx obj_shop_utiwa7_mat_model[];
|
||||
extern Gfx obj_shop_utiwa8_mat_model[];
|
||||
|
||||
static Gfx* fUW_mat_table[] = {
|
||||
obj_shop_utiwa1_mat_model, obj_shop_utiwa2_mat_model, obj_shop_utiwa3_mat_model, obj_shop_utiwa4_mat_model,
|
||||
obj_shop_utiwa5_mat_model, obj_shop_utiwa6_mat_model, obj_shop_utiwa7_mat_model, obj_shop_utiwa8_mat_model,
|
||||
};
|
||||
|
||||
extern Gfx obj_shop_utiwa1_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa2_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa3_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa4_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa5_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa6_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa7_gfx_model[];
|
||||
extern Gfx obj_shop_utiwa8_gfx_model[];
|
||||
|
||||
static Gfx* fUW_gfx_table[] = {
|
||||
obj_shop_utiwa1_gfx_model, obj_shop_utiwa2_gfx_model, obj_shop_utiwa3_gfx_model, obj_shop_utiwa4_gfx_model,
|
||||
obj_shop_utiwa5_gfx_model, obj_shop_utiwa6_gfx_model, obj_shop_utiwa7_gfx_model, obj_shop_utiwa8_gfx_model,
|
||||
};
|
||||
|
||||
static void fUW_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* data) {
|
||||
int utiwa_idx = (ftr_actor->name - 0x453) & 7;
|
||||
|
||||
OPEN_DISP(game->graph);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fUW_mat_table[utiwa_idx]);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, fUW_gfx_table[utiwa_idx]);
|
||||
|
||||
CLOSE_DISP(game->graph);
|
||||
}
|
||||
|
||||
static aFTR_vtable_c fUW_func = {
|
||||
&fUW_ct,
|
||||
&fUW_mv,
|
||||
&fUW_dw,
|
||||
&fUW_dt,
|
||||
NULL,
|
||||
&fUW_ct, &fUW_mv, &fUW_dw, &fUW_dt, NULL,
|
||||
};
|
||||
|
||||
aFTR_PROFILE iam_utiwa = {
|
||||
// clang-format off
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -29,4 +73,5 @@ aFTR_PROFILE iam_utiwa = {
|
||||
0,
|
||||
0,
|
||||
&fUW_func,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user