icon_item_static and icon_item_24_static documented (#1297)

* extract_archives.py

* autogenerated xmls

* build OK

* cleanup

* Use symbols in gItemIcons

* change how archives are generated

* makeyar in C

* Rename segments

* rename .archive.o to .yar.o

* Explanation at the top of programs

* fix progress calculation

* Ignore archives in progress script

* merge

* document icon items

* cleanup

* remove duplicate headers

* jap -> jpn

* PR review

* link human

* PR Review

* missed some

---------

Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
engineer124
2023-06-24 00:57:01 +10:00
committed by GitHub
parent 11dac8d020
commit aa9e368561
26 changed files with 499 additions and 503 deletions
+9 -10
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "z64snap.h"
#include "z64view.h"
#include "archives/icon_item_static/icon_item_static_yar.h"
#include "interface/parameter_static/parameter_static.h"
#include "interface/do_action_static/do_action_static.h"
#include "misc/story_static/story_static.h"
@@ -8,8 +9,6 @@
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
#include "overlays/actors/ovl_En_Mm3/z_en_mm3.h"
extern TexturePtr D_08095AC0; // gMagicArrowEquipEffectTex
typedef enum {
/* 0 */ PICTO_BOX_STATE_OFF, // Not using the pictograph
/* 1 */ PICTO_BOX_STATE_LENS, // Looking through the lens of the pictograph
@@ -2057,7 +2056,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
} else {
// End of special item cases. Apply restrictions to buttons
if (interfaceCtx->restrictions.tradeItems != 0) {
if (((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOON_TEAR) &&
if (((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOONS_TEAR) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_PENDANT_OF_MEMORIES)) ||
((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_BOTTLE) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_OBABA_DRINK)) ||
@@ -2068,7 +2067,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
gSaveContext.buttonStatus[i] = BTN_DISABLED;
}
} else if (interfaceCtx->restrictions.tradeItems == 0) {
if (((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOON_TEAR) &&
if (((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOONS_TEAR) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_PENDANT_OF_MEMORIES)) ||
((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_BOTTLE) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_OBABA_DRINK)) ||
@@ -2115,7 +2114,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
}
if (interfaceCtx->restrictions.all != 0) {
if (!((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOON_TEAR) &&
if (!((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOONS_TEAR) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_PENDANT_OF_MEMORIES)) &&
!((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_BOTTLE) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_OBABA_DRINK)) &&
@@ -2130,7 +2129,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
}
}
} else if (interfaceCtx->restrictions.all == 0) {
if (!((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOON_TEAR) &&
if (!((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_MOONS_TEAR) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_PENDANT_OF_MEMORIES)) &&
!((GET_CUR_FORM_BTN_ITEM(i) >= ITEM_BOTTLE) &&
(GET_CUR_FORM_BTN_ITEM(i) <= ITEM_OBABA_DRINK)) &&
@@ -2899,10 +2898,10 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
} else if ((item >= ITEM_MOON_TEAR) && (item <= ITEM_MASK_GIANT)) {
} else if ((item >= ITEM_MOONS_TEAR) && (item <= ITEM_MASK_GIANT)) {
temp = INV_CONTENT(item);
INV_CONTENT(item) = item;
if ((item >= ITEM_MOON_TEAR) && (item <= ITEM_PENDANT_OF_MEMORIES) && (temp != ITEM_NONE)) {
if ((item >= ITEM_MOONS_TEAR) && (item <= ITEM_PENDANT_OF_MEMORIES) && (temp != ITEM_NONE)) {
for (i = EQUIP_SLOT_C_LEFT; i <= EQUIP_SLOT_C_RIGHT; i++) {
if (temp == GET_CUR_FORM_BTN_ITEM(i)) {
SET_CUR_FORM_BTN_ITEM(i, item);
@@ -3066,7 +3065,7 @@ u8 Item_CheckObtainabilityImpl(u8 item) {
}
}
}
} else if ((item >= ITEM_MOON_TEAR) && (item <= ITEM_MASK_GIANT)) {
} else if ((item >= ITEM_MOONS_TEAR) && (item <= ITEM_MASK_GIANT)) {
return ITEM_NONE;
}
@@ -4295,7 +4294,7 @@ void Interface_DrawPauseMenuEquippingIcons(PlayState* play) {
}
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[16], 4, 0);
gDPLoadTextureBlock(OVERLAY_DISP++, &D_08095AC0, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0,
gDPLoadTextureBlock(OVERLAY_DISP++, gMagicArrowEquipEffectTex, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
}