mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-23 01:42:19 -05:00
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:
parent
bfc0ca5388
commit
ec8ec8d322
@ -558,7 +558,7 @@ const std::vector<PresetEntry> s6PresetEntries = {
|
|||||||
PRESET_ENTRY_S32("gRandomizeGanonTrial", 0),
|
PRESET_ENTRY_S32("gRandomizeGanonTrial", 0),
|
||||||
PRESET_ENTRY_S32("gRandomizeGerudoFortress", RO_GF_FAST),
|
PRESET_ENTRY_S32("gRandomizeGerudoFortress", RO_GF_FAST),
|
||||||
PRESET_ENTRY_S32("gRandomizeIceTraps", 0),
|
PRESET_ENTRY_S32("gRandomizeIceTraps", 0),
|
||||||
PRESET_ENTRY_S32("gRandomizeKakarikoGate", 1),
|
PRESET_ENTRY_S32("gRandomizeKakarikoGate", RO_KAK_GATE_OPEN),
|
||||||
PRESET_ENTRY_S32("gRandomizeMedallionCount", 6),
|
PRESET_ENTRY_S32("gRandomizeMedallionCount", 6),
|
||||||
PRESET_ENTRY_S32("gRandomizeMqDungeons", 0),
|
PRESET_ENTRY_S32("gRandomizeMqDungeons", 0),
|
||||||
PRESET_ENTRY_S32("gRandomizeRainbowBridge", 3),
|
PRESET_ENTRY_S32("gRandomizeRainbowBridge", 3),
|
||||||
@ -597,7 +597,7 @@ const std::vector<PresetEntry> hellModePresetEntries = {
|
|||||||
PRESET_ENTRY_S32("gRandomizeGsExpectSunsSong", 1),
|
PRESET_ENTRY_S32("gRandomizeGsExpectSunsSong", 1),
|
||||||
PRESET_ENTRY_S32("gRandomizeIceTraps", 4),
|
PRESET_ENTRY_S32("gRandomizeIceTraps", 4),
|
||||||
PRESET_ENTRY_S32("gRandomizeItemPool", RO_ITEM_POOL_MINIMAL),
|
PRESET_ENTRY_S32("gRandomizeItemPool", RO_ITEM_POOL_MINIMAL),
|
||||||
PRESET_ENTRY_S32("gRandomizeKakarikoGate", 1),
|
PRESET_ENTRY_S32("gRandomizeKakarikoGate", RO_KAK_GATE_OPEN),
|
||||||
PRESET_ENTRY_S32("gRandomizeKeysanity", 5),
|
PRESET_ENTRY_S32("gRandomizeKeysanity", 5),
|
||||||
PRESET_ENTRY_S32("gRandomizeLinksPocket", 3),
|
PRESET_ENTRY_S32("gRandomizeLinksPocket", 3),
|
||||||
PRESET_ENTRY_S32("gRandomizeMqDungeons", 2),
|
PRESET_ENTRY_S32("gRandomizeMqDungeons", 2),
|
||||||
|
@ -603,9 +603,9 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
|||||||
break;
|
break;
|
||||||
case RSK_KAK_GATE:
|
case RSK_KAK_GATE:
|
||||||
if(it.value() == "Closed") {
|
if(it.value() == "Closed") {
|
||||||
gSaveContext.randoSettings[index].value = RO_GENERIC_OFF;
|
gSaveContext.randoSettings[index].value = RO_KAK_GATE_CLOSED;
|
||||||
} else if(it.value() == "Open") {
|
} else if(it.value() == "Open") {
|
||||||
gSaveContext.randoSettings[index].value = RO_GENERIC_ON;
|
gSaveContext.randoSettings[index].value = RO_KAK_GATE_OPEN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RSK_DOOR_OF_TIME:
|
case RSK_DOOR_OF_TIME:
|
||||||
@ -2561,7 +2561,7 @@ void GenerateRandomizerImgui() {
|
|||||||
std::unordered_map<RandomizerSettingKey, u8> cvarSettings;
|
std::unordered_map<RandomizerSettingKey, u8> cvarSettings;
|
||||||
cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", 0);
|
cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", 0);
|
||||||
cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", 0);
|
cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", 0);
|
||||||
cvarSettings[RSK_KAK_GATE] = CVar_GetS32("gRandomizeKakarikoGate", 0);
|
cvarSettings[RSK_KAK_GATE] = CVar_GetS32("gRandomizeKakarikoGate", RO_KAK_GATE_CLOSED);
|
||||||
cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED);
|
cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED);
|
||||||
cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0);
|
cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0);
|
||||||
cvarSettings[RSK_STARTING_AGE] = CVar_GetS32("gRandomizeStartingAge", 0);
|
cvarSettings[RSK_STARTING_AGE] = CVar_GetS32("gRandomizeStartingAge", 0);
|
||||||
@ -2841,7 +2841,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Open - The gate is always open. The happy mask shop "
|
"Open - The gate is always open. The happy mask shop "
|
||||||
"will open immediately after obtaining Zelda's letter."
|
"will open immediately after obtaining Zelda's letter."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, 2, RO_GENERIC_DONT_SKIP);
|
UIWidgets::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, 2, RO_KAK_GATE_CLOSED);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
|
@ -1105,6 +1105,10 @@ typedef enum RandoOption {
|
|||||||
RO_GF_FAST,
|
RO_GF_FAST,
|
||||||
RO_GF_OPEN,
|
RO_GF_OPEN,
|
||||||
|
|
||||||
|
//Kakariko Gate settings (closed/open)
|
||||||
|
RO_KAK_GATE_CLOSED = 0,
|
||||||
|
RO_KAK_GATE_OPEN,
|
||||||
|
|
||||||
//Rainbow Bridge settings (always open, vanilla, stones, medallions, dungeon rewards, dungeons, tokens)
|
//Rainbow Bridge settings (always open, vanilla, stones, medallions, dungeon rewards, dungeons, tokens)
|
||||||
RO_BRIDGE_ALWAYS_OPEN = 0,
|
RO_BRIDGE_ALWAYS_OPEN = 0,
|
||||||
RO_BRIDGE_VANILLA,
|
RO_BRIDGE_VANILLA,
|
||||||
|
@ -404,11 +404,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int kakGate = Randomizer_GetSettingValue(RSK_KAK_GATE);
|
if (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN) {
|
||||||
switch (kakGate) {
|
|
||||||
case 1: // open
|
|
||||||
gSaveContext.infTable[7] |= 0x40;
|
gSaveContext.infTable[7] |= 0x40;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) Item_Give(NULL, ITEM_SWORD_KOKIRI);
|
if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) Item_Give(NULL, ITEM_SWORD_KOKIRI);
|
||||||
|
@ -46,7 +46,7 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->somePos.z = thisx->world.pos.z;
|
this->somePos.z = thisx->world.pos.z;
|
||||||
if (((gSaveContext.infTable[7] & 0x40) ||
|
if (((gSaveContext.infTable[7] & 0x40) ||
|
||||||
(!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) ||
|
(!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)) {
|
(play->sceneNum == SCENE_SPOT01)) {
|
||||||
thisx->world.pos.x = -89.0f;
|
thisx->world.pos.x = -89.0f;
|
||||||
thisx->world.pos.z = -1375.0f;
|
thisx->world.pos.z = -1375.0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user