Skip to content

Commit

Permalink
Fix Adult 1 cutscene taking ocarina off of D-up
Browse files Browse the repository at this point in the history
Merge tag 'tags/7.0.0' into new_item_menu

Spock Alfa
  • Loading branch information
lilDavid committed Jun 21, 2023
1 parent 6852954 commit 39d032f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
18 changes: 12 additions & 6 deletions soh/src/code/z_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,26 +1424,32 @@ void Inventory_SwapAgeEquipment(void) {

if (gSaveContext.adultEquips.buttonItems[0] == ITEM_NONE) {
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER;
gSaveContext.equips.equipment = 0x1122;

// Nuts on C-left (if present)
if (gSaveContext.inventory.items[SLOT_NUT] != ITEM_NONE) {
gSaveContext.equips.buttonItems[1] = ITEM_NUT;
gSaveContext.equips.cButtonSlots[0] = SLOT_NUT;
} else {
gSaveContext.equips.buttonItems[1] = gSaveContext.equips.cButtonSlots[0] = ITEM_NONE;
}

// Bombs on C-down
gSaveContext.equips.buttonItems[2] = ITEM_BOMB;
gSaveContext.equips.buttonItems[3] = gSaveContext.inventory.items[SLOT_OCARINA];
gSaveContext.equips.cButtonSlots[1] = SLOT_BOMB;
gSaveContext.equips.cButtonSlots[2] = SLOT_OCARINA;
gSaveContext.equips.equipment = 0x1122;

// Set the dpad to nothing
gSaveContext.equips.buttonItems[4] = ITEM_NONE;
// Nothing on C-right
gSaveContext.equips.buttonItems[3] = ITEM_NONE;
gSaveContext.equips.cButtonSlots[2] = SLOT_NONE;

// Ocarina on D-up
gSaveContext.equips.buttonItems[4] = gSaveContext.inventory.items[SLOT_OCARINA];
gSaveContext.equips.cButtonSlots[3] = SLOT_OCARINA;

// Set the rest of the d-pad to nothing
gSaveContext.equips.buttonItems[5] = ITEM_NONE;
gSaveContext.equips.buttonItems[6] = ITEM_NONE;
gSaveContext.equips.buttonItems[7] = ITEM_NONE;
gSaveContext.equips.cButtonSlots[3] = SLOT_NONE;
gSaveContext.equips.cButtonSlots[4] = SLOT_NONE;
gSaveContext.equips.cButtonSlots[5] = SLOT_NONE;
gSaveContext.equips.cButtonSlots[6] = SLOT_NONE;
Expand Down
9 changes: 4 additions & 5 deletions soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,25 +238,24 @@ void KaleidoScope_DrawMagicArrowIcon(PlayState* play, s16 offset, u8 itemId) {
xOffset = 0;
yOffset = offset;
vtx = 0;
source = "assets/textures/icon_item_static/gFireArrowPower";
source = "__OTR__textures/icon_item_static/gFireArrowPower";
break;
case ITEM_ARROW_ICE:
xOffset = -offset;
yOffset = 0;
vtx = 4;
source = "assets/textures/icon_item_static/gIceArrowPower";
source = "__OTR__textures/icon_item_static/gIceArrowPower";
break;
case ITEM_ARROW_LIGHT:
xOffset = offset;
yOffset = 0;
vtx = 8;
source = "assets/textures/icon_item_static/gLightArrowPower";
source = "__OTR__textures/icon_item_static/gLightArrowPower";
break;
default:
return;
}

source = ResourceMgr_LoadFileRaw(source);
KaleidoScope_DrawBowMenuTexture(play, xOffset, yOffset, 12, vtx, source, 16);
}

Expand Down Expand Up @@ -287,7 +286,7 @@ void KaleidoScope_DrawSelectableArrow(PlayState* play, s16 offset, u8 itemId) {
xOffset = 0;
yOffset = -offset;
vtx = 12;
tex = ResourceMgr_LoadFileRaw("assets/textures/icon_item_static/gArrowIconTex");
tex = "__OTR__textures/icon_item_static/gArrowIconTex";
break;
default:
return;
Expand Down

0 comments on commit 39d032f

Please sign in to comment.