mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +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
|
@ -234,7 +234,7 @@ u32 func_809EF73C(EnDns* this) {
|
|||
}
|
||||
|
||||
u32 func_809EF800(EnDns* this) {
|
||||
if (gBitFlags[4] & gSaveContext.inventory.equipment) {
|
||||
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SHIELD, EQUIP_INV_SHIELD_DEKU)) {
|
||||
return 1;
|
||||
}
|
||||
if (gSaveContext.rupees < this->dnsItemEntry->itemPrice) {
|
||||
|
|
|
@ -523,7 +523,8 @@ s32 EnGirlA_CanBuy_BluePotion(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
}
|
||||
|
||||
s32 EnGirlA_CanBuy_Longsword(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
if ((gBitFlags[2] & gSaveContext.inventory.equipment) && !(gBitFlags[3] & gSaveContext.inventory.equipment)) {
|
||||
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BGS) &&
|
||||
!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
|
@ -536,7 +537,7 @@ s32 EnGirlA_CanBuy_Longsword(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
}
|
||||
|
||||
s32 EnGirlA_CanBuy_HylianShield(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
if (gBitFlags[5] & gSaveContext.inventory.equipment) {
|
||||
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SHIELD, EQUIP_INV_SHIELD_HYLIAN)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
|
@ -549,7 +550,7 @@ s32 EnGirlA_CanBuy_HylianShield(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
}
|
||||
|
||||
s32 EnGirlA_CanBuy_DekuShield(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
if (gBitFlags[4] & gSaveContext.inventory.equipment) {
|
||||
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SHIELD, EQUIP_INV_SHIELD_DEKU)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
|
@ -565,7 +566,7 @@ s32 EnGirlA_CanBuy_GoronTunic(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gBitFlags[9] & gSaveContext.inventory.equipment) {
|
||||
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
|
@ -581,7 +582,7 @@ s32 EnGirlA_CanBuy_ZoraTunic(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gBitFlags[10] & gSaveContext.inventory.equipment) {
|
||||
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_ZORA)) {
|
||||
return CANBUY_RESULT_CANT_GET_NOW;
|
||||
}
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
|
|
|
@ -92,9 +92,9 @@ void EnGm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 func_80A3D7C8(void) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
return 0;
|
||||
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) {
|
||||
} else if (!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BGS)) {
|
||||
return 1;
|
||||
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) {
|
||||
} else if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
|
||||
return 2;
|
||||
} else {
|
||||
return 3;
|
||||
|
|
|
@ -117,7 +117,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
return 0x3041;
|
||||
}
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || GET_INFTABLE(INFTABLE_10D)) {
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON) || GET_INFTABLE(INFTABLE_10D)) {
|
||||
if (GET_INFTABLE(INFTABLE_10E)) {
|
||||
return 0x3038;
|
||||
} else {
|
||||
|
@ -648,7 +648,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
switch (this->actor.params & 0xF0) {
|
||||
case 0x00:
|
||||
Actor_SetScale(&this->actor, 0.008f);
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_GORON)) {
|
||||
EnGo_SetMovedPos(this, globalCtx);
|
||||
EnGo_SetupAction(this, EnGo_CurledUp);
|
||||
} else {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -207,9 +207,9 @@ static AnimationInfo sAnimationInfo[] = {
|
|||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 headInfoIndex; // EnHyHeadIndex
|
||||
/* 0x01 */ u8 skelInfoIndex2; // EnHySkeletonIndex, see EnHy#objBankIndexSkel2
|
||||
/* 0x01 */ u8 skelInfoIndex2; // EnHySkeletonIndex, see EnHy.objBankIndexSkel2
|
||||
/* 0x02 */ Color_RGBA8 envColorSeg8;
|
||||
/* 0x06 */ u8 skelInfoIndex1; // EnHySkeletonIndex, see EnHy#objBankIndexSkel1
|
||||
/* 0x06 */ u8 skelInfoIndex1; // EnHySkeletonIndex, see EnHy.objBankIndexSkel1
|
||||
/* 0x07 */ Color_RGBA8 envColorSeg9;
|
||||
/* 0x0B */ u8 animInfoIndex; // EnHyAnimationIndex
|
||||
} EnHyModelInfo; // size = 0xC
|
||||
|
|
|
@ -86,7 +86,7 @@ u16 EnKz_GetTextNoMaskAdult(GlobalContext* globalCtx, EnKz* this) {
|
|||
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_FROG) {
|
||||
if (!GET_INFTABLE(INFTABLE_139)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_ZORA)) {
|
||||
return 0x401F;
|
||||
} else {
|
||||
return 0x4012;
|
||||
|
@ -262,7 +262,7 @@ void func_80A9CB18(EnKz* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = CHECK_QUEST_ITEM(QUEST_SONG_SERENADE) ? 0x4045 : 0x401A;
|
||||
player->actor.textId = this->actor.textId;
|
||||
} else {
|
||||
this->actor.textId = CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2) ? 0x401F : 0x4012;
|
||||
this->actor.textId = CHECK_OWNED_EQUIP(EQUIP_TYPE_TUNIC, EQUIP_INV_TUNIC_ZORA) ? 0x401F : 0x4012;
|
||||
player->actor.textId = this->actor.textId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -379,7 +379,8 @@ u16 EnMd_GetTextKokiriForest(GlobalContext* globalCtx, EnMd* this) {
|
|||
return 0x1034;
|
||||
}
|
||||
|
||||
if ((CUR_EQUIP_VALUE(EQUIP_SHIELD) == 1) && (CUR_EQUIP_VALUE(EQUIP_SWORD) == 1)) {
|
||||
if ((CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_DEKU) &&
|
||||
(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_KOKIRI)) {
|
||||
return 0x1033;
|
||||
}
|
||||
|
||||
|
|
|
@ -295,15 +295,15 @@ void EnRr_SetupReleasePlayer(EnRr* this, GlobalContext* globalCtx) {
|
|||
this->wobbleSizeTarget = 2048.0f;
|
||||
tunic = 0;
|
||||
shield = 0;
|
||||
if (CUR_EQUIP_VALUE(EQUIP_SHIELD) != 3 /* Mirror shield */) {
|
||||
shield = Inventory_DeleteEquipment(globalCtx, EQUIP_SHIELD);
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_MIRROR) {
|
||||
shield = Inventory_DeleteEquipment(globalCtx, EQUIP_TYPE_SHIELD);
|
||||
if (shield != 0) {
|
||||
this->eatenShield = shield;
|
||||
this->retreat = true;
|
||||
}
|
||||
}
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TUNIC) != 1 /* Kokiri tunic */) {
|
||||
tunic = Inventory_DeleteEquipment(globalCtx, EQUIP_TUNIC);
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) != EQUIP_VALUE_TUNIC_KOKIRI) {
|
||||
tunic = Inventory_DeleteEquipment(globalCtx, EQUIP_TYPE_TUNIC);
|
||||
if (tunic != 0) {
|
||||
this->eatenTunic = tunic;
|
||||
this->retreat = true;
|
||||
|
|
|
@ -333,7 +333,8 @@ s32 EnXc_BoleroCS(EnXc* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnXc_SetupSerenadeAction(EnXc* this, GlobalContext* globalCtx) {
|
||||
// Player is adult and does not have iron boots and has not learned Serenade
|
||||
if (!CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !GET_EVENTCHKINF(EVENTCHKINF_52) && LINK_IS_ADULT) {
|
||||
if (!CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !GET_EVENTCHKINF(EVENTCHKINF_52) &&
|
||||
LINK_IS_ADULT) {
|
||||
this->action = SHEIK_ACTION_SERENADE;
|
||||
osSyncPrintf("水のセレナーデ シーク誕生!!!!!!!!!!!!!!!!!!\n");
|
||||
} else {
|
||||
|
@ -347,8 +348,8 @@ s32 EnXc_SerenadeCS(EnXc* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 stateFlags = player->stateFlags1;
|
||||
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !GET_EVENTCHKINF(EVENTCHKINF_52) && !(stateFlags & PLAYER_STATE1_29) &&
|
||||
!Gameplay_InCsMode(globalCtx)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && !GET_EVENTCHKINF(EVENTCHKINF_52) &&
|
||||
!(stateFlags & PLAYER_STATE1_29) && !Gameplay_InCsMode(globalCtx)) {
|
||||
Cutscene_SetSegment(globalCtx, &gIceCavernSerenadeCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_52); // Learned Serenade of Water Flag
|
||||
|
|
|
@ -3755,7 +3755,7 @@ void func_8083819C(Player* this, GlobalContext* globalCtx) {
|
|||
if (this->currentShield == PLAYER_SHIELD_DEKU) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_SHIELD, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 1);
|
||||
Inventory_DeleteEquipment(globalCtx, EQUIP_SHIELD);
|
||||
Inventory_DeleteEquipment(globalCtx, EQUIP_TYPE_SHIELD);
|
||||
Message_StartTextbox(globalCtx, 0x305F, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -14110,9 +14110,9 @@ void func_80852648(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
|
|||
this->heldItemId = ITEM_NONE;
|
||||
this->modelGroup = this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_AP_NONE);
|
||||
this->leftHandDLists = D_80125E08;
|
||||
Inventory_ChangeEquipment(EQUIP_SWORD, 2);
|
||||
Inventory_ChangeEquipment(EQUIP_TYPE_SWORD, EQUIP_VALUE_SWORD_MASTER);
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER;
|
||||
Inventory_DeleteEquipment(globalCtx, 0);
|
||||
Inventory_DeleteEquipment(globalCtx, EQUIP_TYPE_SWORD);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1437,7 +1437,7 @@ void FileChoose_FadeOut(GameState* thisx) {
|
|||
*/
|
||||
void FileChoose_LoadGame(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
u16 swordEquipMask;
|
||||
u16 swordEquipValue;
|
||||
s32 pad;
|
||||
|
||||
if (this->buttonIndex == FS_BTN_SELECT_FILE_1) {
|
||||
|
@ -1508,9 +1508,9 @@ void FileChoose_LoadGame(GameState* thisx) {
|
|||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KNIFE)) {
|
||||
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
|
||||
swordEquipMask = gEquipMasks[EQUIP_SWORD] & gSaveContext.equips.equipment;
|
||||
gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_SWORD];
|
||||
gSaveContext.inventory.equipment ^= (gBitFlags[swordEquipMask - 1] << gEquipShifts[EQUIP_SWORD]);
|
||||
swordEquipValue = (gEquipMasks[EQUIP_TYPE_SWORD] & gSaveContext.equips.equipment) >> (EQUIP_TYPE_SWORD * 4);
|
||||
gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_TYPE_SWORD];
|
||||
gSaveContext.inventory.equipment ^= OWNED_EQUIP_FLAG(EQUIP_TYPE_SWORD, swordEquipValue - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -575,18 +575,18 @@ void KaleidoScope_DrawDebugEditor(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
i = curSection - 0x34;
|
||||
i = curSection - 0x34; // 0 <= i < 4
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) {
|
||||
gSaveContext.inventory.equipment ^= (1 << gEquipShifts[i]);
|
||||
gSaveContext.inventory.equipment ^= OWNED_EQUIP_FLAG_ALT(i, 0);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CDOWN)) {
|
||||
gSaveContext.inventory.equipment ^= (2 << gEquipShifts[i]);
|
||||
gSaveContext.inventory.equipment ^= OWNED_EQUIP_FLAG_ALT(i, 1);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
|
||||
gSaveContext.inventory.equipment ^= (4 << gEquipShifts[i]);
|
||||
gSaveContext.inventory.equipment ^= OWNED_EQUIP_FLAG_ALT(i, 2);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
gSaveContext.inventory.equipment ^= (8 << gEquipShifts[i]);
|
||||
gSaveContext.inventory.equipment ^= OWNED_EQUIP_FLAG_ALT(i, 3);
|
||||
}
|
||||
}
|
||||
} else if (curSection < 0x44) {
|
||||
|
|
|
@ -92,7 +92,7 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) {
|
|||
pos.y = -130.0f;
|
||||
pos.z = -150.0f;
|
||||
scale = 0.046f;
|
||||
} else if (CUR_EQUIP_VALUE(EQUIP_SWORD) != 2) {
|
||||
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_MASTER) {
|
||||
pos.x = 25.0f;
|
||||
pos.y = -228.0f;
|
||||
pos.z = 60.0f;
|
||||
|
@ -107,8 +107,10 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) {
|
|||
rot.y = 32300;
|
||||
rot.x = rot.z = 0;
|
||||
Player_DrawPause(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &rot, scale,
|
||||
CUR_EQUIP_VALUE(EQUIP_SWORD), CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1, CUR_EQUIP_VALUE(EQUIP_SHIELD),
|
||||
CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1);
|
||||
SWORD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD)),
|
||||
TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)),
|
||||
SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD)),
|
||||
BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS)));
|
||||
}
|
||||
|
||||
void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
|
@ -420,7 +422,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
if ((pauseCtx->cursorY[PAUSE_EQUIP] == 0) && (pauseCtx->cursorX[PAUSE_EQUIP] == 3)) {
|
||||
if (gSaveContext.bgsFlag != 0) {
|
||||
cursorItem = ITEM_HEART_PIECE_2;
|
||||
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) {
|
||||
} else if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
|
||||
cursorItem = ITEM_SWORD_KNIFE;
|
||||
}
|
||||
}
|
||||
|
@ -481,7 +483,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS;
|
||||
}
|
||||
if ((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS) && (gSaveContext.bgsFlag == 0) &&
|
||||
(gBitFlags[3] & gSaveContext.inventory.equipment)) {
|
||||
CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KNIFE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ extern u8 gAmmoItems[];
|
|||
extern s16 D_8082AAEC[];
|
||||
extern s16 D_8082AB2C[];
|
||||
extern u8 gSlotAgeReqs[];
|
||||
extern u8 gEquipAgeReqs[][4];
|
||||
extern u8 gEquipAgeReqs[EQUIP_TYPE_MAX][4];
|
||||
extern u8 gAreaGsFlags[];
|
||||
|
||||
void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfxCtx);
|
||||
|
|
|
@ -171,7 +171,7 @@ u8 gSlotAgeReqs[] = {
|
|||
1, 9, 9, 0, 0, 9, 1, 9, 9, 0, 0, 9, 1, 9, 1, 0, 0, 9, 9, 9, 9, 9, 0, 1,
|
||||
};
|
||||
|
||||
u8 gEquipAgeReqs[][4] = {
|
||||
u8 gEquipAgeReqs[EQUIP_TYPE_MAX][4] = {
|
||||
{ 0, 1, 0, 0 },
|
||||
{ 9, 1, 9, 0 },
|
||||
{ 0, 9, 0, 0 },
|
||||
|
@ -2680,7 +2680,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[3] = 1;
|
||||
}
|
||||
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON)) {
|
||||
pauseCtx->worldMapPoints[3] = 2;
|
||||
}
|
||||
|
||||
|
@ -2834,7 +2834,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
pauseCtx->worldMapPoints[11] = 2;
|
||||
}
|
||||
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON)) {
|
||||
pauseCtx->worldMapPoints[11] = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue