static int Player_actor_request_main_give_all(GAME* game, ACTOR* talk_actor_p, int turn_flag, int ret_main_index,
                                              mActor_name_t item, int mode, int present_flag, int surface_flag,
                                              int priority) {
    if (Player_actor_check_request_main_able(game, mPlayer_INDEX_GIVE, priority)) {
        PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
        mPlayer_request_give_c* req_give_p = &player->requested_main_index_data.give;

        Player_actor_request_main_index(game, mPlayer_INDEX_GIVE, priority);
        req_give_p->talk_actor = talk_actor_p;
        req_give_p->turn_flag = turn_flag;
        req_give_p->prev_main_index = ret_main_index;
        req_give_p->item = item;
        req_give_p->mode = mode;
        req_give_p->present_flag = present_flag;
        req_give_p->on_surface_flag = surface_flag;
        return TRUE;
    }

    return FALSE;
}

static void Player_actor_request_main_give_from_submenu(ACTOR* actorx, GAME* game) {
    PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
    int main_index = player->now_main_index;
    ACTOR* talk_actor_p;
    int turn_flag;
    mPlayer_request_give_from_submenu_c* req_give_from_submenu_p;

    req_give_from_submenu_p = &mPlib_Get_change_data_from_submenu_p()->request_main_data.give_from_submenu;
    if (main_index == mPlayer_INDEX_TALK) {
        talk_actor_p = player->main_data.talk.talk_actor_p;
        turn_flag = player->main_data.talk.turn_flag;
    } else {
        talk_actor_p = NULL;
        turn_flag = FALSE;
    }

    Player_actor_request_main_give_all(game, talk_actor_p, turn_flag, main_index, req_give_from_submenu_p->item,
                                       req_give_from_submenu_p->mode_after, req_give_from_submenu_p->present_flag,
                                       req_give_from_submenu_p->counter_flag, mPlayer_REQUEST_PRIORITY_31);
}

static void Player_actor_setup_main_Give(ACTOR* actorx, GAME* game) {
    PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
    mPlayer_request_give_c* req_give_p = &player->requested_main_index_data.give;
    mPlayer_main_give_c* main_give_p = &player->main_data.give;
    mActor_name_t item;
    int mode;
    int present_flag;
    int anim0_idx;
    int anim1_idx;
    int part_table_idx;

    item = req_give_p->item;
    mode = req_give_p->mode;
    present_flag = req_give_p->present_flag;

    main_give_p->talk_actor_p = req_give_p->talk_actor;
    main_give_p->turn_flag = req_give_p->turn_flag;
    main_give_p->ret_main_index = req_give_p->prev_main_index;
    main_give_p->item = req_give_p->item;
    main_give_p->surface_flag = req_give_p->on_surface_flag;

    if (Player_actor_check_item_is_fish(item)) {
        anim0_idx = mPlayer_ANIM_TRANSFER_F1;
    } else if (main_give_p->surface_flag) {
        anim0_idx = mPlayer_ANIM_SEND_MAIL1;
    } else {
        anim0_idx = mPlayer_ANIM_TRANSFER1;
    }

    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, 0.5f, -5.0f, cKF_FRAMECONTROL_STOP,
                                     part_table_idx);
    Player_actor_setup_main_Base(actorx, game);
    Player_actor_Birth_TradingItem(actorx, item, mode, present_flag);
    Player_actor_Set_item_matrix_set(actorx);
    Player_actor_sound_GASAGOSO(actorx);
}

static void Player_actor_Movement_Give(ACTOR* actorx) {
    Player_actor_Movement_Base_Stop(actorx, FALSE);
}

static int Player_actor_CulcAnimation_Give(ACTOR* actorx) {
    f32 dummy;

    return Player_actor_CulcAnimation_Base2(actorx, &dummy);
}

static void Player_actor_ObjCheck_Give(ACTOR* actorx, GAME* game) {
    Player_actor_Excute_Corect_forStand(actorx, game);
}

static void Player_actor_request_proc_index_fromGive(ACTOR* actorx, GAME* game, int end_flag) {
    PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;

    if (end_flag) {
        int after_mode = Common_Get(clip).handOverItem_clip->player_after_mode;
        mPlayer_main_give_c* main_give_p = &player->main_data.give;
        ACTOR* talk_actor_p = main_give_p->talk_actor_p;
        int turn_flag = main_give_p->turn_flag;
        int ret_main_index = main_give_p->ret_main_index;

        Player_actor_SettleRequestMainIndexPriority(actorx);
        Player_actor_request_main_give_wait_all(game, talk_actor_p, turn_flag, ret_main_index, main_give_p->item,
                                                main_give_p->surface_flag, mPlayer_REQUEST_PRIORITY_19);
    }
}

static void Player_actor_main_Give(ACTOR* actorx, GAME* game) {
    int end_flag;

    Player_actor_Movement_Give(actorx);
    Player_actor_Reinput_force_position_angle(actorx, game);
    end_flag = Player_actor_CulcAnimation_Give(actorx);
    Player_actor_recover_lean_angle(actorx);
    Player_actor_set_eye_pattern_normal(actorx);
    Player_actor_ObjCheck_Give(actorx, game);
    Player_actor_BGcheck_Wait(actorx);
    Player_actor_Set_item_matrix_set(actorx);
    Player_actor_Item_main(actorx, game);
    Player_actor_request_proc_index_fromGive(actorx, game, end_flag);
}
