From ecb10e6ac2203c49d07eb4ccc5ff8280ab22f3f8 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 27 Dec 2022 19:33:40 -0500 Subject: [PATCH 01/15] chore: bump sdl version in appimage (#2288) Co-authored-by: briaguya --- .github/workflows/generate-builds.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-builds.yml b/.github/workflows/generate-builds.yml index 5e23a550f..a91142541 100644 --- a/.github/workflows/generate-builds.yml +++ b/.github/workflows/generate-builds.yml @@ -101,9 +101,9 @@ jobs: - name: Install latest SDL run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz - tar -xzf SDL2-2.24.1.tar.gz - cd SDL2-2.24.1 + wget https://www.libsdl.org/release/SDL2-2.26.1.tar.gz + tar -xzf SDL2-2.26.1.tar.gz + cd SDL2-2.26.1 ./configure make -j 10 sudo make install From 156de816fb73a42b0792f45ffd0162a8969c4add Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Tue, 17 Jan 2023 18:40:05 +0100 Subject: [PATCH 02/15] FIX: Equip now message (#2286) --- soh/soh/OTRGlobals.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index d63aee918..a5b390870 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1796,11 +1796,11 @@ extern "C" int GetEquipNowMessage(char* buffer, char* src, const int maxBufferSi std::string postfix; if (gSaveContext.language == LANGUAGE_FRA) { - postfix = "\x04\x1A\x08" "Désirez-vous l'équiper maintenant?" "\x09&&" + postfix = "\x04\x1A\x08" "D\x96sirez-vous l'\x96quiper maintenant?" "\x09&&" "\x1B%g" "Oui" "&" "Non" "%w\x02"; } else if (gSaveContext.language == LANGUAGE_GER) { - postfix = "\x04\x1A\x08" "Möchtest Du es jetzt ausrüsten?" "\x09&&" + postfix = "\x04\x1A\x08" "M""\x9A""chtest Du es jetzt ausr\x9Esten?" "\x09&&" "\x1B%g" "Ja!" "&" "Nein!" "%w\x02"; } else { From 1e258318a1b9e317ad0e3b37e8930a8ebfef0b5c Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 17 Jan 2023 13:17:00 -0500 Subject: [PATCH 03/15] fix: properly randomize mirror shield and silver gaunts chests when using only an mq otr (#2291) --- soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp index 77b89789f..f29773c3a 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp @@ -587,8 +587,8 @@ std::map rcObjects = { RC_OBJECT(RC_WATER_TEMPLE_MORPHA_HEART, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_WATER_TEMPLE, ACTOR_ITEM_B_HEART, SCENE_MIZUSIN_BS, 0x00, GI_HEART_CONTAINER, "Morpha Heart Container", "Water Temple Morpha Heart Container"), - RC_OBJECT(RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 1707, GI_GAUNTLETS_SILVER, "Silver Gauntlets Chest", "Spirit Temple Silver Gauntlets Chest"), - RC_OBJECT(RC_SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 13673, GI_SHIELD_MIRROR, "Mirror Shield Chest", "Spirit Temple Mirror Shield Chest"), + RC_OBJECT(RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 1707, GI_GAUNTLETS_SILVER, "Silver Gauntlets Chest", "Spirit Temple Silver Gauntlets Chest"), + RC_OBJECT(RC_SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_SPOT11, 13673, GI_SHIELD_MIRROR, "Mirror Shield Chest", "Spirit Temple Mirror Shield Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_CHILD_BRIDGE_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, 21800, GI_SHIELD_DEKU, "Child Bridge Chest", "Spirit Temple Child Bridge Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_CHILD_EARLY_TORCHES_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, -30656, GI_KEY_SMALL, "Child Early Torches Chest", "Spirit Temple Child Early Torches Chest"), RC_OBJECT(RC_SPIRIT_TEMPLE_COMPASS_CHEST, RCVORMQ_VANILLA, RCTYPE_MAP_COMPASS, RCAREA_SPIRIT_TEMPLE, ACTOR_EN_BOX, SCENE_JYASINZOU, 14340, GI_COMPASS, "Compass Chest", "Spirit Temple Compass Chest"), From 5b2a50cac21ee794032fa4dc660f3e63260a67e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaro=20Mart=C3=ADnez?= Date: Tue, 17 Jan 2023 14:01:45 -0500 Subject: [PATCH 04/15] Remove repeated preset entries (#2294) --- soh/soh/Enhancements/presets.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index 94b32656f..8c6a3cab6 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -350,7 +350,7 @@ const std::vector enhancedPresetEntries = { // Text Speed (1 to 5) PRESET_ENTRY_S32("gTextSpeed", 5), // King Zora Speed (1 to 5) - PRESET_ENTRY_S32("gMweepSpeed", 2), + PRESET_ENTRY_S32("gMweepSpeed", 5), // Faster Block Push (+0 to +5) PRESET_ENTRY_S32("gFasterBlockPush", 5), // Better Owl @@ -394,8 +394,6 @@ const std::vector enhancedPresetEntries = { PRESET_ENTRY_S32("gBombchusOOB", 1), // Skip save confirmation PRESET_ENTRY_S32("gSkipSaveConfirmation", 1), - // King Zora Speed (1 to 5) - PRESET_ENTRY_S32("gMweepSpeed", 5), // Biggoron Forge Time (0 to 3) PRESET_ENTRY_S32("gForgeTime", 0), // Vine/Ladder Climb speed (+0 to +12) @@ -467,7 +465,7 @@ const std::vector randomizerPresetEntries = { // Text Speed (1 to 5) PRESET_ENTRY_S32("gTextSpeed", 5), // King Zora Speed (1 to 5) - PRESET_ENTRY_S32("gMweepSpeed", 2), + PRESET_ENTRY_S32("gMweepSpeed", 5), // Faster Block Push (+0 to +5) PRESET_ENTRY_S32("gFasterBlockPush", 5), // Better Owl @@ -480,9 +478,6 @@ const std::vector randomizerPresetEntries = { // Inject Item Counts in messages PRESET_ENTRY_S32("gInjectItemCounts", 1), - // Pause link animation (0 to 16) - PRESET_ENTRY_S32("gPauseLiveLink", 1), - // Dynamic Wallet Icon PRESET_ENTRY_S32("gDynamicWalletIcon", 1), // Always show dungeon entrances @@ -511,8 +506,6 @@ const std::vector randomizerPresetEntries = { PRESET_ENTRY_S32("gBombchusOOB", 1), // Skip save confirmation PRESET_ENTRY_S32("gSkipSaveConfirmation", 1), - // King Zora Speed (1 to 5) - PRESET_ENTRY_S32("gMweepSpeed", 5), // Biggoron Forge Time (0 to 3) PRESET_ENTRY_S32("gForgeTime", 0), // Vine/Ladder Climb speed (+0 to +12) From 6ae28273d15ecaeb8a1105cb75d68740b4f15f4a Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Tue, 17 Jan 2023 13:23:00 -0600 Subject: [PATCH 05/15] Fix Ganon Boss Key for MQ only otrs (#2295) --- soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp index f29773c3a..0f4bcfe0a 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp @@ -776,7 +776,7 @@ std::map rcObjects = { RC_OBJECT(RC_GERUDO_TRAINING_GROUND_MQ_HEAVY_BLOCK_CHEST, RCVORMQ_MQ, RCTYPE_STANDARD, RCAREA_GERUDO_TRAINING_GROUND, ACTOR_EN_BOX, SCENE_MEN, 31394, GI_RUPEE_PURPLE, "MQ Heavy Block Chest", "Gerudo Training Grounds MQ Heavy Block Chest"), - RC_OBJECT(RC_GANONS_TOWER_BOSS_KEY_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANON, 10219, GI_KEY_BOSS, "Boss Key Chest", "Ganon's Tower Boss Key Chest"), + RC_OBJECT(RC_GANONS_TOWER_BOSS_KEY_CHEST, RCVORMQ_BOTH, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANON, 10219, GI_KEY_BOSS, "Boss Key Chest", "Ganon's Tower Boss Key Chest"), RC_OBJECT(RC_GANONS_CASTLE_FOREST_TRIAL_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 30857, GI_MAGIC_LARGE, "Forest Trial Chest", "Ganon's Castle Forest Trial Chest"), RC_OBJECT(RC_GANONS_CASTLE_WATER_TRIAL_LEFT_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 24455, GI_ICE_TRAP, "Water Trial Left Chest", "Ganon's Castle Water Trial Left Chest"), RC_OBJECT(RC_GANONS_CASTLE_WATER_TRIAL_RIGHT_CHEST, RCVORMQ_VANILLA, RCTYPE_STANDARD, RCAREA_GANONS_CASTLE, ACTOR_EN_BOX, SCENE_GANONTIKA, 22790, GI_HEART, "Water Trial Right Chest", "Ganon's Castle Water Trial Right Chest"), From 7f06087cefca6b98b1ddf21459822592ee45a280 Mon Sep 17 00:00:00 2001 From: Andrew Van Caem Date: Wed, 18 Jan 2023 06:46:42 +1100 Subject: [PATCH 06/15] Altered save flag docs concerning events in Mido's house (#2311) --- soh/soh/Enhancements/debugger/debugSaveEditor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h index b857cc21c..e4b4ad76e 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.h +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -36,6 +36,7 @@ const std::vector flagTables = { { 0x09, "Used Deku Tree Blue Warp" }, { 0x0A, "Played Saria's Song for Mido as Adult" }, { 0x0C, "Met Deku Tree" }, + { 0x0F, "Spoke to Mido about Saria's whereabouts" }, { 0x10, "Spoke to Child Malon at Castle or Market" }, { 0x11, "Spoke to Ingo at Ranch before Talon returns" }, { 0x12, "Obtained Pocket Egg" }, @@ -219,7 +220,7 @@ const std::vector flagTables = { { 0x24, "Spoke to Kokiri Boy Cutting Grass" }, { 0x26, "Spoke to Kokiri Girl on Shop Awning" }, { 0x28, "Spoke to Kokiri Girl About Training Center" }, - { 0x31, "Spoke to Kokiri Boy on Bed in Mido's House" }, + { 0x41, "Spoke to Kokiri Boy on Bed in Mido's House" }, { 0x51, "Spoke to Kokiri Girl in Saria's House" }, { 0x59, "Spoke to Know-It-All Bro. About Temple" }, { 0x61, "Spoke to Know-It-All Bro. About Saria" }, From fda198db761d394adeb3215c1c04b1eef4aeffd8 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:01:45 -0500 Subject: [PATCH 07/15] Fix: Reset waterbox collisions in Lake Hylia and Morphas room (#2346) --- .../actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c | 9 +++++++++ soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index c9e37943e..7bc357263 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -30,6 +30,8 @@ typedef enum { #define WATER_LEVEL_LOWERED (WATER_LEVEL_RAISED - 680) #define WATER_LEVEL_RIVER_LOWERED (WATER_LEVEL_RIVER_RAISED - 80) +#define WATER_LEVEL_RIVER_LOWER_Z 2203 + void BgSpot06Objects_Init(Actor* thisx, PlayState* play); void BgSpot06Objects_Destroy(Actor* thisx, PlayState* play); void BgSpot06Objects_Update(Actor* thisx, PlayState* play); @@ -210,6 +212,9 @@ void BgSpot06Objects_Destroy(Actor* thisx, PlayState* play) { break; } + // Due to Ships resource caching, the water box collisions for the river have to be manually reset + play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z; + if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) { // For randomizer when leaving lake hylia while the water level is lowered, // reset the "raise lake hylia water" flag back to on if the water temple is cleared @@ -591,6 +596,8 @@ void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* pl // On rando, this is used with the water control system switch to finalize raising the water if (gSaveContext.n64ddFlag) { this->lakeHyliaWaterLevel = 0; + play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_RAISED; + play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z; Flags_SetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER); // Set the "raise lake hylia water" flag play->roomCtx.unk_74[0] = 0; // Apply the moving under water texture to lake hylia ground } @@ -620,12 +627,14 @@ void BgSpot06Objects_WaterPlaneCutsceneLower(BgSpot06Objects* this, PlayState* p play->roomCtx.unk_74[0] = 87; // Remove the moving under water texture from lake hylia ground if (this->lakeHyliaWaterLevel <= -681.0f) { + this->lakeHyliaWaterLevel = -681.0f; this->dyna.actor.world.pos.y = WATER_LEVEL_RAISED; this->actionFunc = BgSpot06Objects_DoNothing; } else { // Go slightly beyond -681 so the smoothing doesn't slow down too much (matches the reverse of water rise func) Math_SmoothStepToF(&this->lakeHyliaWaterLevel, -682.0f, 0.1f, 1.0f, 0.001f); play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_LOWERED; + play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z - 50; play->colCtx.colHeader->waterBoxes[LHWB_MAIN_1].ySurface = yPos; play->colCtx.colHeader->waterBoxes[LHWB_MAIN_2].ySurface = yPos; } diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 6ebe523dd..cf9239862 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -18,6 +18,8 @@ #define MO_WATER_LEVEL(play) play->colCtx.colHeader->waterBoxes[0].ySurface +#define MO_STARTING_WATER_LEVEL (-60) + #define HAS_LINK(tent) \ ((tent != NULL) && \ ((tent->work[MO_TENT_ACTION_STATE] == MO_TENT_GRAB) || (tent->work[MO_TENT_ACTION_STATE] == MO_TENT_SHAKE))) @@ -338,6 +340,10 @@ void BossMo_Init(Actor* thisx, PlayState* play2) { BossMo* this = (BossMo*)thisx; u16 i; + // Due to Ships resource caching, the water level for Morpha needs to be reset + // to ensure subsequent re-fights in the same running instance start with the correct level + MO_WATER_LEVEL(play) = MO_STARTING_WATER_LEVEL; + Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); if (this->actor.params != BOSSMO_TENTACLE) { From ff3548a1b608659307f196ad647fd0a8e0228e98 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:03:08 -0500 Subject: [PATCH 08/15] Rando: Adjust locked door logic for temples and give starting keys for MQ Spirit (#2343) --- .../Enhancements/randomizer/randomizer.cpp | 6 ++-- soh/src/code/z_sram.c | 30 +++++++++++++++---- .../overlays/actors/ovl_En_Door/z_en_door.c | 7 ----- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index c72fbde1b..99abaa807 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3555,9 +3555,11 @@ void DrawRandoEditor(bool& open) { UIWidgets::InsertHelpHoverText( "Start with - You will start with all Small Keys from all dungeons.\n" "\n" - "Vanilla - Small Keys will appear in their vanilla locations.\n" + "Vanilla - Small Keys will appear in their vanilla locations. " + "You start with 3 keys in Spirit Temple MQ because the vanilla key layout is not beatable in logic.\n" "\n" - "Own dungeon - Small Keys can only appear in their respective dungeon.\n" + "Own dungeon - Small Keys can only appear in their respective dungeon. " + "If Fire Temple is not a Master Quest dungeon, the door to the Boss Key chest will be unlocked.\n" "\n" "Any dungeon - Small Keys can only appear inside of any dungon.\n" "\n" diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index adb778f1c..b6c21cc39 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -470,8 +470,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { GiveLinkRupees(9001); } - if(Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_STARTWITH) { - // TODO: If master quest there are different key counts + if (Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_STARTWITH) { gSaveContext.inventory.dungeonKeys[SCENE_BMORI1] = FOREST_TEMPLE_SMALL_KEY_MAX; // Forest gSaveContext.sohStats.dungeonKeys[SCENE_BMORI1] = FOREST_TEMPLE_SMALL_KEY_MAX; // Forest gSaveContext.inventory.dungeonKeys[SCENE_HIDAN] = FIRE_TEMPLE_SMALL_KEY_MAX; // Fire @@ -488,6 +487,16 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.sohStats.dungeonKeys[SCENE_MEN] = GERUDO_TRAINING_GROUNDS_SMALL_KEY_MAX; // GTG gSaveContext.inventory.dungeonKeys[SCENE_GANONTIKA] = GANONS_CASTLE_SMALL_KEY_MAX; // Ganon gSaveContext.sohStats.dungeonKeys[SCENE_GANONTIKA] = GANONS_CASTLE_SMALL_KEY_MAX; // Ganon + } else if (Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_VANILLA) { + // Logic cannot handle vanilla key layout in some dungeons + // this is because vanilla expects the dungeon major item to be + // locked behind the keys, which is not always true in rando. + // We can resolve this by starting with some extra keys + if (ResourceMgr_IsSceneMasterQuest(SCENE_JYASINZOU)) { + // MQ Spirit needs 3 keys + gSaveContext.inventory.dungeonKeys[SCENE_JYASINZOU] = 3; + gSaveContext.sohStats.dungeonKeys[SCENE_JYASINZOU] = 3; + } } if(Randomizer_GetSettingValue(RSK_BOSS_KEYSANITY) == RO_DUNGEON_ITEM_LOC_STARTWITH) { @@ -516,12 +525,23 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.infTable[20] |= 4; // Go away ruto (water temple first cutscene) - gSaveContext.sceneFlags[05].swch |= (1 << 0x10); + gSaveContext.sceneFlags[SCENE_MIZUSIN].swch |= (1 << 0x10); - // Opens locked Water Temple door to prevent softlocks + // Open lowest Vanilla Fire Temple locked door (to prevent key logic lockouts) + // Not done on keysanity since this lockout is a non issue when Fire keys can be found outside the temple + u8 keysanity = Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_ANYWHERE || + Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_OVERWORLD || + Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_ANY_DUNGEON; + if (!ResourceMgr_IsSceneMasterQuest(SCENE_HIDAN) && !keysanity) { + gSaveContext.sceneFlags[SCENE_HIDAN].swch |= (1 << 0x17); + } + + // Opens locked Water Temple door in vanilla to prevent softlocks // West door on the middle level that leads to the water raising thing // Happens in 3DS rando and N64 rando as well - gSaveContext.sceneFlags[05].swch |= (1 << 0x15); + if (!ResourceMgr_IsSceneMasterQuest(SCENE_MIZUSIN)) { + gSaveContext.sceneFlags[SCENE_MIZUSIN].swch |= (1 << 0x15); + } // Skip intro cutscene when bombing mud wall in Dodongo's cavern // this also makes the lower jaw render, and the eyes react to explosives diff --git a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c index 5827ae306..bd60075fd 100644 --- a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -159,13 +159,6 @@ void EnDoor_SetupType(EnDoor* this, PlayState* play) { } this->actor.world.rot.y = 0x0000; if (doorType == DOOR_LOCKED) { - // unlock the door behind the hammer blocks - // in the fire temple entryway when rando'd - if (gSaveContext.n64ddFlag && play->sceneNum == 4) { - // RANDOTODO don't do this when keysanity is enabled - Flags_SetSwitch(play, 0x17); - } - if (!Flags_GetSwitch(play, this->actor.params & 0x3F)) { this->lockTimer = 10; } From 4b10a887a61f1d6ec9a9527ba525155b2b9017da Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:05:19 -0500 Subject: [PATCH 09/15] Fix: Remove MQ Spirit Temple silver block for child to guarantee access to the chest (#2342) --- .../overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 31849422c..dfe080315 100644 --- a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -272,6 +272,15 @@ void ObjOshihiki_Init(Actor* thisx, PlayState* play2) { PlayState* play = play2; ObjOshihiki* this = (ObjOshihiki*)thisx; + // In MQ Spirit, remove the large silver block in the hole as child so the chest in the silver block hallway + // can be guaranteed accessible + if (gSaveContext.n64ddFlag && LINK_IS_CHILD && ResourceMgr_IsGameMasterQuest() && + play->sceneNum == SCENE_JYASINZOU && thisx->room == 6 && // Spirit Temple silver block hallway + thisx->params == 0x9C7) { // Silver block that is marked as in the hole + Actor_Kill(thisx); + return; + } + ObjOshihiki_CheckType(this, play); if ((((this->dyna.actor.params >> 8) & 0xFF) >= 0) && (((this->dyna.actor.params >> 8) & 0xFF) <= 0x3F)) { From 1e7cf8858f42d8c93ae4cebb1c6f038b9b8f9371 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:07:58 -0500 Subject: [PATCH 10/15] fix one-way entrances making some entrances disappear from the overrides (#2318) --- soh/soh/Enhancements/randomizer/3drando/fill.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index 20ea61f15..7d166ef80 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -295,8 +295,8 @@ std::vector GetAccessibleLocations(const std::vector& allowe if (mode == SearchMode::GeneratePlaythrough && exit.IsShuffled() && !exit.IsAddedToPool() && !noRandomEntrances) { entranceSphere.push_back(&exit); exit.AddToPool(); - // Don't list a coupled entrance from both directions - if (exit.GetReplacement()->GetReverse() != nullptr && !Settings::DecoupleEntrances) { + // Don't list a two-way coupled entrance from both directions + if (exit.GetReverse() != nullptr && exit.GetReplacement()->GetReverse() != nullptr && !Settings::DecoupleEntrances) { exit.GetReplacement()->GetReverse()->AddToPool(); } } From 170b9c12248f57a15fb3c35a269d5dc0b414791a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaro=20Mart=C3=ADnez?= Date: Tue, 17 Jan 2023 15:18:13 -0500 Subject: [PATCH 11/15] Disable BEL char by default when terminal attached (#2306) --- soh/include/vt.h | 7 +++++++ soh/src/boot/z_std_dma.c | 4 ++-- soh/src/code/game.c | 2 +- soh/src/code/graph.c | 10 +++++----- soh/src/code/irqmgr.c | 2 +- soh/src/overlays/gamestates/ovl_select/z_select.c | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/soh/include/vt.h b/soh/include/vt.h index 46cbf05e7..e64c0377a 100644 --- a/soh/include/vt.h +++ b/soh/include/vt.h @@ -32,4 +32,11 @@ #define VT_RST VT_SGR("") #define VT_CLS VT_ED(2) +#ifdef USE_BELL +// ASCII BEL character, plays an alert tone +#define BEL '\a' +#else +#define BEL '\0' +#endif + #endif diff --git a/soh/src/boot/z_std_dma.c b/soh/src/boot/z_std_dma.c index c817c84e2..8df938297 100644 --- a/soh/src/boot/z_std_dma.c +++ b/soh/src/boot/z_std_dma.c @@ -168,7 +168,7 @@ void DmaMgr_Error(DmaRequest* req, const char* file, const char* errorName, cons char buff1[80]; char buff2[80]; - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("DMA致命的エラー(%s)\nROM:%X RAM:%X SIZE:%X %s\n", errorDesc != NULL ? errorDesc : (errorName != NULL ? errorName : "???"), vrom, ram, size, @@ -348,7 +348,7 @@ s32 DmaMgr_SendRequestImpl(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_ if (1) { if ((sDmaMgrQueueFullLogged == 0) && (sDmaMgrMsgQueue.validCount >= sDmaMgrMsgQueue.msgCount)) { sDmaMgrQueueFullLogged++; - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("dmaEntryMsgQが一杯です。キューサイズの再検討をおすすめします。"); LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgs)); diff --git a/soh/src/code/game.c b/soh/src/code/game.c index df8e8d98a..5134d3b4b 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -491,7 +491,7 @@ void GameState_Realloc(GameState* gameState, size_t size) { osSyncPrintf("ハイラル一時解放!!\n"); // "Hyrule temporarily released!!" SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc); if ((systemMaxFree - 0x10) < size) { - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); osSyncPrintf(VT_FGCOL(RED)); // "Not enough memory. Change the hyral size to the largest possible value" diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index c6354ae93..d972bf9ad 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -337,14 +337,14 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { if (pool->headMagic != GFXPOOL_HEAD_MAGIC) { //! @bug (?) : "problem = true;" may be missing - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); // "Dynamic area head is destroyed" osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST); Fault_AddHungupAndCrash(__FILE__, __LINE__); } if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) { problem = true; - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); // "Dynamic region tail is destroyed" osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域末尾が破壊されています\n" VT_RST); Fault_AddHungupAndCrash(__FILE__, __LINE__); @@ -353,19 +353,19 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { if (THGA_IsCrash(&gfxCtx->polyOpa)) { problem = true; - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); // "Zelda 0 is dead" osSyncPrintf(VT_COL(RED, WHITE) "ゼルダ0は死んでしまった(graph_alloc is empty)\n" VT_RST); } if (THGA_IsCrash(&gfxCtx->polyXlu)) { problem = true; - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); // "Zelda 1 is dead" osSyncPrintf(VT_COL(RED, WHITE) "ゼルダ1は死んでしまった(graph_alloc is empty)\n" VT_RST); } if (THGA_IsCrash(&gfxCtx->overlay)) { problem = true; - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); // "Zelda 4 is dead" osSyncPrintf(VT_COL(RED, WHITE) "ゼルダ4は死んでしまった(graph_alloc is empty)\n" VT_RST); } diff --git a/soh/src/code/irqmgr.c b/soh/src/code/irqmgr.c index 41b432e91..df036d5ea 100644 --- a/soh/src/code/irqmgr.c +++ b/soh/src/code/irqmgr.c @@ -116,7 +116,7 @@ void IrqMgr_CheckStack() { if (StackCheck_Check(NULL) == 0) { osSyncPrintf("スタックは大丈夫みたいです\n"); // "The stack looks ok" } else { - osSyncPrintf("%c", 7); + osSyncPrintf("%c", BEL); osSyncPrintf(VT_FGCOL(RED)); // "Stack overflow or dangerous" osSyncPrintf("スタックがオーバーフローしたか危険な状態です\n"); diff --git a/soh/src/overlays/gamestates/ovl_select/z_select.c b/soh/src/overlays/gamestates/ovl_select/z_select.c index 082275c5f..1a64658db 100644 --- a/soh/src/overlays/gamestates/ovl_select/z_select.c +++ b/soh/src/overlays/gamestates/ovl_select/z_select.c @@ -1295,7 +1295,7 @@ void Select_Main(GameState* thisx) { } void Select_Destroy(GameState* thisx) { - osSyncPrintf("%c", '\a'); // ASCII BEL character, plays an alert tone + osSyncPrintf("%c", BEL); // "view_cleanup will hang, so it won't be called" osSyncPrintf("*** view_cleanupはハングアップするので、呼ばない ***\n"); } From 048207eb7d83206b218d74a50e26fca928e24369 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:18:59 -0500 Subject: [PATCH 12/15] Fix exiting courtyard at night not taking link to castle grounds in dungeon entrance randomizer (#2316) --- soh/soh/Enhancements/randomizer/randomizer_entrance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance.c b/soh/soh/Enhancements/randomizer/randomizer_entrance.c index a5a233612..18ae387c7 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance.c +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance.c @@ -198,8 +198,8 @@ s16 Entrance_OverrideNextIndex(s16 nextEntranceIndex) { } // Exiting through the crawl space from Hyrule Castle courtyard is the same exit as leaving Ganon's castle - // If we came from the Castle courtyard, then don't override the entrance to keep Link in Hyrule Castle area - if (gPlayState != NULL && gPlayState->sceneNum == 69 && nextEntranceIndex == 0x023D) { + // Don't override the entrance if we came from the Castle courtyard (day and night scenes) + if (gPlayState != NULL && (gPlayState->sceneNum == 69 || gPlayState->sceneNum == 70) && nextEntranceIndex == 0x023D) { return nextEntranceIndex; } From 76c9895432de6612c73c4088b47e4812265d8595 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:19:22 -0500 Subject: [PATCH 13/15] add missing medigoron hint text (#2339) --- .../3drando/hint_list/hint_list_exclude_overworld.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp index 26150c9de..721776418 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp @@ -418,6 +418,10 @@ void HintTable_Init_Exclude_Overworld() { Text{"a #carpet guru# sells", /*french*/"#un marchand du désert# vend", /*spanish*/"el #genio de una alfombra# vende"}, }); + hintTable[GC_MEDIGORON] = HintText::Exclude({ + //obscure text + Text{"#Medigoron# sells", /*french*/"#Medigoron# vend", /*spanish*/"#Medigoron# vende"}, + }); hintTable[KAK_IMPAS_HOUSE_FREESTANDING_POH] = HintText::Exclude({ //obscure text From 6eef813e5d94209abc7ea9713d64fa17699ad24f Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Tue, 17 Jan 2023 15:20:21 -0500 Subject: [PATCH 14/15] fix wrong entrances in epona check handler (#2352) --- soh/soh/Enhancements/randomizer/randomizer_entrance.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance.c b/soh/soh/Enhancements/randomizer/randomizer_entrance.c index 18ae387c7..14c8e4fb0 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance.c +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance.c @@ -433,6 +433,10 @@ void Entrance_HandleEponaState(void) { //If Link is riding Epona but he's about to go through an entrance where she can't spawn, //unset the Epona flag to avoid Master glitch, and restore temp B. if (Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) && (player->stateFlags1 & PLAYER_STATE1_23)) { + // Allow Master glitch to be performed on the Thieves Hideout entrance + if (entrance == Entrance_GetOverride(0x0496)) { // Gerudo Fortress -> Theives Hideout + return; + } static const s16 validEponaEntrances[] = { 0x0102, // Hyrule Field -> Lake Hylia @@ -444,12 +448,11 @@ void Entrance_HandleEponaState(void) { 0x0157, // Hyrule Field -> Lon Lon Ranch 0x01F9, // Lon Lon Ranch -> Hyrule Field 0x01FD, // Market Entrance -> Hyrule Field - 0x00EA, // ZR Front -> Hyrule Field - 0x0181, // LW Bridge -> Hyrule Field + 0x0181, // ZR Front -> Hyrule Field + 0x0185, // LW Bridge -> Hyrule Field 0x0129, // GV Fortress Side -> Gerudo Fortress 0x022D, // Gerudo Fortress -> GV Fortress Side 0x03D0, // GV Carpenter Tent -> GV Fortress Side - 0x0496, // Gerudo Fortress -> Thieves Hideout 0x042F, // LLR Stables -> Lon Lon Ranch 0x05D4, // LLR Tower -> Lon Lon Ranch 0x0378, // LLR Talons House -> Lon Lon Ranch From 1fe862515d4cea739cb3c462914851dcd9eae242 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 17 Jan 2023 15:42:09 -0500 Subject: [PATCH 15/15] fix top left dungeon entrance icon in graveyard (#2303) Co-authored-by: briaguya --- soh/src/code/z_map_exp.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 33c89fe47..45ae89099 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -897,21 +897,17 @@ void Minimap_Draw(PlayState* play) { //No idea why and how Original value work but this does actually fix them all. PosY = PosY+1024; } - if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || - ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && - (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) { + if (((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || + ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && + (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]) + )) || CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0)) { if (!Map0 || !CVar_GetS32("gFixDungeonMinimapIcon", 0)) { gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, IconSize, IconSize, 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); gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } - } else if (CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0) != 0){ //Ability to show entrance Before beating the dungeon itself - gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, - IconSize, IconSize, 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); - gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - } + } } s16 entranceX = OTRGetRectDimensionFromRightEdge(270 + X_Margins_Minimap);