mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-29 00:06:33 +00:00
Rename item get flags for Forest Stage upgrades (#2333)
* Rename item get flags for Forest Stage upgrades * Fix Jenkins build error * Document shared flag bug * Rename shared flag * Massive documenting comments * GDI - remove one trailing whitespace
This commit is contained in:
parent
c780c4e147
commit
c57dff4f78
4 changed files with 12 additions and 7 deletions
|
@ -699,8 +699,11 @@ typedef enum LinkAge {
|
|||
#define ITEMGETINF_1B 0x1B
|
||||
#define ITEMGETINF_1C 0x1C
|
||||
#define ITEMGETINF_1D 0x1D
|
||||
#define ITEMGETINF_1E 0x1E
|
||||
#define ITEMGETINF_1F 0x1F
|
||||
#define ITEMGETINF_FOREST_STAGE_STICK_UPGRADE 0x1E
|
||||
// This flag is shared by two events; It is set when obtaining the Deku Nut upgrade at the Forest Stage and when obtaining Poachers Saw.
|
||||
// This will make obtaining the Deku Nut upgrade impossible if Poachers Saw is obtained first.
|
||||
// This flag is never read for the Poachers Saw event, so the overlap only causes an issue for the Deku Nut Upgrade. It will not prevent obtaining Poachers Saw.
|
||||
#define ITEMGETINF_FOREST_STAGE_NUT_UPGRADE 0x1F
|
||||
#define ITEMGETINF_23 0x23
|
||||
#define ITEMGETINF_24 0x24
|
||||
#define ITEMGETINF_25 0x25
|
||||
|
|
|
@ -1828,7 +1828,8 @@ u8 Item_Give(PlayState* play, u8 item) {
|
|||
}
|
||||
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
|
||||
if (item == ITEM_POACHERS_SAW) {
|
||||
SET_ITEMGETINF(ITEMGETINF_1F);
|
||||
//! @bug Setting this shared flag makes getting the Deku Nut upgrade impossible
|
||||
SET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE);
|
||||
}
|
||||
|
||||
temp = INV_CONTENT(item);
|
||||
|
|
|
@ -156,7 +156,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
|
|||
delay = 0;
|
||||
switch (Player_GetMask(play)) {
|
||||
case PLAYER_MASK_SKULL:
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1E)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_STICK_UPGRADE)) {
|
||||
reaction = DNT_SIGNAL_CELEBRATE;
|
||||
this->prize = DNT_PRIZE_STICK;
|
||||
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_SARIA_THEME);
|
||||
|
@ -164,7 +164,8 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
|
|||
}
|
||||
FALLTHROUGH;
|
||||
case PLAYER_MASK_TRUTH:
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1F) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE) &&
|
||||
(Player_GetMask(play) != PLAYER_MASK_SKULL)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->prize = DNT_PRIZE_NUTS;
|
||||
|
|
|
@ -282,7 +282,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, PlayState* play) {
|
|||
PRINTF("実 \n");
|
||||
PRINTF("実 \n");
|
||||
PRINTF("実 \n");
|
||||
SET_ITEMGETINF(ITEMGETINF_1F);
|
||||
SET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE);
|
||||
} else {
|
||||
// "stick"
|
||||
PRINTF("棒 \n");
|
||||
|
@ -291,7 +291,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, PlayState* play) {
|
|||
PRINTF("棒 \n");
|
||||
PRINTF("棒 \n");
|
||||
PRINTF("棒 \n");
|
||||
SET_ITEMGETINF(ITEMGETINF_1E);
|
||||
SET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_STICK_UPGRADE);
|
||||
}
|
||||
this->actor.textId = 0;
|
||||
if ((this->stage != NULL) && (this->stage->actor.update != NULL)) {
|
||||
|
|
Loading…
Reference in a new issue