mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-03 18:06:05 -04:00
85 lines
3.5 KiB
Plaintext
85 lines
3.5 KiB
Plaintext
static int Player_actor_request_main_fall_pitfall_all(GAME* game, int prio) {
|
|
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_FALL_PITFALL, prio)) {
|
|
Player_actor_request_main_index(game, mPlayer_INDEX_FALL_PITFALL, prio);
|
|
return TRUE;
|
|
}
|
|
|
|
return FALSE;
|
|
}
|
|
|
|
static int Player_actor_Get_PlayerAnimeIndex_fromItemKind_Fall_pitfall(int item_kind) {
|
|
if (mPlayer_ITEM_IS_UMBRELLA(item_kind) != FALSE) {
|
|
return mPlayer_ANIM_OTIRU2;
|
|
} else {
|
|
return mPlayer_ANIM_OTIRU1;
|
|
}
|
|
}
|
|
|
|
static void Player_actor_setup_main_Fall_pitfall(ACTOR* actorx, GAME* game) {
|
|
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
|
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
|
int item_kind = Player_actor_Get_ItemKind(actorx, player->requested_main_index);
|
|
int anim0_idx = Player_actor_Get_PlayerAnimeIndex_fromItemKind_Fall_pitfall(item_kind);
|
|
int anim1_idx;
|
|
int part_table_idx;
|
|
|
|
Player_actor_SetupItem_Base1(actorx, anim0_idx, -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, &actorx->world.position,
|
|
actorx->shape_info.rotation.y, actorx->shape_info.rotation.y, 5.0f, kf0_p,
|
|
cKF_ANIMATION_TRANS_XZ | cKF_ANIMATION_TRANS_Y);
|
|
Player_actor_InitAnimation_Base2(actorx, game, anim0_idx, anim0_idx, 1.0f, 1.0f, 0.5f, -5.0f, cKF_FRAMECONTROL_STOP,
|
|
mPlayer_PART_TABLE_NORMAL);
|
|
Player_actor_setup_main_Base(actorx, game);
|
|
mISL_SetNowPlayerAction(mISL_PLAYER_ACTION_FALL_PITFALL);
|
|
}
|
|
|
|
static void Player_actor_settle_main_Fall_pitfall(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);
|
|
}
|
|
|
|
static int Player_actor_CulcAnimation_Fall_pitfall(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
|
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
|
}
|
|
|
|
static void Player_actor_Movement_Fall_pitfall(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_set_eye_pattern_Fall_pitfall(ACTOR* actorx) {
|
|
Player_actor_set_tex_anime_pattern(actorx);
|
|
}
|
|
|
|
static void Player_actor_ObjCheck_Fall_pitfall(ACTOR* actorx, GAME* game) {
|
|
Player_actor_Excute_Corect_forStand(actorx, game);
|
|
}
|
|
|
|
static void Player_actor_request_proc_index_fromFall_pitfall(GAME* game, int end_flag) {
|
|
|
|
if (end_flag) {
|
|
Player_actor_request_main_struggle_pitfall_all(game, mPlayer_REQUEST_PRIORITY_28);
|
|
}
|
|
}
|
|
|
|
static void Player_actor_main_Fall_pitfall(ACTOR* actorx, GAME* game) {
|
|
f32 last_anim0_cur_frame;
|
|
int end_flag;
|
|
|
|
end_flag = Player_actor_CulcAnimation_Fall_pitfall(actorx, &last_anim0_cur_frame);
|
|
Player_actor_Movement_Fall_pitfall(actorx);
|
|
Player_actor_Reinput_force_position_angle(actorx, game);
|
|
Player_actor_recover_lean_angle(actorx);
|
|
Player_actor_set_eye_pattern_Fall_pitfall(actorx);
|
|
Player_actor_ObjCheck_Fall_pitfall(actorx, game);
|
|
Player_actor_Item_main(actorx, game);
|
|
Player_actor_request_proc_index_fromFall_pitfall(game, end_flag);
|
|
}
|