Bring over some player documentation from decomp (#3380)

* Document static variables

* Document enums and structs

* Document some functions

* Document more functions

* actionParam to itemAction and fix build

* Document some local variables and a define

* General cleanup

* Use PlayerMeleeWeaponAnimation enum when appropiate

* Document some function parameters and local variables

* Document some of player struct
This commit is contained in:
Pepe20129
2023-11-26 17:54:54 +01:00
committed by GitHub
parent d0d1d9c487
commit 5b81964ea5
15 changed files with 1916 additions and 1562 deletions

View File

@@ -573,7 +573,7 @@ uint8_t Player_IsCustomLinkModel() {
}
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
return (this->stateFlags1 & 0x20000080) || (this->csMode != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
return (this->stateFlags1 & 0x20000080) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
(this->stateFlags1 & 1) || (this->stateFlags3 & 0x80) ||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
}
@@ -668,7 +668,7 @@ void func_8008EC70(Player* this) {
}
void Player_SetEquipmentData(PlayState* play, Player* this) {
if (this->csMode != 0x56) {
if (this->csAction != 0x56) {
this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD));
this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC));
this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS));
@@ -893,8 +893,8 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
if (play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) { // Room is hot
var = 0;
} else if ((this->unk_840 > 80) &&
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->unk_840 >= 300))) { // Deep underwater
} else if ((this->underwaterTimer > 80) &&
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->underwaterTimer >= 300))) { // Deep underwater
var = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1)) ? 1 : 3;
} else if (this->stateFlags1 & 0x8000000) { // Swimming
var = 2;