1
0
mirror of https://github.com/blawar/ooot.git synced 2024-06-28 07:24:04 +00:00

player documentation

This commit is contained in:
Blake Warner 2022-04-09 13:59:25 -04:00
parent b8631ba311
commit 5a083751cb
5 changed files with 333 additions and 337 deletions

View File

@ -40,7 +40,7 @@ s32 Player_GetSwordHeld(Player* player);
s32 Player_HasMirrorShieldEquipped(GlobalContext* globalCtx);
s32 Player_HasMirrorShieldSetToDraw(GlobalContext* globalCtx);
s32 Player_HoldsBrokenKnife(Player* player);
s32 Player_HoldsHookshot(Player* player);
s32 Player_CurrentActionItemIsHookshot(Player* player);
s32 Player_HoldsTwoHandedWeapon(Player* player);
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* player);
s32 Player_InCsMode(GlobalContext* globalCtx);
@ -59,7 +59,7 @@ void Player_ClearZTarget(Player* player);
void func_8008EE08(Player* player);
void func_8008EEAC(GlobalContext* globalCtx, Actor* actor);
s32 func_8008EF44(GlobalContext* globalCtx, s32 ammo);
s32 func_8008F128(Player* player);
s32 Player_HoldingHookshot(Player* player);
s32 func_8008F2BC(Player* player, s32 actionParam);
s32 Player_GetRoomTimer(GlobalContext* globalCtx);
void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* pthis);

View File

@ -81,6 +81,6 @@ enum PlayerState3
PLAYER_STATE3_4 = 1 << 4, // 0x00000010
PLAYER_STATE3_5 = 1 << 5, // 0x00000020
PLAYER_STATE3_6 = 1 << 6, // 0x00000040
PLAYER_STATE3_7 = 1 << 7, // 0x00000080
PLAYER_STATE3_HOOKSHOT = 1 << 7, // 0x00000080
};

View File

@ -357,7 +357,7 @@ void Player_SetBootData(GlobalContext* globalCtx, Player* pthis)
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* pthis)
{
return (pthis->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (pthis->csMode != 0) || (globalCtx->sceneLoadFlag == 0x14) || (pthis->stateFlags1 & PLAYER_STATE1_0) || (pthis->stateFlags3 & PLAYER_STATE3_7) ||
return (pthis->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (pthis->csMode != 0) || (globalCtx->sceneLoadFlag == 0x14) || (pthis->stateFlags1 & PLAYER_STATE1_0) || (pthis->stateFlags3 & PLAYER_STATE3_HOOKSHOT) ||
((gSaveContext.unk_13F0 != 0) && (Player_ActionToMagicSpell(pthis, pthis->itemActionParam) >= 0));
}
@ -608,14 +608,14 @@ s32 Player_ActionToMagicSpell(Player* pthis, s32 actionParam)
}
}
s32 Player_HoldsHookshot(Player* pthis)
s32 Player_CurrentActionItemIsHookshot(Player* pthis)
{
return (pthis->heldItemActionParam == PLAYER_AP_HOOKSHOT) || (pthis->heldItemActionParam == PLAYER_AP_LONGSHOT);
}
s32 func_8008F128(Player* pthis)
s32 Player_HoldingHookshot(Player* pthis)
{
return Player_HoldsHookshot(pthis) && (pthis->heldActor == NULL);
return Player_CurrentActionItemIsHookshot(pthis) && (pthis->heldActor == NULL);
}
s32 Player_ActionToSword(s32 actionParam)
@ -1151,7 +1151,7 @@ s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
}
else if(limbIndex == PLAYER_LIMB_R_HAND)
{
*dList = Player_HoldsHookshot(pthis) ? gLinkAdultRightHandHoldingHookshotFarDL : sHoldingFirstPersonWeaponDLs[(void)0, gSaveContext.linkAge];
*dList = Player_CurrentActionItemIsHookshot(pthis) ? gLinkAdultRightHandHoldingHookshotFarDL : sHoldingFirstPersonWeaponDLs[(void)0, gSaveContext.linkAge];
}
else
{
@ -1464,7 +1464,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
if(pthis->actor.scale.y >= 0.0f)
{
if(!Player_HoldsHookshot(pthis) && ((hookedActor = pthis->heldActor) != NULL))
if(!Player_CurrentActionItemIsHookshot(pthis) && ((hookedActor = pthis->heldActor) != NULL))
{
if(pthis->stateFlags1 & PLAYER_STATE1_9)
{

View File

@ -138,7 +138,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* pthis)
{
Player* player = (Player*)pthis->actor.parent;
if(Player_HoldsHookshot(player))
if(Player_CurrentActionItemIsHookshot(player))
{
if((player->itemActionParam != player->heldItemActionParam) || (player->actor.flags & ACTOR_FLAG_8) || ((player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_26))))
{
@ -181,7 +181,7 @@ void ArmsHook_Shoot(ArmsHook* pthis, GlobalContext* globalCtx)
f32 velocity;
s32 pad1;
if((pthis->actor.parent == NULL) || (!Player_HoldsHookshot(player)))
if((pthis->actor.parent == NULL) || (!Player_CurrentActionItemIsHookshot(player)))
{
ArmsHook_DetachHookFromActor(pthis);
Actor_Kill(&pthis->actor);

File diff suppressed because it is too large Load Diff