Player Equip Docs (#3282)
* hopefully everything * update docs for MS shuffle sections
This commit is contained in:
@@ -191,22 +191,22 @@ void Inventory_ChangeEquipment(s16 equipment, u16 value) {
|
||||
u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
u16 sp26 = gSaveContext.equips.equipment & gEquipMasks[equipment];
|
||||
u16 equipValue = gSaveContext.equips.equipment & gEquipMasks[equipment];
|
||||
|
||||
// "Erasing equipment item = %d zzz=%d"
|
||||
osSyncPrintf("装備アイテム抹消 = %d zzz=%d\n", equipment, sp26);
|
||||
osSyncPrintf("装備アイテム抹消 = %d zzz=%d\n", equipment, equipValue);
|
||||
|
||||
if (sp26) {
|
||||
sp26 >>= gEquipShifts[equipment];
|
||||
if (equipValue) {
|
||||
equipValue >>= gEquipShifts[equipment];
|
||||
|
||||
gSaveContext.equips.equipment &= gEquipNegMasks[equipment];
|
||||
gSaveContext.inventory.equipment ^= gBitFlags[sp26 - 1] << gEquipShifts[equipment];
|
||||
gSaveContext.inventory.equipment ^= OWNED_EQUIP_FLAG(equipment, equipValue - 1);
|
||||
|
||||
if (equipment == EQUIP_TUNIC) {
|
||||
gSaveContext.equips.equipment |= 0x0100;
|
||||
if (equipment == EQUIP_TYPE_TUNIC) {
|
||||
gSaveContext.equips.equipment |= EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4);
|
||||
}
|
||||
|
||||
if (equipment == EQUIP_SWORD) {
|
||||
if (equipment == EQUIP_TYPE_SWORD) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
|
||||
gSaveContext.infTable[29] = 1;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
|
||||
play->pauseCtx.cursorSpecialPos = PAUSE_CURSOR_PAGE_LEFT;
|
||||
}
|
||||
|
||||
return sp26;
|
||||
return equipValue;
|
||||
}
|
||||
|
||||
void Inventory_ChangeUpgrade(s16 upgrade, s16 value) {
|
||||
|
||||
Reference in New Issue
Block a user