Player: Document "WaitForPutAway" (#1694)

* import OoT docs

* cleanup

* carry actor

* more cleanup

* PLAYER_STATE1_CARRYING_ACTOR
This commit is contained in:
engineer124
2024-09-23 11:22:14 +10:00
committed by GitHub
parent 24086dc67b
commit c83b4cf107
10 changed files with 164 additions and 111 deletions
+4 -4
View File
@@ -2164,7 +2164,7 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, GetItemId getItemId, f32 x
(getItemId == GI_DEED_LAND) ||
(((player->heldActor != NULL) || (actor == player->talkActor)) &&
((getItemId > GI_NONE) && (getItemId < GI_MAX)))) ||
!(player->stateFlags1 & (PLAYER_STATE1_800 | PLAYER_STATE1_20000000))) {
!(player->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_20000000))) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS_ALT(yawDiff);
@@ -2244,9 +2244,9 @@ s32 Actor_HasRider(PlayState* play, Actor* horse) {
s32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 &
(PLAYER_STATE1_80 | PLAYER_STATE1_800 | PLAYER_STATE1_1000 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 |
PLAYER_STATE1_40000 | PLAYER_STATE1_80000 | PLAYER_STATE1_100000 | PLAYER_STATE1_200000))) {
if (!(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_1000 |
PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_40000 | PLAYER_STATE1_80000 |
PLAYER_STATE1_100000 | PLAYER_STATE1_200000))) {
player->rideActor = horse;
player->mountSide = mountSide;
CutsceneManager_Queue(CS_ID_GLOBAL_TALK);
+5 -5
View File
@@ -353,8 +353,8 @@ s32 Player_GetCurMaskItemId(PlayState* play) {
void func_80122F28(Player* player) {
if ((player->actor.category == ACTORCAT_PLAYER) &&
!(player->stateFlags1 & (PLAYER_STATE1_400 | PLAYER_STATE1_800 | PLAYER_STATE1_200000 | PLAYER_STATE1_800000 |
PLAYER_STATE1_20000000)) &&
!(player->stateFlags1 & (PLAYER_STATE1_400 | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_200000 |
PLAYER_STATE1_800000 | PLAYER_STATE1_20000000)) &&
!(player->stateFlags2 & PLAYER_STATE2_1)) {
if (player->doorType <= PLAYER_DOORTYPE_TALKING) {
CutsceneManager_Queue(CS_ID_GLOBAL_TALK);
@@ -540,11 +540,11 @@ bool func_801234D4(PlayState* play) {
bool func_80123590(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_800) && (player->heldActor == actor)) {
if ((player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (player->heldActor == actor)) {
player->interactRangeActor = NULL;
player->heldActor = NULL;
player->actor.child = NULL;
player->stateFlags1 &= ~PLAYER_STATE1_800;
player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
return true;
}
@@ -3411,7 +3411,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
temp_s1 = &heldActor->world.rot;
Matrix_MtxFToYXZRot(&sp230, temp_s1, false);
heldActor->shape.rot = *temp_s1;
} else if (player->stateFlags1 & PLAYER_STATE1_800) {
} else if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
heldActor->world.rot.y = heldActor->shape.rot.y =
player->actor.shape.rot.y + player->leftHandWorld.rot.y;
}