use forest enum values instead of magic numbers (#2038)

This commit is contained in:
briaguya 2022-11-29 20:32:22 -05:00 committed by GitHub
commit 06df45efc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 12 deletions

View file

@ -372,15 +372,15 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
int openForest = Randomizer_GetSettingValue(RSK_FOREST);
switch (openForest) {
case 0: // closed
case RO_FOREST_CLOSED:
break;
case 1: // open
case RO_FOREST_CLOSED_DEKU:
Flags_SetEventChkInf(7);
break;
case RO_FOREST_OPEN:
Flags_SetEventChkInf(7);
gSaveContext.eventChkInf[0] |= 0x10;
break;
case 2: // closed deku
Flags_SetEventChkInf(7);
break;
}
int startingAge = Randomizer_GetSettingValue(RSK_STARTING_AGE);

View file

@ -487,7 +487,6 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) {
// if we have beaten deku tree or have open forest turned on
// or have already shown mido we have an equipped sword/shield
if (Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) ||
Randomizer_GetSettingValue(RSK_FOREST) == 1 ||
gSaveContext.eventChkInf[0] & 0x10) {
return 0;
}