mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-18 13:00:23 +00:00
Doc equips usage (inventory, current and player-specific constants) (#1142)
* Doc equips usage (inventory, current and player-specific constants) * Improve some comments * `currentSword`(`Item`) -> `currentSwordItemId` * Comments on the right in `D_801261F8` * Improve `sDebugSaveInventory.equipment` formatting with extra parentheses * Use constants for `sNewSaveInventory.equipment` * Run formatter * Make comments in z64save.h header a single line even if very long * `CHECK_OWNED_EQUIP_ALT` * One more use of `CHECK_OWNED_EQUIP` * `OWNED_EQUIP_FLAG` * `OWNED_EQUIP_FLAG_ALT` * Improve (?) giving sword by item id * "half-byte" -> "nibble" * Improve equips for setting kokiri sword * Improve (?) checking boots by item id * Improve (?) checking equips by item id * Fixup one spot assuming `EQUIP_TYPE_SWORD == 0` * Comments on the right in `sBootDListGroups`
This commit is contained in:
parent
72847660eb
commit
b9fded7b4e
27 changed files with 237 additions and 127 deletions
|
@ -494,7 +494,7 @@ s16 EnGo2_GetStateGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
u16 EnGo2_GetTextIdGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||
return GET_INFTABLE(INFTABLE_10F) ? 0x3042 : 0x3041;
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON)) {
|
||||
return GET_INFTABLE(INFTABLE_10E) ? 0x3038 : 0x3037;
|
||||
} else if (GET_INFTABLE(INFTABLE_10C)) {
|
||||
this->unk_20C = 0;
|
||||
|
@ -1158,7 +1158,7 @@ s32 EnGo2_IsCameraModified(EnGo2* this, GlobalContext* globalCtx) {
|
|||
(this->actor.params & 0x1F) == GORON_CITY_STAIRWELL || (this->actor.params & 0x1F) == GORON_DMT_BIGGORON ||
|
||||
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
|
||||
return true;
|
||||
} else if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
} else if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1215,7 +1215,7 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
|
|||
EnGo2_BiggoronWakingUp(this);
|
||||
break;
|
||||
case GORON_CITY_LINK:
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON)) {
|
||||
EnGo2_WakingUp(this);
|
||||
break;
|
||||
}
|
||||
|
@ -1552,7 +1552,8 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) &&
|
||||
CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON)) {
|
||||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
} else {
|
||||
this->actionFunc = EnGo2_CurledUp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue