1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 19:04:38 +00:00

Introduce Player csMode enum (#1462)

* player csmode enum

* cleanup

* missed one, player2

* spell out enum name

* use CSMODE_MAX for data
This commit is contained in:
engineer124 2022-12-12 22:22:56 -05:00 committed by GitHub
parent 0aff024c01
commit aa48c66e10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 655 additions and 535 deletions

View file

@ -488,7 +488,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
}
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) ||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != PLAYER_CSMODE_NONE) ||
(play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) ||
(this->stateFlags3 & PLAYER_STATE3_7) ||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
@ -577,7 +577,7 @@ void func_8008EC70(Player* this) {
}
void Player_SetEquipmentData(PlayState* play, Player* this) {
if (this->csMode != 0x56) {
if (this->csMode != PLAYER_CSMODE_86) {
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));