mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-04 03:12:50 -04:00
Merge pull request #431 from Cuyler36:more_player_states
Implement more player states
This commit is contained in:
@@ -259,7 +259,7 @@ typedef struct common_data_s {
|
||||
/* 0x02883A */ s8 goki_shocked_flag;
|
||||
/* 0x02883B */ u8 time_changed_flag;
|
||||
/* 0x02883C */ u8 unable_to_wade_flag;
|
||||
/* 0x02883D */ u8 _02883D;
|
||||
/* 0x02883D */ u8 fail_emu_flag;
|
||||
/* 0x02883E */ u8 train_coming_flag; /* state tracker for when train is going to spawn/has spawned */
|
||||
/* 0x02883F */ u8 train_exists_flag; /* state tracker for when train exists */
|
||||
/* 0x028840 */ u8 train_control_state; /* current train state */
|
||||
|
||||
+46
-6
@@ -471,8 +471,8 @@ enum {
|
||||
mPlayer_ITEM_MAIN_NUM,
|
||||
};
|
||||
|
||||
#define mPlayer_ITEM_MAIN_VALID(main_index) ((main_index) >= (mPlayer_ITEM_MAIN_NONE) && (main_index) < (mPlayer_ITEM_MAIN_NUM))
|
||||
|
||||
#define mPlayer_ITEM_MAIN_VALID(main_index) \
|
||||
((main_index) >= (mPlayer_ITEM_MAIN_NONE) && (main_index) < (mPlayer_ITEM_MAIN_NUM))
|
||||
|
||||
enum {
|
||||
mPlayer_ITEM_KIND_AXE,
|
||||
@@ -667,6 +667,7 @@ enum {
|
||||
mPlayer_PART_TABLE_AXE,
|
||||
mPlayer_PART_TABLE_PICK_UP,
|
||||
mPlayer_PART_TABLE_NET,
|
||||
mPlayer_PART_TABLE_FAN,
|
||||
|
||||
mPlayer_PART_TABLE_NUM
|
||||
};
|
||||
@@ -892,8 +893,8 @@ typedef struct player_request_shock_s {
|
||||
} mPlayer_request_shock_c;
|
||||
|
||||
typedef struct player_request_push_snowball_s {
|
||||
u32 type;
|
||||
int wade_type;
|
||||
u32 label;
|
||||
int wade_flag;
|
||||
} mPlayer_request_push_snowball_c;
|
||||
|
||||
typedef struct player_request_stung_mosquito_s {
|
||||
@@ -1191,11 +1192,11 @@ typedef struct player_request_change_cloth_s {
|
||||
int prev_main_index;
|
||||
mActor_name_t cloth_item;
|
||||
u16 cloth_idx;
|
||||
int _10;
|
||||
int try_on_flag;
|
||||
} mPlayer_request_change_cloth_c;
|
||||
|
||||
typedef struct player_request_swing_fan_s {
|
||||
int anim_idx;
|
||||
int start_swing;
|
||||
} mPlayer_request_swing_fan_c;
|
||||
|
||||
typedef struct player_request_radio_exercise_s {
|
||||
@@ -1604,6 +1605,7 @@ typedef struct player_main_broken_axe_s {
|
||||
|
||||
typedef struct player_main_relax_rod_s {
|
||||
int bee_flag;
|
||||
int mosquito_flag
|
||||
} mPlayer_main_relax_rod_c;
|
||||
|
||||
typedef struct player_main_dig_scoop_s {
|
||||
@@ -1767,10 +1769,42 @@ typedef struct player_main_shock_s {
|
||||
int bgm_stop_flag;
|
||||
} mPlayer_main_shock_c;
|
||||
|
||||
typedef struct player_main_knock_door_s {
|
||||
mPlayer_request_knock_door_c request_data;
|
||||
} mPlayer_main_knock_door_c;
|
||||
|
||||
typedef struct player_main_change_cloth_s {
|
||||
ACTOR* talk_actor;
|
||||
int turn_flag;
|
||||
int prev_main_index;
|
||||
mActor_name_t cloth_item;
|
||||
u16 cloth_idx;
|
||||
} mPlayer_main_change_cloth_c;
|
||||
|
||||
typedef struct player_main_push_snowball_s {
|
||||
u32 label;
|
||||
} mPlayer_main_push_snowball_c;
|
||||
|
||||
typedef struct player_main_complete_payment_s {
|
||||
f32 timer;
|
||||
int msg_mode;
|
||||
} mPlayer_main_complete_payment_c;
|
||||
|
||||
typedef struct player_main_fail_emu_s {
|
||||
f32 timer;
|
||||
int msg_mode;
|
||||
} mPlayer_main_fail_emu_c;
|
||||
|
||||
typedef struct player_main_stung_mosquito_s {
|
||||
u32 label;
|
||||
} mPlayer_main_stung_mosquito_c;
|
||||
|
||||
typedef struct player_main_notice_mosquito_s {
|
||||
u32 label;
|
||||
f32 timer;
|
||||
int msg_mode;
|
||||
} mPlayer_main_notice_mosquito_c;
|
||||
|
||||
typedef struct player_main_wade_snowball_s {
|
||||
int dir;
|
||||
xyz_t start_pos;
|
||||
@@ -1868,7 +1902,13 @@ typedef union {
|
||||
mPlayer_main_notice_bee_c notice_bee;
|
||||
mPlayer_main_remove_grass_c remove_grass;
|
||||
mPlayer_main_shock_c shock;
|
||||
mPlayer_main_knock_door_c knock_door;
|
||||
mPlayer_main_change_cloth_c change_cloth;
|
||||
mPlayer_main_push_snowball_c push_snowball;
|
||||
mPlayer_main_complete_payment_c complete_payment;
|
||||
mPlayer_main_fail_emu_c fail_emu;
|
||||
mPlayer_main_stung_mosquito_c stung_mosquito;
|
||||
mPlayer_main_notice_mosquito_c notice_mosquito;
|
||||
mPlayer_main_wade_snowball_c wade_snowball;
|
||||
mPlayer_main_demo_geton_boat_wade_c demo_geton_boat_wade;
|
||||
mPlayer_main_demo_geton_boat_sitdown_c demo_geton_boat_sitdown;
|
||||
|
||||
@@ -111,6 +111,8 @@ extern int mPlib_strength_request_main_demo_wade_priority(GAME* game);
|
||||
extern int mPlib_strength_request_main_demo_geton_boat_wade_priority(GAME* game);
|
||||
extern int mPlib_strength_request_main_wade_snowball_priority(GAME* game);
|
||||
extern void mPlib_change_player_face(GAME* game);
|
||||
extern void mPlib_change_player_cloth_info(mPr_cloth_c* cloth_p, mActor_name_t cloth_item);
|
||||
extern int mPlib_Get_status_for_bee(void);
|
||||
|
||||
extern mPlayer_change_data_from_submenu_c* mPlib_Get_change_data_from_submenu_p();
|
||||
|
||||
|
||||
@@ -185,11 +185,6 @@ typedef struct private_mother_mail_info_s {
|
||||
mPr_mother_mail_data_c data;
|
||||
} mPr_mother_mail_info_c;
|
||||
|
||||
typedef struct private_cloth_s {
|
||||
u16 idx;
|
||||
mActor_name_t item;
|
||||
} mPr_cloth_c;
|
||||
|
||||
struct private_s {
|
||||
/* 0x0000 */ PersonalID_c player_ID; /* player's id info */
|
||||
/* 0x0014 */ s8 gender; /* gender/sex of player */
|
||||
|
||||
@@ -9,6 +9,11 @@ extern "C" {
|
||||
|
||||
typedef struct private_s Private_c;
|
||||
|
||||
typedef struct private_cloth_s {
|
||||
u16 idx;
|
||||
mActor_name_t item;
|
||||
} mPr_cloth_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+6
-6
@@ -114,8 +114,8 @@ static void Player_actor_sound_hachi_sasareru(ACTOR* actor);
|
||||
static void Player_actor_sound_wear(ACTOR* actor);
|
||||
static void Player_actor_sound_dai_ue_kakunou(ACTOR* actor);
|
||||
static void Player_actor_sound_umbrella_rotate(ACTOR* actor);
|
||||
static u16 Player_actor_sound_Get_bgm_num_forCompletePayment();
|
||||
static u16 Player_actor_sound_Get_bgm_num_forDemoGetGoldenItem(int type);
|
||||
static u8 Player_actor_sound_Get_bgm_num_forCompletePayment(void);
|
||||
static u8 Player_actor_sound_Get_bgm_num_forDemoGetGoldenItem(int type);
|
||||
static void Player_actor_sound_camera_move1(void);
|
||||
static void Player_actor_sound_camera_move2();
|
||||
static void Player_actor_sound_karaburi(ACTOR* actor);
|
||||
@@ -327,16 +327,16 @@ static int Player_actor_request_main_rotate_octagon_all(GAME*, ACTOR*, int, int,
|
||||
static int Player_actor_request_main_throw_money_all(GAME*, const xyz_t*, s16, int);
|
||||
static int Player_actor_request_main_pray_all(GAME*, const xyz_t*, s16, int);
|
||||
static int Player_actor_request_main_mail_jump_all(GAME*, const xyz_t*, s16, int);
|
||||
static int Player_actor_request_main_demo_wait_all(GAME*, int, void*, int);
|
||||
static int Player_actor_request_main_demo_wait_all(GAME*, int, u32, int);
|
||||
static int Player_actor_request_main_demo_walk_all(GAME*, f32, f32, f32, int, int);
|
||||
static int Player_actor_request_main_demo_geton_train(GAME*, const xyz_t*, s16, int);
|
||||
static int Player_actor_request_main_demo_getoff_train(GAME*, const xyz_t*, s16, int);
|
||||
static int Player_actor_request_main_demo_standing_train_all(GAME*, int);
|
||||
static int Player_actor_request_main_stung_bee_all(GAME*, int);
|
||||
static int Player_actor_request_main_shock_all(GAME*, f32, s16, s8, int, int);
|
||||
static int Player_actor_request_main_change_cloth_forNPC(GAME*, mActor_name_t, int);
|
||||
static int Player_actor_request_main_push_snowball_all(GAME*, void*, int, int);
|
||||
static int Player_actor_request_main_stung_mosquito_all(GAME*, int, int);
|
||||
static int Player_actor_request_main_change_cloth_forNPC(GAME*, mActor_name_t, u16, int);
|
||||
static int Player_actor_request_main_push_snowball_all(GAME*, u32, int, int);
|
||||
static int Player_actor_request_main_stung_mosquito_all(GAME*, u32, int);
|
||||
static int Player_actor_request_main_switch_on_lighthouse_all(GAME*, const xyz_t*, int, int);
|
||||
static int Player_actor_request_main_demo_geton_boat_all(GAME*, const xyz_t*, s16, int);
|
||||
static int Player_actor_request_main_demo_getoff_boat_standup_all(GAME*, const xyz_t*, s16, int);
|
||||
|
||||
@@ -3572,9 +3572,9 @@ static int Player_actor_CheckAndRequest_main_umbrella_all(GAME* game, int prio)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int Player_actor_CheckAndRequest_main_fan_all(GAME* game, int check_trigger, int param_2, int prio) {
|
||||
static int Player_actor_CheckAndRequest_main_fan_all(GAME* game, int check_trigger, int start_swing, int prio) {
|
||||
if (Player_actor_CheckController_forFan(game, check_trigger) && Player_actor_CheckAbleSpeed_forItem(game)) {
|
||||
return Player_actor_request_main_swing_fan_all(game, param_2, prio);
|
||||
return Player_actor_request_main_swing_fan_all(game, start_swing, prio);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
static int Player_actor_request_main_change_cloth_all(GAME* game, ACTOR* talk_actor_p, int turn_flag,
|
||||
int prev_main_index, mActor_name_t cloth_item, u16 cloth_idx,
|
||||
int try_on_flag, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_CHANGE_CLOTH, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_change_cloth_c* req_change_cloth_p = &player->requested_main_index_data.change_cloth;
|
||||
|
||||
req_change_cloth_p->talk_actor = talk_actor_p;
|
||||
req_change_cloth_p->turn_flag = turn_flag;
|
||||
req_change_cloth_p->prev_main_index = prev_main_index;
|
||||
req_change_cloth_p->cloth_item = cloth_item;
|
||||
req_change_cloth_p->cloth_idx = cloth_idx;
|
||||
req_change_cloth_p->try_on_flag = try_on_flag;
|
||||
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_CHANGE_CLOTH, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int Player_actor_request_main_change_cloth_forNPC(GAME* game, mActor_name_t cloth_item, u16 cloth_idx,
|
||||
int try_on_flag) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
ACTOR* talk_actor_p;
|
||||
int turn_flag;
|
||||
int prev_main_index = player->now_main_index;
|
||||
|
||||
if (prev_main_index == mPlayer_INDEX_TALK) {
|
||||
mPlayer_main_talk_c* talk_p = &player->main_data.talk;
|
||||
|
||||
talk_actor_p = talk_p->talk_actor_p;
|
||||
turn_flag = talk_p->turn_flag;
|
||||
} else {
|
||||
talk_actor_p = NULL;
|
||||
turn_flag = FALSE;
|
||||
}
|
||||
|
||||
return Player_actor_request_main_change_cloth_all(game, talk_actor_p, turn_flag, prev_main_index, cloth_item,
|
||||
cloth_idx, try_on_flag, mPlayer_REQUEST_PRIORITY_19);
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Change_cloth(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
mPlayer_request_change_cloth_c* req_change_cloth_p = &player->requested_main_index_data.change_cloth;
|
||||
mPlayer_main_change_cloth_c* change_cloth_p = &player->main_data.change_cloth;
|
||||
int try_on_flag = req_change_cloth_p->try_on_flag;
|
||||
int anim0_idx = try_on_flag ? mPlayer_ANIM_MENU_CHANGE1 : mPlayer_ANIM_ITAZURA1;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
f32 speed = try_on_flag ? 1.0f : 0.5f;
|
||||
|
||||
change_cloth_p->talk_actor = req_change_cloth_p->talk_actor;
|
||||
change_cloth_p->turn_flag = req_change_cloth_p->turn_flag;
|
||||
change_cloth_p->prev_main_index = req_change_cloth_p->prev_main_index;
|
||||
change_cloth_p->cloth_item = req_change_cloth_p->cloth_item;
|
||||
change_cloth_p->cloth_idx = req_change_cloth_p->cloth_idx;
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, anim0_idx, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, anim0_idx, anim1_idx, 1.0f, 1.0f, speed, -5.0f,
|
||||
cKF_FRAMECONTROL_STOP, part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
|
||||
if (try_on_flag == FALSE) {
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_HALLOWEEN, player->feel_pos, 2, actorx->shape_info.rotation.y, game,
|
||||
RSV_NO, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Change_cloth(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
int anim0_idx = player->animation0_idx;
|
||||
|
||||
if (anim0_idx != mPlayer_ANIM_MENU_CHANGE1) {
|
||||
Player_actor_Movement_Base_Stop(actorx, FALSE);
|
||||
} else {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
Camera2* camera2_p = &play->camera;
|
||||
s_xyz* dir_p = &camera2_p->direction;
|
||||
s16 dir_y = dir_p->y + DEG2SHORT_ANGLE2(180.0f);
|
||||
|
||||
add_calc_short_angle2(&actorx->shape_info.rotation.y, dir_y, 1.0f - sqrtf(0.5f), 2500, 50);
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
Player_actor_Movement_Base_Stop(actorx, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Change_cloth(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_SetEffect_Change_cloth(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
int anim0_idx = player->animation0_idx;
|
||||
|
||||
if (anim0_idx == mPlayer_ANIM_MENU_CHANGE1) {
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 16.0f)) {
|
||||
Player_actor_sound_wear(actorx);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_KIGAE, player->feel_pos, 2, actorx->shape_info.rotation.y, game,
|
||||
RSV_NO, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_SetTexPallet_Change_cloth(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
int anim0_idx = player->animation0_idx;
|
||||
int menu_flag = anim0_idx == mPlayer_ANIM_MENU_CHANGE1;
|
||||
f32 frame = menu_flag ? 18.0f : 36.0f;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, frame)) {
|
||||
mPlayer_main_change_cloth_c* change_cloth_p = &player->main_data.change_cloth;
|
||||
mActor_name_t cloth_item = change_cloth_p->cloth_item;
|
||||
u16 cloth_idx = change_cloth_p->cloth_idx;
|
||||
|
||||
if (menu_flag == FALSE) {
|
||||
mPlib_change_player_cloth_info(&Now_Private->cloth, cloth_item);
|
||||
mPr_SetItemCollectBit(cloth_item);
|
||||
}
|
||||
|
||||
mPlib_change_player_cloth(game, cloth_idx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Change_cloth(ACTOR* actorx, GAME* game, f32 frame) {
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
|
||||
Player_actor_SetEffect_Change_cloth(actorx, game);
|
||||
Player_actor_SetTexPallet_Change_cloth(actorx, game);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_set_eye_pattern_Change_cloth(ACTOR* actorx) {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Change_cloth(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromChange_cloth(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_change_cloth_c* change_cloth_p = &player->main_data.change_cloth;
|
||||
int prev_main_index = change_cloth_p->prev_main_index;
|
||||
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
if (prev_main_index != mPlayer_INDEX_TALK) {
|
||||
Player_actor_request_main_demo_wait_all(game, FALSE, 0, mPlayer_REQUEST_PRIORITY_19);
|
||||
} else {
|
||||
Player_actor_request_main_talk_all(game, change_cloth_p->talk_actor, change_cloth_p->turn_flag, -12.0f,
|
||||
FALSE, mPlayer_REQUEST_PRIORITY_19);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Change_cloth(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Change_cloth(actorx, game);
|
||||
end_flag = Player_actor_CulcAnimation_Change_cloth(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_SearchAnimation_Change_cloth(actorx, game, last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_Change_cloth(actorx);
|
||||
Player_actor_ObjCheck_Change_cloth(actorx, game);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromChange_cloth(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
static int Player_actor_request_main_complete_payment_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_COMPLETE_PAYMENT, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_COMPLETE_PAYMENT, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Complete_payment(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_complete_payment_c* complete_payment_p = &player->main_data.complete_payment;
|
||||
u8 bgm_num;
|
||||
|
||||
complete_payment_p->timer = 0.0f;
|
||||
complete_payment_p->msg_mode = 0;
|
||||
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_YATTA1, mPlayer_ANIM_YATTA1, 1.0f, 1.0f, 0.5f, 0.0f,
|
||||
cKF_FRAMECONTROL_STOP, mPlayer_PART_TABLE_NORMAL);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
bgm_num = Player_actor_sound_Get_bgm_num_forCompletePayment();
|
||||
mBGMPsComp_make_ps_fanfare(bgm_num, 0x168);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Complete_payment(ACTOR* actorx, GAME* game) {
|
||||
u8 bgm_num;
|
||||
|
||||
bgm_num = Player_actor_sound_Get_bgm_num_forCompletePayment();
|
||||
mBGMPsComp_delete_ps_fanfare(bgm_num, 0x168);
|
||||
Common_Set(complete_payment_type, mPlayer_COMPLETE_PAYMENT_TYPE_NONE);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Complete_payment(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Complete_payment(ACTOR* actorx) {
|
||||
add_calc_short_angle2(&actorx->shape_info.rotation.y, 0, 1.0f - sqrtf(0.5f), 2500, 50);
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
|
||||
}
|
||||
|
||||
static void Player_actor_set_eye_pattern_Complete_payment(ACTOR* actorx, int end_flag) {
|
||||
if (end_flag) {
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
} else {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Complete_payment(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Complete_payment(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type2(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Complete_payment_demo_ct(ACTOR* actorx) {
|
||||
rgba_t window_color;
|
||||
mMsg_Window_c* msg_p = mMsg_Get_base_window_p();
|
||||
int msg_no;
|
||||
|
||||
switch (Common_Get(complete_payment_type)) {
|
||||
case mPlayer_COMPLETE_PAYMENT_TYPE_ARBEIT:
|
||||
msg_no = 0x17B6;
|
||||
break;
|
||||
default:
|
||||
msg_no = 0x17B7;
|
||||
break;
|
||||
}
|
||||
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_ITEM);
|
||||
mDemo_Set_ListenAble();
|
||||
mMsg_Set_LockContinue(msg_p);
|
||||
|
||||
window_color.r = 185;
|
||||
window_color.g = 245;
|
||||
window_color.b = 80;
|
||||
window_color.a = 255;
|
||||
mDemo_Set_talk_window_color(&window_color);
|
||||
mChoice_CLEAR_CHOSENUM();
|
||||
}
|
||||
|
||||
static int Player_actor_MessageControl_Complete_payment(ACTOR* actorx, int end_flag) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_complete_payment_c* complete_payment_p = &player->main_data.complete_payment;
|
||||
f32* timer_p = &complete_payment_p->timer;
|
||||
int* msg_mode_p = &complete_payment_p->msg_mode;
|
||||
mMsg_Window_c* msg_p = mMsg_Get_base_window_p();
|
||||
|
||||
if (*timer_p < 42.0f) {
|
||||
(*timer_p) += 1.0f;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (*msg_mode_p) {
|
||||
case 0: {
|
||||
if (mDemo_Check(mDemo_TYPE_REPORT, actorx) == FALSE) {
|
||||
mDemo_Request(mDemo_TYPE_REPORT, actorx, &Player_actor_Complete_payment_demo_ct);
|
||||
} else {
|
||||
*msg_mode_p = 1;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case 1: {
|
||||
if (end_flag) {
|
||||
mMsg_Unset_LockContinue(msg_p);
|
||||
*msg_mode_p = 2;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case 2: {
|
||||
if (mDemo_Check(mDemo_TYPE_REPORT, actorx) == FALSE) {
|
||||
*msg_mode_p = 3;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
default: {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromComplete_payment(GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
Player_actor_request_main_return_outdoor_all(game, mPlayer_INDEX_WAIT, 3.0f, -5.0f,
|
||||
mPlayer_REQUEST_PRIORITY_45);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Complete_payment(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int anim_end_flag;
|
||||
int msg_end_flag;
|
||||
|
||||
anim_end_flag = Player_actor_CulcAnimation_Complete_payment(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_Movement_Complete_payment(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_Complete_payment(actorx, anim_end_flag);
|
||||
Player_actor_ObjCheck_Complete_payment(actorx, game);
|
||||
Player_actor_BGcheck_Complete_payment(actorx);
|
||||
msg_end_flag = Player_actor_MessageControl_Complete_payment(actorx, anim_end_flag);
|
||||
Player_actor_request_proc_index_fromComplete_payment(game, msg_end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
static int Player_actor_request_main_demo_geton_boat_all(GAME* game, const xyz_t* pos_p, s16 angle_y, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_DEMO_GETON_BOAT, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_demo_geton_boat_c* req_demo_geton_boat_p = &player->requested_main_index_data.demo_geton_boat;
|
||||
|
||||
req_demo_geton_boat_p->pos = *pos_p;
|
||||
req_demo_geton_boat_p->angle_y = angle_y;
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_DEMO_GETON_BOAT, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Demo_geton_boat(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
mPlayer_request_demo_geton_boat_c* req_demo_geton_boat_p = &player->requested_main_index_data.demo_geton_boat;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_RIDE1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
actorx->world.angle.y = req_demo_geton_boat_p->angle_y;
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(kf0_p, 0.0f, 1000.0f, 0.0f, 0, 0, DEG2SHORT_ANGLE2(90.0f));
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actorx->world.position, &req_demo_geton_boat_p->pos,
|
||||
actorx->shape_info.rotation.y, req_demo_geton_boat_p->angle_y, 5.0f, kf0_p,
|
||||
cKF_ANIMATION_TRANS_XZ | cKF_ANIMATION_TRANS_Y | cKF_ANIMATION_ROT_Y);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_RIDE1, anim1_idx, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
cKF_FRAMECONTROL_STOP, part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
Player_actor_setup_main_Demo_geton_boat_other_func2(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Demo_geton_boat(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
|
||||
cKF_SkeletonInfo_R_AnimationMove_dt(kf0_p);
|
||||
actorx->shape_info.rotation.y += DEG2SHORT_ANGLE2(-90.0f);
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
Player_actor_Reset_bee_chase(actorx);
|
||||
actorx->shape_info.shadow_size_change_rate = 0.0f;
|
||||
actorx->shape_info.shadow_alpha_change_rate = 0.0f;
|
||||
Player_actor_sound_LANDING(actorx);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Demo_geton_boat(ACTOR* actorx, f32* last_anim0_cur_frame_p) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame_p);
|
||||
}
|
||||
|
||||
static void Player_actor_SetSound_Demo_geton_boat(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 15.0f)) {
|
||||
Player_actor_sound_JUMP(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ControlShadow_Demo_geton_boat(ACTOR* actorx) {
|
||||
Player_actor_DisappearShadow_fromAnimationFrame(actorx, 10.0f, 19.0f);
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Demo_geton_boat(ACTOR* actorx, f32 frame) {
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
|
||||
Player_actor_SetSound_Demo_geton_boat(actorx);
|
||||
}
|
||||
|
||||
Player_actor_ControlShadow_Demo_geton_boat(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Demo_geton_boat(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
|
||||
cKF_SkeletonInfo_R_AnimationMove_base(&actorx->world.position, &actorx->shape_info.rotation.y, &actorx->scale,
|
||||
actorx->world.angle.y, kf0_p);
|
||||
Player_actor_Movement_Base_Stop(actorx, FALSE);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Demo_geton_boat(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromDemo_geton_boat(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_request_main_demo_geton_boat_sitdown_all(game, mPlayer_REQUEST_PRIORITY_19);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Demo_geton_boat(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
end_flag = Player_actor_CulcAnimation_Demo_geton_boat(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_SearchAnimation_Demo_geton_boat(actorx, last_anim0_cur_frame);
|
||||
Player_actor_Movement_Demo_geton_boat(actorx);
|
||||
Player_actor_Reset_force_position_angle(actorx);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
Player_actor_ObjCheck_Demo_geton_boat(actorx, game);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromDemo_geton_boat(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ static void Player_actor_request_proc_index_fromDma(ACTOR* actorx, GAME* game) {
|
||||
exchange->banks[bank_idx + 3].bank_id > 0 && exchange->banks[bank_idx + 4].bank_id > 0 &&
|
||||
exchange->banks[bank_idx + 5].bank_id > 0 && exchange->banks[bank_idx + 6].bank_id > 0) {
|
||||
Player_actor_ItemBank_ct(actor, play);
|
||||
if (actor->requested_main_index_priority == mPlayer_INDEX_SLIP_NET) {
|
||||
if (actor->requested_main_index_priority == mPlayer_REQUEST_PRIORITY_41) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actor);
|
||||
}
|
||||
keyf = &actor->keyframe0;
|
||||
@@ -45,10 +45,10 @@ static void Player_actor_request_proc_index_fromDma(ACTOR* actorx, GAME* game) {
|
||||
} else if ((type & 7) == 5) {
|
||||
mPlib_request_main_groundhog_type1(game);
|
||||
} else {
|
||||
if (Common_Get(_02883D) == 1) {
|
||||
Player_actor_request_main_fail_emu(play, mPlayer_INDEX_READY_WALK_NET);
|
||||
if (Common_Get(fail_emu_flag) == TRUE) {
|
||||
Player_actor_request_main_fail_emu(play, mPlayer_REQUEST_PRIORITY_43);
|
||||
} else {
|
||||
Player_actor_request_main_intro_all(play, mPlayer_INDEX_READY_WALK_NET);
|
||||
Player_actor_request_main_intro_all(play, mPlayer_REQUEST_PRIORITY_43);
|
||||
}
|
||||
}
|
||||
Camera2_request_main_normal(play, 1, 1);
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
static int Player_actor_request_main_fail_emu_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_FAIL_EMU, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_FAIL_EMU, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Fail_emu(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_fail_emu_c* fail_emu_p = &player->main_data.fail_emu;
|
||||
|
||||
fail_emu_p->timer = 0.0f;
|
||||
fail_emu_p->msg_mode = 0;
|
||||
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_WAIT1, mPlayer_ANIM_WAIT1, 1.0f, 1.0f, 0.5f, 0.0f,
|
||||
cKF_FRAMECONTROL_REPEAT, mPlayer_PART_TABLE_NORMAL);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Fail_emu(ACTOR* actorx, GAME* game) {
|
||||
Common_Set(fail_emu_flag, FALSE);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Fail_emu(ACTOR* actorx) {
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Fail_emu(ACTOR* actorx) {
|
||||
f32 dummy;
|
||||
|
||||
return Player_actor_CulcAnimation_Base2(actorx, &dummy);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Fail_emu(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Fail_emu(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Fail_emu_demo_ct(ACTOR* actorx) {
|
||||
rgba_t window_color;
|
||||
|
||||
mDemo_Set_msg_num(0x2B6A);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_ListenAble();
|
||||
|
||||
window_color.r = 255;
|
||||
window_color.g = 255;
|
||||
window_color.b = 20;
|
||||
window_color.a = 255;
|
||||
mDemo_Set_talk_window_color(&window_color);
|
||||
mChoice_CLEAR_CHOSENUM();
|
||||
}
|
||||
|
||||
static int Player_actor_MessageControl_Fail_emu(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_fail_emu_c* fail_emu_p = &player->main_data.fail_emu;
|
||||
f32* timer_p = &fail_emu_p->timer;
|
||||
int* msg_mode_p = &fail_emu_p->msg_mode;
|
||||
|
||||
if (*timer_p < 42.0f) {
|
||||
(*timer_p) += 1.0f;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (*msg_mode_p) {
|
||||
case 0: {
|
||||
if (mDemo_Check(mDemo_TYPE_REPORT, actorx) == FALSE) {
|
||||
mDemo_Request(mDemo_TYPE_REPORT, actorx, &Player_actor_Fail_emu_demo_ct);
|
||||
} else {
|
||||
*msg_mode_p = 1;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case 1: {
|
||||
if (mDemo_Check(mDemo_TYPE_REPORT, actorx) == FALSE) {
|
||||
*msg_mode_p = 2;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
default: {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromFail_emu(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_request_main_wait_all(game, -5.0f, 0.0f, 0, mPlayer_REQUEST_PRIORITY_1);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Fail_emu(ACTOR* actorx, GAME* game) {
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Fail_emu(actorx);
|
||||
Player_actor_CulcAnimation_Fail_emu(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
Player_actor_ObjCheck_Fail_emu(actorx, game);
|
||||
Player_actor_BGcheck_Fail_emu(actorx);
|
||||
end_flag = Player_actor_MessageControl_Fail_emu(actorx);
|
||||
Player_actor_request_proc_index_fromFail_emu(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
static int Player_actor_request_main_knock_door(GAME* game, const xyz_t* pos_p, s16 angle_y, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_KNOCK_DOOR, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_knock_door_c* req_knock_door_p = &player->requested_main_index_data.knock_door;
|
||||
|
||||
req_knock_door_p->request_main_index = player->requested_main_index;
|
||||
req_knock_door_p->pos = *pos_p;
|
||||
req_knock_door_p->angle_y = angle_y;
|
||||
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_KNOCK_DOOR, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Knock_door(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
mPlayer_request_knock_door_c* req_knock_door_p = &player->requested_main_index_data.knock_door;
|
||||
mPlayer_main_knock_door_c* knock_door_p = &player->main_data.knock_door;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
knock_door_p->request_data = *req_knock_door_p;
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_KNOCK1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(kf0_p, 0.0f, 1000.0f, 0.0f, 0, 0, DEG2SHORT_ANGLE2(90.0f));
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actorx->world.position, &req_knock_door_p->pos,
|
||||
actorx->shape_info.rotation.y, req_knock_door_p->angle_y, 5.0f, kf0_p,
|
||||
cKF_ANIMATION_ROT_Y | cKF_ANIMATION_TRANS_XZ);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_KNOCK1, anim1_idx, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
cKF_FRAMECONTROL_STOP, part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Knock_door(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
|
||||
cKF_SkeletonInfo_R_AnimationMove_dt(kf0_p);
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Knock_door(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Knock_door(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
|
||||
cKF_SkeletonInfo_R_AnimationMove_base(&actorx->world.position, &actorx->shape_info.rotation.y, &actorx->scale,
|
||||
actorx->world.angle.y, kf0_p);
|
||||
Player_actor_Movement_Base_Stop(actorx, FALSE);
|
||||
}
|
||||
|
||||
static void Player_actor_SetSound_Knock_door(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 13.0f) || Player_actor_Check_AnimationFrame(fc0_p, 20.0f)) {
|
||||
Player_actor_sound_knock(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Knock_door(ACTOR* actorx, f32 frame) {
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
|
||||
Player_actor_SetSound_Knock_door(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Knock_door(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Knock_door(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromKnock_door(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_knock_door_c* knock_door_p = &player->main_data.knock_door;
|
||||
bcopy(&knock_door_p->request_data.request_data, &player->requested_main_index_data,
|
||||
sizeof(knock_door_p->request_data.request_data));
|
||||
Player_actor_request_main_index(game, knock_door_p->request_data.request_main_index,
|
||||
mPlayer_REQUEST_PRIORITY_39);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Knock_door(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
end_flag = Player_actor_CulcAnimation_Knock_door(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_Movement_Knock_door(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_SearchAnimation_Knock_door(actorx, last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
Player_actor_ObjCheck_Knock_door(actorx, game);
|
||||
Player_actor_BGcheck_Knock_door(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromKnock_door(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
static int Player_actor_request_main_notice_mosquito(GAME* game, u32 label, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_NOTICE_MOSQUITO, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_notice_mosquito_c* req_notice_mosquito_p = &player->requested_main_index_data.notice_mosquito;
|
||||
|
||||
req_notice_mosquito_p->label = label;
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_NOTICE_MOSQUITO, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Notice_mosquito(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_request_notice_mosquito_c* req_notice_mosquito_p = &player->requested_main_index_data.notice_mosquito;
|
||||
mPlayer_main_notice_mosquito_c* notice_mosquito_p = &player->main_data.notice_mosquito;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
notice_mosquito_p->label = req_notice_mosquito_p->label;
|
||||
notice_mosquito_p->timer = 0.0f;
|
||||
notice_mosquito_p->msg_mode = 0;
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_MOSQUITO2, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base1(actorx, game, mPlayer_ANIM_MOSQUITO2, anim1_idx, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
mPlayer_PART_TABLE_PICK_UP);
|
||||
Player_actor_set_eye_pattern(actorx, 4);
|
||||
Player_actor_set_mouth_pattern(actorx, 4);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Notice_mosquito(ACTOR* actorx, GAME* game) {
|
||||
mBGMPsComp_delete_ps_demo(BGM_BEE_STUNG, 0x168);
|
||||
|
||||
if (Save_Get(scene_no) == SCENE_MUSEUM_ROOM_INSECT) {
|
||||
mBGMPsComp_museum_status(4);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Notice_mosquito(ACTOR* actorx) {
|
||||
add_calc_short_angle2(&actorx->shape_info.rotation.y, 0, 1.0f - sqrtf(0.5f), 2500, 50);
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Notice_mosquito(ACTOR* actorx) {
|
||||
f32 dummy;
|
||||
|
||||
return Player_actor_CulcAnimation_Base2(actorx, &dummy);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Notice_mosquito(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Notice_mosquito(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Notice_mosquito_demo_ct(ACTOR* actorx) {
|
||||
rgba_t window_color;
|
||||
|
||||
mDemo_Set_msg_num(0x3063);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_ITEM);
|
||||
mDemo_Set_ListenAble();
|
||||
window_color.r = 225;
|
||||
window_color.g = 165;
|
||||
window_color.b = 255;
|
||||
window_color.a = 255;
|
||||
mDemo_Set_talk_window_color(&window_color);
|
||||
mBGMPsComp_make_ps_demo(BGM_BEE_STUNG, 0x168);
|
||||
|
||||
if (Save_Get(scene_no) == SCENE_MUSEUM_ROOM_INSECT) {
|
||||
mBGMPsComp_museum_status(0);
|
||||
}
|
||||
}
|
||||
|
||||
static int Player_actor_MessageControl_Notice_mosquito(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_notice_mosquito_c* notice_mosquito_p = &player->main_data.notice_mosquito;
|
||||
int* msg_mode_p = ¬ice_mosquito_p->msg_mode;
|
||||
|
||||
switch (*msg_mode_p) {
|
||||
case 0: {
|
||||
f32* timer_p = ¬ice_mosquito_p->timer;
|
||||
|
||||
if (*timer_p < 0.0f) {
|
||||
(*timer_p) += 1.0f;
|
||||
} else {
|
||||
*msg_mode_p = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 1: {
|
||||
if (mDemo_Check(mDemo_TYPE_REPORT, actorx) == FALSE) {
|
||||
mDemo_Request(mDemo_TYPE_REPORT, actorx, &Player_actor_Notice_mosquito_demo_ct);
|
||||
} else {
|
||||
*msg_mode_p = 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 2: {
|
||||
if (mDemo_Check(mDemo_TYPE_REPORT, actorx) == FALSE) {
|
||||
*msg_mode_p = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromNotice_mosquito(ACTOR* actorx, GAME* game, int msg_end_flag) {
|
||||
if (msg_end_flag) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_request_main_wait_all(game, -5.0f, 0.0f, 0, mPlayer_REQUEST_PRIORITY_1);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Notice_mosquito(ACTOR* actorx, GAME* game) {
|
||||
int msg_end_flag;
|
||||
|
||||
Player_actor_Movement_Notice_mosquito(actorx);
|
||||
Player_actor_CulcAnimation_Notice_mosquito(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_ObjCheck_Notice_mosquito(actorx, game);
|
||||
Player_actor_BGcheck_Notice_mosquito(actorx);
|
||||
msg_end_flag = Player_actor_MessageControl_Notice_mosquito(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromNotice_mosquito(actorx, game, msg_end_flag);
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ static void Player_actor_request_proc_index_fromOutdoor(GAME* game, int arg1) {
|
||||
if (Common_Get(complete_payment_type) != 0) {
|
||||
Player_actor_request_main_complete_payment(game, mPlayer_REQUEST_PRIORITY_44);
|
||||
} else {
|
||||
Player_actor_request_main_return_outdoor_all(game, mPlayer_INDEX_WAIT, mPlayer_REQUEST_PRIORITY_45, 3.0f,
|
||||
0.0f);
|
||||
Player_actor_request_main_return_outdoor_all(game, mPlayer_INDEX_WAIT, 3.0f, 0.0f,
|
||||
mPlayer_REQUEST_PRIORITY_45);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
static int Player_actor_request_main_push_snowball_all(GAME* game, u32 label, int wade_flag, int prio) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_push_snowball_c* req_push_snowball_p = &player->requested_main_index_data.push_snowball;
|
||||
int main_index = player->now_main_index;
|
||||
|
||||
if (main_index == mPlayer_INDEX_PUSH_SNOWBALL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (main_index == mPlayer_INDEX_WADE_SNOWBALL) {
|
||||
mPlayer_main_wade_snowball_c* wade_snowball_p = &player->main_data.wade_snowball;
|
||||
|
||||
/* When wading between acres, check the snowball label is the same as the one pushed */
|
||||
if (wade_snowball_p->snowball_label != label) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_PUSH_SNOWBALL, prio)) {
|
||||
req_push_snowball_p->label = label;
|
||||
req_push_snowball_p->wade_flag = wade_flag;
|
||||
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_PUSH_SNOWBALL, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Push_snowball(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_request_push_snowball_c* req_push_snowball_p = &player->requested_main_index_data.push_snowball;
|
||||
mPlayer_main_push_snowball_c* push_snowball_p = &player->main_data.push_snowball;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
push_snowball_p->label = req_push_snowball_p->label;
|
||||
|
||||
if (req_push_snowball_p->wade_flag == FALSE) {
|
||||
player->crash_snowball_for_wade = FALSE;
|
||||
}
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_PUSH_YUKI1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
|
||||
if (anim1_idx != mPlayer_ANIM_PUSH_YUKI1) {
|
||||
part_table_idx = mPlayer_PART_TABLE_NET;
|
||||
}
|
||||
|
||||
Player_actor_InitAnimation_Base1(actorx, game, mPlayer_ANIM_PUSH_YUKI1, anim1_idx, 0.0f, 0.0f, 0.5f, -5.0f,
|
||||
part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Push_snowball(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_SetEffect_Push_snowball(ACTOR* actorx, GAME* game, f32 l_target_frame, f32 r_target_frame) {
|
||||
Player_actor_SetEffect_Run(actorx, game, l_target_frame, r_target_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Push_snowball(ACTOR* actorx, GAME* game, f32 frame) {
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
|
||||
Player_actor_Set_FootMark_Base1(actorx, game, FALSE, FALSE);
|
||||
Player_actor_SetEffect_Push_snowball(actorx, game, 1.0f, 9.0f);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromPush_snowball(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
|
||||
if (player->crash_snowball_for_wade) {
|
||||
/* The snowball 'crashed' while wading, so revert to wait state */
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_request_main_wait_all(game, -5.0f, 0.0f, 0, mPlayer_REQUEST_PRIORITY_1);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Push_snowball(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_CulcAnimation_Push_snowball(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_SearchAnimation_Push_snowball(actorx, game, last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromPush_snowball(actorx, game);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static int Player_actor_request_main_return_outdoor_all(GAME* game, int prev_index, int priority, f32 time, f32 arg5) {
|
||||
static int Player_actor_request_main_return_outdoor_all(GAME* game, int prev_index, f32 time, f32 arg5, int priority) {
|
||||
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_RETURN_OUTDOOR, priority)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
static int Player_actor_request_main_rotate_umbrella_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_ROTATE_UMBRELLA, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_ROTATE_UMBRELLA, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Rotate_umbrella(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_UMB_ROT1, mPlayer_ANIM_UMB_ROT1, 1.0f, 1.0f, 1.0f,
|
||||
-5.0f, cKF_FRAMECONTROL_STOP, mPlayer_PART_TABLE_NORMAL);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_KASAMIZU, actorx->world.position, 2, actorx->shape_info.rotation.y, game,
|
||||
RSV_NO, 0, 0);
|
||||
Player_actor_sound_umbrella_rotate(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Rotate_umbrella(ACTOR* actorx) {
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Rotate_umbrella(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Rotate_umbrella(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Rotate_umbrella(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromRotate_umbrella(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_request_main_wait_all(game, -5.0f, 0.0f, 0, mPlayer_REQUEST_PRIORITY_1);
|
||||
} else {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 19.5f)) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_Set_status_for_bee(actorx, TRUE);
|
||||
} else {
|
||||
if (fc0_p->current_frame >= 20.0f &&
|
||||
Player_actor_CheckAndRequest_main_umbrella_all(game, mPlayer_REQUEST_PRIORITY_4) == FALSE) {
|
||||
if (Player_actor_GetController_move_percentX() || Player_actor_GetController_move_percentY()) {
|
||||
Player_actor_request_main_walk_all(game, NULL, -5.0f, 0, mPlayer_REQUEST_PRIORITY_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Rotate_umbrella(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Rotate_umbrella(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
end_flag = Player_actor_CulcAnimation_Rotate_umbrella(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
Player_actor_ObjCheck_Rotate_umbrella(actorx, game);
|
||||
Player_actor_BGcheck_Rotate_umbrella(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromRotate_umbrella(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
static int Player_actor_request_main_stung_mosquito_all(GAME* game, u32 label, int prio) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
int main_index = player->now_main_index;
|
||||
|
||||
if (mEv_CheckTitleDemo() > 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (Common_Get(clip).demo_clip != NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (main_index == mPlayer_INDEX_RELAX_ROD) {
|
||||
mPlayer_main_relax_rod_c* relax_rod_p = &player->main_data.relax_rod;
|
||||
|
||||
relax_rod_p->mosquito_flag = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (Player_actor_Check_is_demo_mode(main_index)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mPlib_Get_status_for_bee() != TRUE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_STUNG_MOSQUITO, prio)) {
|
||||
mPlayer_request_stung_mosquito_c* req_stung_mosquito_p = &player->requested_main_index_data.stung_mosquito;
|
||||
|
||||
req_stung_mosquito_p->label = label;
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_STUNG_MOSQUITO, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Stung_mosquito(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_request_stung_mosquito_c* req_stung_mosquito_p = &player->requested_main_index_data.stung_mosquito;
|
||||
mPlayer_main_stung_mosquito_c* stung_mosquito_p = &player->main_data.stung_mosquito;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
stung_mosquito_p->label = req_stung_mosquito_p->label;
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_MOSQUITO1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_MOSQUITO1, anim1_idx, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
cKF_FRAMECONTROL_STOP, mPlayer_PART_TABLE_PICK_UP);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Stung_mosquito(ACTOR* actorx) {
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Stung_mosquito(ACTOR* actorx) {
|
||||
f32 dummy;
|
||||
|
||||
return Player_actor_CulcAnimation_Base2(actorx, &dummy);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Stung_mosquito(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Stung_mosquito(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromStung_mosquito(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
if (end_flag) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_stung_mosquito_c* stung_mosquito_p = &player->main_data.stung_mosquito;
|
||||
|
||||
Player_actor_request_main_notice_mosquito(game, stung_mosquito_p->label, mPlayer_REQUEST_PRIORITY_26);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Stung_mosquito(ACTOR* actorx, GAME* game) {
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Stung_mosquito(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
end_flag = Player_actor_CulcAnimation_Stung_mosquito(actorx);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
Player_actor_ObjCheck_Stung_mosquito(actorx, game);
|
||||
Player_actor_BGcheck_Stung_mosquito(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromStung_mosquito(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
static int Player_actor_request_main_swing_fan_all(GAME* game, int start_swing, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_SWING_FAN, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_swing_fan_c* req_swing_fan_p = &player->requested_main_index_data.swing_fan;
|
||||
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_SWING_FAN, prio);
|
||||
req_swing_fan_p->start_swing = start_swing;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Swing_fan(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf1_p = &player->keyframe1;
|
||||
mPlayer_request_swing_fan_c* req_swing_fan_p = &player->requested_main_index_data.swing_fan;
|
||||
f32 frame;
|
||||
f32 morph_counter;
|
||||
|
||||
if (req_swing_fan_p->start_swing) {
|
||||
frame = 1.0f;
|
||||
morph_counter = -5.0f;
|
||||
} else {
|
||||
frame = kf1_p->frame_control.current_frame;
|
||||
morph_counter = 0.0f;
|
||||
}
|
||||
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_UTIWA_D1, mPlayer_ANIM_WAIT1, 1.0f, frame, 0.5f,
|
||||
morph_counter, cKF_FRAMECONTROL_REPEAT, mPlayer_PART_TABLE_FAN);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
Player_actor_set_eye_pattern(actorx, 5);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Swing_fan(ACTOR* actorx) {
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Swing_fan(ACTOR* actorx, f32* last_anim0_cur_frame_p) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame_p);
|
||||
}
|
||||
|
||||
static void Player_actor_SetSound_Swing_fan(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 1.5f)) {
|
||||
Player_actor_sound_uchiwa(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Swing_fan(ACTOR* actorx, f32 frame) {
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
|
||||
Player_actor_SetSound_Swing_fan(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Swing_fan(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGCheck_Swing_fan(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromSwing_fan(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 7.5f)) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_Set_status_for_bee(actorx, TRUE);
|
||||
} else {
|
||||
f32 cur_frame = fc0_p->current_frame;
|
||||
|
||||
if (cur_frame >= 8.0f &&
|
||||
Player_actor_CheckAndRequest_main_fan_all(game, FALSE, FALSE, mPlayer_REQUEST_PRIORITY_4) == FALSE) {
|
||||
if (Player_actor_GetController_move_percentX() || Player_actor_GetController_move_percentY()) {
|
||||
Player_actor_request_main_walk_all(game, NULL, -5.0f, 0, mPlayer_REQUEST_PRIORITY_1);
|
||||
}
|
||||
|
||||
if (cur_frame >= fc0_p->end_frame - 0.5f) {
|
||||
f32 delay_frames = player->keyframe1.frame_control.current_frame;
|
||||
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_request_main_wait_all(game, -5.0f, delay_frames, 2, mPlayer_REQUEST_PRIORITY_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Swing_fan(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
|
||||
Player_actor_Movement_Swing_fan(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_CulcAnimation_Swing_fan(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_SearchAnimation_Swing_fan(actorx, last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_ObjCheck_Swing_fan(actorx, game);
|
||||
Player_actor_BGcheck_Swing_fan(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromSwing_fan(actorx, game);
|
||||
}
|
||||
|
||||
@@ -258,16 +258,16 @@ static void Player_actor_sound_umbrella_rotate(ACTOR* actor) {
|
||||
Player_actor_set_sound_common2(actor, NA_SE_UMBRELLA_ROTATE);
|
||||
}
|
||||
|
||||
static u16 Player_actor_sound_Get_bgm_num_forCompletePayment() {
|
||||
static u8 Player_actor_sound_Get_bgm_num_forCompletePayment(void) {
|
||||
switch (Common_Get(complete_payment_type)) {
|
||||
case 1:
|
||||
case mPlayer_COMPLETE_PAYMENT_TYPE_ARBEIT:
|
||||
return NA_SE_MONEY0;
|
||||
default:
|
||||
return NA_SE_MONEY1;
|
||||
}
|
||||
}
|
||||
|
||||
static u16 Player_actor_sound_Get_bgm_num_forDemoGetGoldenItem(int type) {
|
||||
static u8 Player_actor_sound_Get_bgm_num_forDemoGetGoldenItem(int type) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
return NA_SE_MONEY0;
|
||||
|
||||
+12
-8
@@ -2376,25 +2376,27 @@ extern void mSP_SelectRandomItemToAGB() {
|
||||
xyz_t* wpos_p;
|
||||
mActor_name_t* start_p;
|
||||
mActor_name_t* item_p;
|
||||
f32 x_pos;
|
||||
Save_t* save;
|
||||
xyz_t tpos;
|
||||
|
||||
xyz_t wpos = { 0.0f, 0.0f, 0.0f };
|
||||
int bx = 0;
|
||||
int bz = 0;
|
||||
|
||||
mFI_BlockKind2BkNum(&bx, &bz, mRF_BLOCKKIND_ISLAND_LEFT);
|
||||
save = &Common_Get(save.save);
|
||||
|
||||
/* convert all unit island items to valid items */
|
||||
for (i = 0; i < mISL_FG_BLOCK_X_NUM; i++) {
|
||||
item_p = &Save_Get(island).fgblock[0][i].items[0][0];
|
||||
item_p = &save->island.fgblock[0][i].items[0][0];
|
||||
|
||||
mFI_BkNum2WposXZ(&wpos.x, &wpos.z, bx + i, bz);
|
||||
wpos.x += mFI_UT_WORLDSIZE_HALF_X_F;
|
||||
wpos.z += mFI_UT_WORLDSIZE_HALF_Z_F;
|
||||
x_pos = wpos.x;
|
||||
tpos.x = wpos.x;
|
||||
|
||||
for (ut_z = 0; ut_z < UT_Z_NUM; ut_z++) {
|
||||
wpos.x = x_pos;
|
||||
wpos.x = tpos.x;
|
||||
|
||||
for (ut_x = 0; ut_x < UT_X_NUM; ut_x++) {
|
||||
// this matches instructions but out of order and wrong registers
|
||||
@@ -2408,9 +2410,10 @@ extern void mSP_SelectRandomItemToAGB() {
|
||||
}
|
||||
|
||||
/* add correctly placed signboard actor */
|
||||
save = Common_GetPointer(save.save);
|
||||
for (i = 0; i < mISL_FG_BLOCK_X_NUM; i++) {
|
||||
start_p = &Save_Get(island).fgblock[0][i].items[0][0];
|
||||
item_p = &Save_Get(island).fgblock[0][i].items[0][0];
|
||||
start_p = &save->island.fgblock[0][i].items[0][0];
|
||||
item_p = &save->island.fgblock[0][i].items[0][0];
|
||||
|
||||
for (ut_z = 0; ut_z < UT_Z_NUM; ut_z++) {
|
||||
for (ut_x = 0; ut_x < UT_X_NUM; ut_x++) {
|
||||
@@ -2424,9 +2427,10 @@ extern void mSP_SelectRandomItemToAGB() {
|
||||
}
|
||||
|
||||
/* remove incorrectly placed signboard actors */
|
||||
save = Common_GetPointer(save.save);
|
||||
for (i = 0; i < mISL_FG_BLOCK_X_NUM; i++) {
|
||||
start_p = &Save_Get(island).fgblock[0][i].items[0][0];
|
||||
item_p = &Save_Get(island).fgblock[0][i].items[0][0];
|
||||
start_p = &save->island.fgblock[0][i].items[0][0];
|
||||
item_p = &save->island.fgblock[0][i].items[0][0];
|
||||
|
||||
for (ut_z = 0; ut_z < UT_Z_NUM; ut_z++) {
|
||||
for (ut_x = 0; ut_x < UT_X_NUM; ut_x++) {
|
||||
|
||||
Reference in New Issue
Block a user