Use enum for kak gate (#2043)

Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: David Chavez <david@dcvz.io>
This commit is contained in:
briaguya 2022-11-29 18:33:38 -05:00 committed by GitHub
commit ec8ec8d322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 12 deletions

View file

@ -404,11 +404,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
break;
}
int kakGate = Randomizer_GetSettingValue(RSK_KAK_GATE);
switch (kakGate) {
case 1: // open
gSaveContext.infTable[7] |= 0x40;
break;
if (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN) {
gSaveContext.infTable[7] |= 0x40;
}
if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) Item_Give(NULL, ITEM_SWORD_KOKIRI);

View file

@ -46,7 +46,7 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
this->somePos.z = thisx->world.pos.z;
if (((gSaveContext.infTable[7] & 0x40) ||
(!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) ||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_KAK_GATE))) &&
(gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
(play->sceneNum == SCENE_SPOT01)) {
thisx->world.pos.x = -89.0f;
thisx->world.pos.z = -1375.0f;