mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-11 13:08:34 -04:00
More player TUs
This commit is contained in:
@@ -24,7 +24,7 @@ extern "C" {
|
||||
|
||||
#define cKF_ANIMATION_TRANS_XZ (1 << 0) // Translation on XZ
|
||||
#define cKF_ANIMATION_TRANS_Y (1 << 1) // Translation on Y
|
||||
#define cKF_ANIMATION_ROT_X (1 << 2) // Rotation on the X axis
|
||||
#define cKF_ANIMATION_ROT_Y (1 << 2) // Rotation on the X axis
|
||||
|
||||
enum {
|
||||
cKF_STATE_NONE,
|
||||
@@ -439,16 +439,16 @@ extern void cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(cKF_SkeletonInfo_R_c
|
||||
/**
|
||||
* Adjusts the base position and correction for a skeleton info structure based on animation flags.
|
||||
*
|
||||
* @param counter Animation counter to determine the phase of movement.
|
||||
* @param basepos Original base position of the model.
|
||||
* @param correctpos Corrected base position of the model.
|
||||
* @param ybase Base Y angle for rotation.
|
||||
* @param yidle Idle Y angle for rotation.
|
||||
* @param counter Animation counter to determine the phase of movement.
|
||||
* @param keyframe Skeleton info structure to modify.
|
||||
* @param an_flag Animation flags to determine which corrections to apply.
|
||||
*/
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_ct_base(f32 counter, xyz_t* basepos, xyz_t* correctpos, s16 ybase,
|
||||
s16 yidle, cKF_SkeletonInfo_R_c* keyframe, int animation_flag);
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_ct_base(xyz_t* basepos, xyz_t* correctpos, s16 ybase, s16 yidle,
|
||||
f32 counter, cKF_SkeletonInfo_R_c* keyframe, int animation_flag);
|
||||
|
||||
/**
|
||||
* Resets animation movement and flags for a skeleton info structure.
|
||||
@@ -462,11 +462,11 @@ extern void cKF_SkeletonInfo_R_AnimationMove_dt(cKF_SkeletonInfo_R_c* keyframe);
|
||||
*
|
||||
* @param base Base position to modify.
|
||||
* @param sbase Base rotation to modify.
|
||||
* @param move Movement amount to apply.
|
||||
* @param scale Scaling amount to apply.
|
||||
* @param yidle Y-axis idle angle.
|
||||
* @param keyframe Skeleton info structure containing animation data.
|
||||
*/
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t* move, s16 yidle,
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t* scale, s16 yidle,
|
||||
cKF_SkeletonInfo_R_c* keyframe);
|
||||
|
||||
/**
|
||||
|
||||
+20
-4
@@ -811,13 +811,12 @@ typedef struct player_request_close_funriture_s {
|
||||
} mPlayer_request_close_furniture_c;
|
||||
|
||||
typedef struct player_request_lie_bed_s {
|
||||
int direction;
|
||||
int direction;
|
||||
s16 angle;
|
||||
xyz_t wpos;
|
||||
int flags;
|
||||
} mPlayer_request_lie_bed_c;
|
||||
|
||||
|
||||
typedef struct player_request_door_s {
|
||||
s16 angle_y;
|
||||
xyz_t player_pos;
|
||||
@@ -1496,14 +1495,14 @@ typedef struct player_main_pull_s {
|
||||
int ftr_no;
|
||||
xyz_t start_pos;
|
||||
xyz_t ofs;
|
||||
f32 timer;
|
||||
f32 timer;
|
||||
} mPlayer_main_pull_c;
|
||||
|
||||
typedef struct player_main_rotate_furniture_s {
|
||||
int ftr_no;
|
||||
xyz_t pos;
|
||||
int _10;
|
||||
int rotate_type;
|
||||
int rotate_type;
|
||||
} mPlayer_main_rotate_furniture_c;
|
||||
|
||||
typedef struct player_main_open_furniture_s {
|
||||
@@ -1592,6 +1591,10 @@ typedef struct player_main_broken_axe_s {
|
||||
int _2C;
|
||||
} mPlayer_main_broken_axe_c;
|
||||
|
||||
typedef struct player_main_relax_rod_s {
|
||||
int bee_flag;
|
||||
} mPlayer_main_relax_rod_c;
|
||||
|
||||
typedef struct player_main_dig_scoop_s {
|
||||
xyz_t target_pos;
|
||||
mActor_name_t item;
|
||||
@@ -1724,10 +1727,20 @@ typedef struct player_main_shake_tree_s {
|
||||
int bee_spawn_timer;
|
||||
} mPlayer_main_shake_tree_c;
|
||||
|
||||
typedef struct player_main_struggle_pitfall_s {
|
||||
f32 button_presses;
|
||||
f32 target_anim_speed;
|
||||
} mPlayer_main_struggle_pitfall_c;
|
||||
|
||||
typedef struct player_main_stung_bee_s {
|
||||
f32 timer;
|
||||
} mPlayer_main_stung_bee_c;
|
||||
|
||||
typedef struct player_main_notice_bee_s {
|
||||
f32 timer;
|
||||
int msg_mode;
|
||||
} mPlayer_main_notice_bee_c;
|
||||
|
||||
typedef struct player_main_remove_grass_s {
|
||||
xyz_t grass_pos;
|
||||
xyz_t target_pos;
|
||||
@@ -1808,6 +1821,7 @@ typedef union {
|
||||
mPlayer_main_reflect_axe_c reflect_axe;
|
||||
mPlayer_main_broken_axe_c broken_axe;
|
||||
mPlayer_main_swing_net_c swing_net;
|
||||
mPlayer_main_relax_rod_c relax_rod;
|
||||
mPlayer_main_dig_scoop_c dig_scoop;
|
||||
mPlayer_main_fill_scoop_c fill_scoop;
|
||||
mPlayer_main_reflect_scoop_c reflect_scoop;
|
||||
@@ -1826,7 +1840,9 @@ typedef union {
|
||||
mPlayer_main_putin_item_c putin_item;
|
||||
mPlayer_main_wash_car_c wash_car;
|
||||
mPlayer_main_shake_tree_c shake_tree;
|
||||
mPlayer_main_struggle_pitfall_c struggle_pitfall;
|
||||
mPlayer_main_stung_bee_c stung_bee;
|
||||
mPlayer_main_notice_bee_c notice_bee;
|
||||
mPlayer_main_remove_grass_c remove_grass;
|
||||
mPlayer_main_push_snowball_c push_snowball;
|
||||
mPlayer_main_wade_snowball_c wade_snowball;
|
||||
|
||||
@@ -110,6 +110,7 @@ extern int mPlib_strength_request_main_wade_priority(GAME* game);
|
||||
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 mPlayer_change_data_from_submenu_c* mPlib_Get_change_data_from_submenu_p();
|
||||
|
||||
|
||||
@@ -741,7 +741,7 @@ static void aMR_SetPullMoveAnime(FTR_ACTOR* ftr_actor, GAME* game, MY_ROOM_ACTOR
|
||||
cKF_SkeletonInfo_R_init_standard_stop(keyframe, &cKF_ba_r_furniture_stop, NULL);
|
||||
cKF_SkeletonInfo_R_play(keyframe);
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyframe, 0.0f, 0.0f, 0.0f, 0, 0, 0);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, pos, pos, 0, 0, keyframe, TRUE);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(pos, pos, 0, 0, 0.0f, keyframe, TRUE);
|
||||
cKF_SkeletonInfo_R_init_standard_stop_morph(keyframe, &cKF_ba_r_furniture_pull, NULL, -3.0f);
|
||||
cKF_SkeletonInfo_R_play(keyframe);
|
||||
}
|
||||
@@ -763,7 +763,7 @@ static void aMR_SetPushMoveAnime(FTR_ACTOR* ftr_actor, GAME* game, MY_ROOM_ACTOR
|
||||
cKF_SkeletonInfo_R_init_standard_stop(keyframe, &cKF_ba_r_furniture_stop, NULL);
|
||||
cKF_SkeletonInfo_R_play(keyframe);
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyframe, 0.0f, 0.0f, 0.0f, 0, 0, 0);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, pos, pos, 0, 0, keyframe, TRUE);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(pos, pos, 0, 0, 0.0f, keyframe, TRUE);
|
||||
cKF_SkeletonInfo_R_init_standard_stop(keyframe, &cKF_ba_r_furniture_push, NULL);
|
||||
cKF_SkeletonInfo_R_play(keyframe);
|
||||
}
|
||||
|
||||
+11
-11
@@ -617,7 +617,7 @@ extern void cKF_Si3_draw_SV_R_child(GAME* game, cKF_SkeletonInfo_R_c* keyframe,
|
||||
|
||||
joint1 = cur_joint[1];
|
||||
|
||||
if ((joint_num[0] == 0) && (keyframe->animation_enabled & cKF_ANIMATION_ROT_X)) {
|
||||
if ((joint_num[0] == 0) && (keyframe->animation_enabled & cKF_ANIMATION_ROT_Y)) {
|
||||
joint1.x = keyframe->base_model_rotation.x;
|
||||
joint1.y = keyframe->updated_base_model_rotation.y;
|
||||
joint1.z = keyframe->updated_base_model_rotation.z;
|
||||
@@ -1030,8 +1030,8 @@ extern void cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(cKF_SkeletonInfo_R_c
|
||||
keyframe->updated_base_model_rotation.z = anglez;
|
||||
}
|
||||
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_ct_base(f32 counter, xyz_t* basepos, xyz_t* correctpos, s16 ybase,
|
||||
s16 yidle, cKF_SkeletonInfo_R_c* keyframe, int an_flag) {
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_ct_base(xyz_t* basepos, xyz_t* correctpos, s16 ybase, s16 yidle,
|
||||
f32 counter, cKF_SkeletonInfo_R_c* keyframe, int an_flag) {
|
||||
int sub;
|
||||
|
||||
keyframe->animation_enabled = an_flag;
|
||||
@@ -1059,7 +1059,7 @@ extern void cKF_SkeletonInfo_R_AnimationMove_ct_base(f32 counter, xyz_t* basepos
|
||||
keyframe->base_angle_y = yidle;
|
||||
keyframe->model_angle_correction = 0;
|
||||
|
||||
if (an_flag & cKF_ANIMATION_ROT_X) {
|
||||
if (an_flag & cKF_ANIMATION_ROT_Y) {
|
||||
sub = ybase - yidle;
|
||||
if (sub > 0x8000) {
|
||||
sub = -(0x10000 - sub);
|
||||
@@ -1082,7 +1082,7 @@ extern void cKF_SkeletonInfo_R_AnimationMove_dt(cKF_SkeletonInfo_R_c* keyframe)
|
||||
if (an_flag & cKF_ANIMATION_TRANS_Y) {
|
||||
cur_joint->y = keyframe->base_model_translation.y;
|
||||
}
|
||||
if (an_flag & cKF_ANIMATION_ROT_X) {
|
||||
if (an_flag & cKF_ANIMATION_ROT_Y) {
|
||||
cur_joint = keyframe->current_joint;
|
||||
cur_joint[1].x = keyframe->base_model_rotation.x;
|
||||
cur_joint[1].y = keyframe->base_model_rotation.y;
|
||||
@@ -1091,7 +1091,7 @@ extern void cKF_SkeletonInfo_R_AnimationMove_dt(cKF_SkeletonInfo_R_c* keyframe)
|
||||
keyframe->animation_enabled = 0;
|
||||
}
|
||||
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t* move, s16 yidle,
|
||||
extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t* scale, s16 yidle,
|
||||
cKF_SkeletonInfo_R_c* keyframe) {
|
||||
f32 fc = keyframe->fixed_counter;
|
||||
f32 count = 1.0f + fc;
|
||||
@@ -1117,7 +1117,7 @@ extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t
|
||||
correct_y = 0.0f;
|
||||
}
|
||||
|
||||
if (an_flag & cKF_ANIMATION_ROT_X) {
|
||||
if (an_flag & cKF_ANIMATION_ROT_Y) {
|
||||
mangle_y = keyframe->model_angle_correction;
|
||||
if (count > 0.5f) {
|
||||
keyframe->model_angle_correction -= (s16)(int)(mangle_y * correct_y);
|
||||
@@ -1153,7 +1153,7 @@ extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t
|
||||
keyframe->model_world_position_correction.z = 0.0f;
|
||||
}
|
||||
|
||||
if ((sbase != NULL) && (an_flag & cKF_ANIMATION_ROT_X)) {
|
||||
if ((sbase != NULL) && (an_flag & cKF_ANIMATION_ROT_Y)) {
|
||||
angley = keyframe->base_angle_y;
|
||||
angle_c = keyframe->model_angle_correction;
|
||||
base_x = keyframe->base_model_rotation.x;
|
||||
@@ -1184,9 +1184,9 @@ extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t
|
||||
cos = cos_s(sub);
|
||||
|
||||
temp1 = (trans_x * cos) + (trans_z * sin);
|
||||
move_x = move->x * (cur_joint->x - temp1);
|
||||
move_x = scale->x * (cur_joint->x - temp1);
|
||||
temp1 = (-trans_x * sin) + (trans_z * cos);
|
||||
move_z = move->z * (cur_joint->z - temp1);
|
||||
move_z = scale->z * (cur_joint->z - temp1);
|
||||
|
||||
sin = sin_s(yidle);
|
||||
cos = cos_s(yidle);
|
||||
@@ -1199,7 +1199,7 @@ extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t
|
||||
base->z = temp2 + (keyframe->base_world_position.z + base_z);
|
||||
}
|
||||
if (an_flag & cKF_ANIMATION_TRANS_Y) {
|
||||
base->y = move->y * (cur_joint->y - keyframe->base_model_translation.y) +
|
||||
base->y = scale->y * (cur_joint->y - keyframe->base_model_translation.y) +
|
||||
(keyframe->base_world_position.y + keyframe->model_world_position_correction.y);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -320,7 +320,7 @@ static int Player_actor_request_main_close_furniture(GAME*, int);
|
||||
static int Player_actor_request_main_lie_bed(GAME*, int, const xyz_t*, int, int, int);
|
||||
static int Player_actor_request_main_hide(GAME*, int);
|
||||
static int Player_actor_request_main_groundhog(GAME*, int);
|
||||
static int Player_actor_request_main_door(GAME*, const xyz_t*, s16, int, void*, int);
|
||||
static int Player_actor_request_main_door(GAME*, const xyz_t*, s16, int, u32, int);
|
||||
static int Player_actor_request_main_outdoor(GAME*, int, int, int);
|
||||
static int Player_actor_request_main_wash_car_all(GAME*, const xyz_t*, const xyz_t*, s16, ACTOR*, int);
|
||||
static int Player_actor_request_main_rotate_octagon_all(GAME*, ACTOR*, int, int, const xyz_t*, s16, int);
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
static int Player_actor_request_main_climbup_pitfall_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_CLIMBUP_PITFALL, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_CLIMBUP_PITFALL, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int Player_actor_Get_PlayerAnimeIndex_fromItemKind_Climbup_pitfall(int item_kind) {
|
||||
if (mPlayer_ITEM_IS_UMBRELLA(item_kind) != FALSE) {
|
||||
return mPlayer_ANIM_DERU2;
|
||||
} else {
|
||||
return mPlayer_ANIM_DERU1;
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Climbup_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_Climbup_pitfall(item_kind);
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
if (Common_Get(clip).bg_item_clip != NULL && Common_Get(clip).bg_item_clip->pit_exit_proc != NULL) {
|
||||
xyz_t* player_pos_p = &actorx->world.position;
|
||||
int ut_x;
|
||||
int ut_z;
|
||||
|
||||
if (mFI_Wpos2UtNum(&ut_x, &ut_z, *player_pos_p)) {
|
||||
mActor_name_t* fg_p = mFI_GetUnitFG(*player_pos_p);
|
||||
|
||||
if (fg_p != NULL) {
|
||||
Common_Get(clip).bg_item_clip->pit_exit_proc(*fg_p, ut_x, ut_z, EMPTY_NO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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, 1.0f, -5.0f, cKF_FRAMECONTROL_STOP,
|
||||
mPlayer_PART_TABLE_NORMAL);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Climbup_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_Climbup_pitfall(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Climbup_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_SearchAnimation_Climbup_pitfall(ACTOR* actorx) {
|
||||
Player_actor_AppearShadow_fromAnimationFrame(actorx, 12.0f, 44.0f);
|
||||
}
|
||||
|
||||
static void Player_actor_set_eye_pattern_Climbup_pitfall(ACTOR* actorx) {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Climbup_pitfall(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromClimbup_pitfall(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_Climbup_pitfall(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
end_flag = Player_actor_CulcAnimation_Climbup_pitfall(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_Movement_Climbup_pitfall(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_SearchAnimation_Climbup_pitfall(actorx);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_Climbup_pitfall(actorx);
|
||||
Player_actor_ObjCheck_Climbup_pitfall(actorx, game);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromClimbup_pitfall(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static int Player_actor_request_main_close_furniture(GAME* game, int priority) {
|
||||
static int Player_actor_request_main_close_furniture(GAME* game, int priority) {
|
||||
if (mPlib_get_player_actor_main_index(game) == mPlayer_INDEX_WAIT_OPEN_FURNITURE &&
|
||||
Player_actor_check_request_main_able(game, mPlayer_INDEX_CLOSE_FURNITURE, priority)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
@@ -39,8 +39,8 @@ static void Player_actor_setup_main_Close_furniture(ACTOR* actor, GAME* game) {
|
||||
anim_idx = req_close->anim_idx;
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 200.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, &actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, keyf, 1);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, 0.0f, keyf, 1);
|
||||
Player_actor_InitAnimation_Base2(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -5.0f, 0, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ static void Player_actor_ObjCheck_Close_furniture(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Close_furniture(ACTOR* actor) {
|
||||
static void Player_actor_BGcheck_Close_furniture(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ static void Player_actor_setup_main_Door(ACTOR* actor, GAME* game) {
|
||||
player->main_data.door.label = player->requested_main_index_data.door.label;
|
||||
actor->world.angle.y = player->requested_main_index_data.door.angle_y;
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 0.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(
|
||||
9.0f, &actor->world.position, &player->requested_main_index_data.door.player_pos, actor->shape_info.rotation.y,
|
||||
player->requested_main_index_data.door.angle_y, keyf, 5);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &player->requested_main_index_data.door.player_pos,
|
||||
actor->shape_info.rotation.y,
|
||||
player->requested_main_index_data.door.angle_y, 9.0f, keyf, 5);
|
||||
Player_actor_InitAnimation_Base2(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -9.0f, 0, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
mBGMPsComp_scene_mode(0xC);
|
||||
@@ -49,11 +49,11 @@ static void Player_actor_Movement_Door(ACTOR* actor) {
|
||||
Player_actor_Set_force_shadow_position_fromWorldPosition(actor);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Door(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
static void Player_actor_ObjCheck_Door(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
}
|
||||
|
||||
static Player_actor_main_Door(ACTOR* actor, GAME* game) {
|
||||
static void Player_actor_main_Door(ACTOR* actor, GAME* game) {
|
||||
f32 frame_calc;
|
||||
|
||||
Player_actor_CulcAnimation_Door(actor, &frame_calc);
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ static void Player_actor_setup_main_Lie_bed(ACTOR* actor, GAME* game) {
|
||||
actor->world.angle.y = angle;
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 0.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(17.0f, &actor->world.position, &req_lie->wpos,
|
||||
actor->shape_info.rotation.y, req_lie->angle, keyf, 3);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &req_lie->wpos, actor->shape_info.rotation.y,
|
||||
req_lie->angle, 17.0f, keyf, 3);
|
||||
Player_actor_InitAnimation_Base2(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -5.0f, 0, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
Player_actor_sound_JUMP(actor);
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
static int Player_actor_request_main_mail_jump_all(GAME* game, const xyz_t* pos_p, s16 angle_y, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_MAIL_JUMP, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_mail_jump_c* req_mail_jump_p = &player->requested_main_index_data.mail_jump;
|
||||
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_MAIL_JUMP, prio);
|
||||
req_mail_jump_p->pos = *pos_p;
|
||||
req_mail_jump_p->angle_y = angle_y;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Mail_jump(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
mPlayer_request_mail_jump_c* req_mail_jump_p = &player->requested_main_index_data.mail_jump;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_CONFIRM1, -6.0f, &anim1_idx, &part_table_idx);
|
||||
|
||||
if (part_table_idx != mPlayer_PART_TABLE_NORMAL) {
|
||||
part_table_idx = mPlayer_PART_TABLE_NET;
|
||||
}
|
||||
|
||||
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_mail_jump_p->pos,
|
||||
actorx->shape_info.rotation.y, req_mail_jump_p->angle_y, 8.0f, kf0_p,
|
||||
cKF_ANIMATION_ROT_Y | cKF_ANIMATION_TRANS_XZ);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_CONFIRM1, anim1_idx, 1.0f, 1.0f, 0.5f, -8.0f,
|
||||
cKF_FRAMECONTROL_STOP, part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Mail_jump(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_Mail_jump(ACTOR* actorx) {
|
||||
f32 dummy;
|
||||
|
||||
return Player_actor_CulcAnimation_Base2(actorx, &dummy);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Mail_jump(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_Mail_jump(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Mail_jump(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_main_Mail_jump(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_CulcAnimation_Mail_jump(actorx);
|
||||
Player_actor_Movement_Mail_jump(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
Player_actor_ObjCheck_Mail_jump(actorx, game);
|
||||
Player_actor_BGcheck_Mail_jump(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
static int Player_actor_request_main_mail_land_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_MAIL_LAND, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_MAIL_LAND, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_request_main_mail_land_from_submenu(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_request_main_mail_land_all(game, mPlayer_REQUEST_PRIORITY_31);
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Mail_land(ACTOR* actorx, GAME* game) {
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_CONFIRM1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base3(actorx, game, mPlayer_ANIM_CONFIRM1, anim1_idx, 0.5f, -5.0f, cKF_FRAMECONTROL_STOP,
|
||||
part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Mail_land(ACTOR* actorx) {
|
||||
Player_actor_Movement_Base_Braking_common(actorx, 0.23925f);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Mail_land(ACTOR* actorx) {
|
||||
f32 dummy;
|
||||
|
||||
return Player_actor_CulcAnimation_Base2(actorx, &dummy);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Mail_land(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Mail_land(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromMail_land(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, 16.5f)) {
|
||||
Player_actor_SettleRequestMainIndexPriority(actorx);
|
||||
Player_actor_Set_status_for_bee(actorx, TRUE);
|
||||
} else if (fc0_p->current_frame <= 16.0f &&
|
||||
(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_Mail_land(ACTOR* actorx, GAME* game) {
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Mail_land(actorx);
|
||||
end_flag = Player_actor_CulcAnimation_Mail_land(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
Player_actor_ObjCheck_Mail_land(actorx, game);
|
||||
Player_actor_BGcheck_Mail_land(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromMail_land(actorx, game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
static int Player_actor_request_main_notice_bee_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_NOTICE_BEE, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_NOTICE_BEE, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Notice_bee(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_notice_bee_c* notice_bee_p = &player->main_data.notice_bee;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
notice_bee_p->timer = 0.0f;
|
||||
notice_bee_p->msg_mode = 0;
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_HATI3, -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_ROT_Y);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_HATI3, 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_Notice_bee(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;
|
||||
mBGMPsComp_delete_ps_demo(BGM_BEE_STUNG, 0x168);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Notice_bee(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Notice_bee(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_Notice_bee(ACTOR* actorx, int end_flag) {
|
||||
if (end_flag) {
|
||||
if (Common_Get(player_decoy_flag) == FALSE) {
|
||||
Player_actor_set_eye_pattern_normal(actorx);
|
||||
}
|
||||
} else {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Notice_bee(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Notice_bee(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Notice_bee_demo_ct(ACTOR* actorx) {
|
||||
rgba_t window_color;
|
||||
|
||||
mDemo_Set_msg_num(0x17B4);
|
||||
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);
|
||||
mBGMPsComp_delete_ps_quiet();
|
||||
}
|
||||
|
||||
static int Player_actor_MessageControl_Notice_bee(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_notice_bee_c* notice_bee_p = &player->main_data.notice_bee;
|
||||
int* msg_mode_p = ¬ice_bee_p->msg_mode;
|
||||
f32* timer_p = ¬ice_bee_p->timer;
|
||||
|
||||
switch (*msg_mode_p) {
|
||||
case 0: {
|
||||
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_bee_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_bee(ACTOR* actorx, GAME* game, int anim_end_flag,
|
||||
int msg_end_flag) {
|
||||
if (anim_end_flag && 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_bee(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int anim_end_flag;
|
||||
int msg_end_flag;
|
||||
|
||||
anim_end_flag = Player_actor_CulcAnimation_Notice_bee(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_Movement_Notice_bee(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_Notice_bee(actorx, anim_end_flag);
|
||||
Player_actor_ObjCheck_Notice_bee(actorx, game);
|
||||
Player_actor_BGcheck_Notice_bee(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
msg_end_flag = Player_actor_MessageControl_Notice_bee(actorx);
|
||||
Player_actor_request_proc_index_fromNotice_bee(actorx, game, anim_end_flag, msg_end_flag);
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ static void Player_actor_setup_main_Open_furniture(ACTOR* actor, GAME* game) {
|
||||
actor->world.position.z = z;
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 200.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, &actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, keyf, 1);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, 0.0f, keyf, 1);
|
||||
Player_actor_InitAnimation_Base2(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -5.0f, 0, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
}
|
||||
@@ -69,8 +69,8 @@ static void Player_actor_ObjCheck_Open_furniture(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Open_furniture(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
static void Player_actor_BGcheck_Open_furniture(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromOpen_furniture(ACTOR* actor, GAME* game, int arg) {
|
||||
|
||||
@@ -38,25 +38,25 @@ static void Player_actor_setup_main_Outdoor(ACTOR* actor, GAME* game) {
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
}
|
||||
|
||||
void Player_actor_settle_main_Outdoor(ACTOR* actor, GAME* game) {
|
||||
mDemo_End(actor);
|
||||
static void Player_actor_settle_main_Outdoor(ACTOR* actor, GAME* game) {
|
||||
mDemo_End(actor);
|
||||
}
|
||||
|
||||
int Player_actor_CulcAnimation_Outdoor(ACTOR* actor, f32* calc_frame) {
|
||||
static int Player_actor_CulcAnimation_Outdoor(ACTOR* actor, f32* calc_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actor, calc_frame);
|
||||
}
|
||||
|
||||
int Player_actor_Movement_Outdoor(ACTOR* actor, int calc) {
|
||||
static int Player_actor_Movement_Outdoor(ACTOR* actor, int calc) {
|
||||
Player_actor_Set_force_shadow_position_fromAnimePosition(actor);
|
||||
Player_actor_Movement_Base_Stop(actor, FALSE);
|
||||
return calc;
|
||||
}
|
||||
|
||||
void Player_actor_ObjCheck_Outdoor(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forOutdoor(actor, game);
|
||||
static void Player_actor_ObjCheck_Outdoor(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forOutdoor(actor, game);
|
||||
}
|
||||
|
||||
void Player_actor_request_proc_index_fromOutdoor(GAME* game, int arg1) {
|
||||
static void Player_actor_request_proc_index_fromOutdoor(GAME* game, int arg1) {
|
||||
if (arg1 != 0) {
|
||||
if (Common_Get(complete_payment_type) != 0) {
|
||||
Player_actor_request_main_complete_payment(game, mPlayer_REQUEST_PRIORITY_44);
|
||||
@@ -67,27 +67,26 @@ void Player_actor_request_proc_index_fromOutdoor(GAME* game, int arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void Player_actor_Demo_Outdoor_Demo_ct(ACTOR* actor) {
|
||||
|
||||
static void Player_actor_Demo_Outdoor_Demo_ct(ACTOR* actor) {
|
||||
}
|
||||
|
||||
int Player_actor_Request_Demo_Outdoor(ACTOR* actor) {
|
||||
static int Player_actor_Request_Demo_Outdoor(ACTOR* actor) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actor;
|
||||
|
||||
if (player->main_data.outdoor.is_demo == FALSE) {
|
||||
if (mDemo_Check(mDemo_TYPE_OUTDOOR, actor)) {
|
||||
player->main_data.outdoor.is_demo = TRUE;
|
||||
return 0;
|
||||
return FALSE;
|
||||
} else {
|
||||
mDemo_Request(mDemo_TYPE_OUTDOOR, actor, Player_actor_Demo_Outdoor_Demo_ct);
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void Player_actor_main_Outdoor(ACTOR* actor, GAME* game) {
|
||||
static void Player_actor_main_Outdoor(ACTOR* actor, GAME* game) {
|
||||
int arg1;
|
||||
f32 frame_calc;
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ static void Player_actor_setup_main_Pull(ACTOR* actor, GAME* game) {
|
||||
actor->world.position.z = z;
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 200.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, &actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, keyf, 1);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, 0.0f, keyf, 1);
|
||||
Player_actor_InitAnimation_Base2(actor, game, mPlayer_ANIM_PULL1, mPlayer_ANIM_PULL1, 1.0f, 1.0f, 0.5f, -5.0f, 0,
|
||||
0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
@@ -102,12 +102,12 @@ static void Player_actor_SearchAnimation_Pull(ACTOR* actor, GAME* game, f32 fram
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Pull(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
static void Player_actor_ObjCheck_Pull(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Pull(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
static void Player_actor_BGcheck_Pull(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromPull(ACTOR* actor, GAME* game, int arg) {
|
||||
|
||||
@@ -42,8 +42,8 @@ static void Player_actor_setup_main_Push(ACTOR* actor, GAME* game) {
|
||||
actor->world.position.z = z;
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 200.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, &actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, keyf, 1);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, 0.0f, keyf, 1);
|
||||
Player_actor_InitAnimation_Base2(actor, game, mPlayer_ANIM_PUSH1, mPlayer_ANIM_PUSH1, 1.0f, 1.0f, 0.5f, -5.0f, 0,
|
||||
0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
@@ -67,12 +67,12 @@ static void Player_actor_SearchAnimation_Push(ACTOR* actor, GAME* game, f32 fram
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Push(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
static void Player_actor_ObjCheck_Push(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Push(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
static void Player_actor_BGcheck_Push(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type3(actor);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromPush(ACTOR* actor, GAME* game, int arg) {
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
static int Player_actor_request_main_ready_pitfall_all(GAME* game, const xyz_t* pos_p, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_READY_PITFALL, prio)) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
mPlayer_request_ready_pitfall_c* req_ready_pifall_p = &player->requested_main_index_data.ready_pitfall;
|
||||
|
||||
req_ready_pifall_p->pos = *pos_p;
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_READY_PITFALL, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Ready_pitfall(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
mPlayer_request_ready_pitfall_c* req_ready_pifall_p = &player->requested_main_index_data.ready_pitfall;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
player->pitfall_flag = FALSE;
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_GURATUKU1, -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_ready_pifall_p->pos,
|
||||
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, mPlayer_ANIM_GURATUKU1, 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_Ready_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);
|
||||
eEC_CLIP->effect_kill_proc(eEC_EFFECT_ASE2, RSV_NO);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Ready_pitfall(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Ready_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_SetEffect_Ready_pitfall(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, 5.0f)) {
|
||||
player->draw_effect_idx = eEC_EFFECT_ASE2 + 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Ready_pitfall(ACTOR* actorx, f32 frame) {
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
|
||||
Player_actor_SetEffect_Ready_pitfall(actorx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_set_eye_pattern_Ready_pitfall(ACTOR* actorx) {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Ready_pitfall(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromReady_pitfall(GAME* game, int end_flag) {
|
||||
|
||||
if (end_flag) {
|
||||
Player_actor_request_main_fall_pitfall_all(game, mPlayer_REQUEST_PRIORITY_28);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Ready_pitfall(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
end_flag = Player_actor_CulcAnimation_Ready_pitfall(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_Movement_Ready_pitfall(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
Player_actor_SearchAnimation_Ready_pitfall(actorx, last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_Ready_pitfall(actorx);
|
||||
Player_actor_ObjCheck_Ready_pitfall(actorx, game);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromReady_pitfall(game, end_flag);
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ static void Player_actor_setup_main_Roll_bed(ACTOR* actor, GAME* game) {
|
||||
anim_idx = Player_actor_Get_BasicPlayerAnimeIndex_Roll_bed(req_roll->move_dir, actor->shape_info.rotation.y);
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 0.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(17.0f, &actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, keyf, 1);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, 17.0f, keyf, 1);
|
||||
Player_actor_InitAnimation_Base2(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -5.0f, 0, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
Player_actor_sound_BED_NEGAERI(actor);
|
||||
|
||||
@@ -125,7 +125,7 @@ static void Player_actor_setup_main_Standup_bed(ACTOR* actor, GAME* game) {
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 0.0f, 0, 0, 0x4000);
|
||||
rot = actor->shape_info.rotation.y;
|
||||
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(3.0f, &actor->world.position, &actor->world.position, rot, rot, keyf, 3);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position, rot, rot, 3.0f, keyf, 3);
|
||||
Player_actor_InitAnimation_Base2(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -3.0f, 0, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
Player_actor_sound_BED_OUT(actor);
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
static int Player_actor_request_main_struggle_pitfall_all(GAME* game, int prio) {
|
||||
if (Player_actor_check_request_main_able(game, mPlayer_INDEX_STRUGGLE_PITFALL, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_STRUGGLE_PITFALL, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Struggle_pitfall(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
mPlayer_main_struggle_pitfall_c* struggle_pitfall_p = &player->main_data.struggle_pitfall;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
struggle_pitfall_p->button_presses = 0.0f;
|
||||
struggle_pitfall_p->target_anim_speed = 0.5f;
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_MOGAKU1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base1(actorx, game, mPlayer_ANIM_MOGAKU1, mPlayer_ANIM_MOGAKU1, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
mPlayer_PART_TABLE_NORMAL);
|
||||
player->draw_effect_idx = eEC_EFFECT_ASE2 + 1;
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Struggle_pitfall(ACTOR* actorx, GAME* game) {
|
||||
eEC_CLIP->effect_kill_proc(eEC_EFFECT_ASE2, RSV_NO);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Struggle_pitfall(ACTOR* actorx) {
|
||||
Player_actor_Movement_Base_Stop(actorx, FALSE);
|
||||
}
|
||||
|
||||
static int Player_actor_ControlAnimationSpeed_Struggle_pitfall(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_struggle_pitfall_c* struggle_pitfall_p = &player->main_data.struggle_pitfall;
|
||||
f32 add_button_push_amt;
|
||||
f32 old_recognize_percentR;
|
||||
f32 now_recognize_percentR;
|
||||
f32 d_recognize_percentR;
|
||||
f32 abs_d_recognize_percentR;
|
||||
|
||||
if (struggle_pitfall_p->button_presses >= 20.0f) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
add_button_push_amt = 0.0f;
|
||||
add_button_push_amt += Player_actor_CheckController_forStruggle_pitfall();
|
||||
old_recognize_percentR = Player_actor_GetController_old_recognize_percentR();
|
||||
now_recognize_percentR = Player_actor_GetController_recognize_percentR();
|
||||
d_recognize_percentR = old_recognize_percentR - now_recognize_percentR;
|
||||
abs_d_recognize_percentR = ABS(d_recognize_percentR);
|
||||
add_button_push_amt += abs_d_recognize_percentR * 0.5f;
|
||||
|
||||
if (old_recognize_percentR > 0.0f && now_recognize_percentR > 0.0f) {
|
||||
int now_move_angle = Player_actor_GetController_move_angle();
|
||||
int old_move_angle = Player_actor_GetController_old_move_angle();
|
||||
int d_move_angle = (s16)(old_move_angle - now_move_angle);
|
||||
int abs_d_move_angle = ABS(d_move_angle);
|
||||
|
||||
add_button_push_amt += (f32)abs_d_move_angle * 0.00002f;
|
||||
}
|
||||
|
||||
{
|
||||
f32* target_anim_speed_p = &struggle_pitfall_p->target_anim_speed;
|
||||
|
||||
struggle_pitfall_p->button_presses += add_button_push_amt;
|
||||
(*target_anim_speed_p) += add_button_push_amt * 0.25f;
|
||||
(*target_anim_speed_p) -= 0.00435f;
|
||||
|
||||
if (*target_anim_speed_p > 1.0f) {
|
||||
*target_anim_speed_p = 1.0f;
|
||||
} else if (*target_anim_speed_p < 0.5f) {
|
||||
*target_anim_speed_p = 0.5f;
|
||||
}
|
||||
|
||||
{
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
f32* speed_p = &fc0_p->speed;
|
||||
|
||||
(*speed_p) += (*target_anim_speed_p - *speed_p) * 0.10875f;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Struggle_pitfall(ACTOR* actorx) {
|
||||
f32 dummy;
|
||||
|
||||
return Player_actor_CulcAnimation_Base2(actorx, &dummy);
|
||||
}
|
||||
|
||||
static void Player_actor_set_eye_pattern_Struggle_pitfall(ACTOR* actorx) {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
Player_actor_set_eye_pattern(actorx, 6);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Struggle_pitfall(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromStruggle_pitfall(GAME* game, int end_flag) {
|
||||
|
||||
if (end_flag) {
|
||||
Player_actor_request_main_climbup_pitfall_all(game, mPlayer_REQUEST_PRIORITY_29);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Struggle_pitfall(ACTOR* actorx, GAME* game) {
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Struggle_pitfall(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
end_flag = Player_actor_ControlAnimationSpeed_Struggle_pitfall(actorx);
|
||||
Player_actor_CulcAnimation_Struggle_pitfall(actorx);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_eye_pattern_Struggle_pitfall(actorx);
|
||||
Player_actor_ObjCheck_Struggle_pitfall(actorx, game);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromStruggle_pitfall(game, end_flag);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
static int Player_actor_request_main_stung_bee_all(GAME* game, int prio) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
|
||||
int main_index = player->now_main_index;
|
||||
|
||||
if (main_index == mPlayer_INDEX_RELAX_ROD) {
|
||||
mPlayer_main_relax_rod_c* relax_rod_p = &player->main_data.relax_rod;
|
||||
|
||||
relax_rod_p->bee_flag = TRUE;
|
||||
return FALSE;
|
||||
} else if (Player_actor_Check_is_demo_mode(main_index)) {
|
||||
return FALSE;
|
||||
} else if (Player_actor_check_request_main_able(game, mPlayer_INDEX_STUNG_BEE, prio)) {
|
||||
Player_actor_request_main_index(game, mPlayer_INDEX_STUNG_BEE, prio);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Stung_bee(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_stung_bee_c* stung_bee_p = &player->main_data.stung_bee;
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
stung_bee_p->timer = 0.0f;
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_HATI1, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_HATI1, anim1_idx, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
cKF_FRAMECONTROL_STOP, part_table_idx);
|
||||
Player_actor_setup_main_Base(actorx, game);
|
||||
mBGMPsComp_make_ps_quiet(0x168);
|
||||
if (player->bee_chase_bgm_flag) {
|
||||
player->bee_chase_bgm_flag = FALSE;
|
||||
mBGMPsComp_delete_ps_happening(BGM_BEE_CHASE, 0);
|
||||
}
|
||||
|
||||
Player_actor_sound_hachi_sasareru(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Stung_bee(ACTOR* actorx) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_stung_bee_c* stung_bee_p = &player->main_data.stung_bee;
|
||||
f32* timer_p = &stung_bee_p->timer;
|
||||
|
||||
Player_actor_Movement_Base_Braking(actorx);
|
||||
if (*timer_p > 94.0f) {
|
||||
add_calc_short_angle2(&actorx->shape_info.rotation.y, DEG2SHORT_ANGLE2(180.0f), 1.0f - sqrtf(0.5f), 2500, 50);
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
}
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Stung_bee(ACTOR* actorx, f32* last_anim0_cur_frame) {
|
||||
return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame);
|
||||
}
|
||||
|
||||
static void Player_actor_ChangeAnimation_Stung_bee(ACTOR* actorx, GAME* game, int end_flag) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
|
||||
if (end_flag && player->animation0_idx == mPlayer_ANIM_HATI1) {
|
||||
int anim1_idx;
|
||||
int part_table_idx;
|
||||
|
||||
Player_actor_SetupItem_Base1(actorx, mPlayer_ANIM_HATI2, -5.0f, &anim1_idx, &part_table_idx);
|
||||
Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_HATI2, anim1_idx, 1.0f, 1.0f, 0.5f, -5.0f,
|
||||
cKF_FRAMECONTROL_STOP, part_table_idx);
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_SearchAnimation_Stung_bee(ACTOR* actorx, GAME* game, f32 frame) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE &&
|
||||
player->animation0_idx == mPlayer_ANIM_HATI2) {
|
||||
cKF_SkeletonInfo_R_c* kf0_p = &player->keyframe0;
|
||||
cKF_FrameControl_c* fc0_p = &kf0_p->frame_control;
|
||||
|
||||
if (Player_actor_Check_AnimationFrame(fc0_p, 21.0f)) {
|
||||
mNpc_SetTalkBee();
|
||||
Common_Set(player_bee_swell_flag, TRUE);
|
||||
Common_Set(player_bee_chase_flag, FALSE);
|
||||
mPlib_change_player_face(game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_set_eye_pattern_Stung_bee(ACTOR* actorx) {
|
||||
Player_actor_set_tex_anime_pattern(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Stung_bee(ACTOR* actorx, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actorx, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Stung_bee(ACTOR* actorx) {
|
||||
Player_actor_BGcheck_common_type1(actorx);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromStung_bee(ACTOR* actorx, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
|
||||
mPlayer_main_stung_bee_c* stung_bee_p = &player->main_data.stung_bee;
|
||||
f32* timer_p = &stung_bee_p->timer;
|
||||
|
||||
if (*timer_p > 252.0f) {
|
||||
Player_actor_request_main_notice_bee_all(game, mPlayer_REQUEST_PRIORITY_26);
|
||||
} else {
|
||||
(*timer_p) += 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
static void Player_actor_main_Stung_bee(ACTOR* actorx, GAME* game) {
|
||||
f32 last_anim0_cur_frame;
|
||||
int end_flag;
|
||||
|
||||
Player_actor_Movement_Stung_bee(actorx);
|
||||
Player_actor_Reinput_force_position_angle(actorx, game);
|
||||
end_flag = Player_actor_CulcAnimation_Stung_bee(actorx, &last_anim0_cur_frame);
|
||||
Player_actor_ChangeAnimation_Stung_bee(actorx, game, end_flag);
|
||||
Player_actor_SearchAnimation_Stung_bee(actorx, game, last_anim0_cur_frame);
|
||||
Player_actor_recover_lean_angle(actorx);
|
||||
Player_actor_set_tex_anime_Stung_bee(actorx);
|
||||
Player_actor_ObjCheck_Stung_bee(actorx, game);
|
||||
Player_actor_BGcheck_Stung_bee(actorx);
|
||||
Player_actor_Item_main(actorx, game);
|
||||
Player_actor_request_proc_index_fromStung_bee(actorx, game);
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ static void Player_actor_setup_main_Wait_open_furniture(ACTOR* actor, GAME* game
|
||||
anim_idx = req_open->anim_idx;
|
||||
|
||||
cKF_SkeletonInfo_R_Animation_Set_base_shape_trs(keyf, 0.0f, 1000.0f, 200.0f, 0, 0, 0x4000);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(0.0f, &actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, keyf, 1);
|
||||
cKF_SkeletonInfo_R_AnimationMove_ct_base(&actor->world.position, &actor->world.position,
|
||||
actor->shape_info.rotation.y, 0, 0.0f, keyf, 1);
|
||||
Player_actor_InitAnimation_Base1(actor, game, anim_idx, anim_idx, 1.0f, 1.0f, 0.5f, -5.0f, 0);
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
}
|
||||
@@ -44,8 +44,8 @@ static void Player_actor_settle_main_Wait_open_furniture(ACTOR* actor, GAME* gam
|
||||
cKF_SkeletonInfo_R_AnimationMove_dt(&player->keyframe0);
|
||||
}
|
||||
|
||||
static void Player_actor_Movement_Wait_open_furniture(ACTOR* actor) {
|
||||
Player_actor_Movement_Base_Stop(actor, FALSE);
|
||||
static void Player_actor_Movement_Wait_open_furniture(ACTOR* actor) {
|
||||
Player_actor_Movement_Base_Stop(actor, FALSE);
|
||||
}
|
||||
|
||||
static int Player_actor_CulcAnimation_Wait_open_furniture(ACTOR* actor) {
|
||||
|
||||
@@ -56,11 +56,11 @@ static void Player_actor_setup_main_Walk_common(ACTOR* actor, GAME* game) {
|
||||
Player_actor_setup_main_Base(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_setup_main_Walk(ACTOR* actor, GAME* game) {
|
||||
Player_actor_setup_main_Walk_common(actor, game);
|
||||
static void Player_actor_setup_main_Walk(ACTOR* actor, GAME* game) {
|
||||
Player_actor_setup_main_Walk_common(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_settle_main_Walk(ACTOR* actor) {
|
||||
static void Player_actor_settle_main_Walk(ACTOR* actor, GAME* game) {
|
||||
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actor;
|
||||
|
||||
switch (player->requested_main_index) {
|
||||
@@ -219,12 +219,12 @@ static void Player_actor_Movement_Walk(ACTOR* actor, GAME* game, f32* frame) {
|
||||
Player_actor_Movement_Base(actor);
|
||||
}
|
||||
|
||||
static void Player_actor_ObjCheck_Walk(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
static void Player_actor_ObjCheck_Walk(ACTOR* actor, GAME* game) {
|
||||
Player_actor_Excute_Corect_forStand(actor, game);
|
||||
}
|
||||
|
||||
static void Player_actor_BGcheck_Walk(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type1(actor);
|
||||
static void Player_actor_BGcheck_Walk(ACTOR* actor) {
|
||||
Player_actor_BGcheck_common_type1(actor);
|
||||
}
|
||||
|
||||
static void Player_actor_request_proc_index_fromWalk(ACTOR* actor, GAME* game) {
|
||||
|
||||
Reference in New Issue
Block a user