From 29d4cd27c46af4c31b15980518647c9cb47a5eeb Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Sun, 29 May 2022 22:38:21 +0200 Subject: [PATCH 01/18] Fix Radiobutton uniqueness issues (#397) * Fix Radiobox uniqueness issues * C++ ? and build fix I think * To match the edit made in .c --- libultraship/libultraship/SohImGuiImpl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index c91f31750..c03cd8e78 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -447,11 +447,17 @@ namespace SohImGui { EnhancementRadioButton("German", "gLanguages", 1); EnhancementRadioButton("French", "gLanguages", 2); */ + std::string make_invisible = "##"; + make_invisible += text; + make_invisible += cvarName; + int val = CVar_GetS32(cvarName, 0); - if (ImGui::RadioButton(text, id == val)) { + if (ImGui::RadioButton(make_invisible.c_str(), id == val)) { CVar_SetS32(cvarName, id); needs_save = true; } + ImGui::SameLine(); + ImGui::Text("%s", text); } void EnhancementCheckbox(const char* text, const char* cvarName) From 08c161fd13836b34bb3257d8361add14e967eac8 Mon Sep 17 00:00:00 2001 From: PurpleHato <47987542+PurpleHato@users.noreply.github.com> Date: Sun, 29 May 2022 22:40:50 +0200 Subject: [PATCH 02/18] Enhancement: More options for Kaleido Link (#394) * Enhancement: More options for Kaleido Link ADDED: 14 animations to use ADDED: 2 random mode ADDED: Link rotation on the menu with DPAD-Left and Right ADDED: Reset position with DPAD-Up and Down * ADDED/ Choice to use C-Button or D-pad --- libultraship/libultraship/SohImGuiImpl.cpp | 41 ++++++- soh/src/code/z_player_lib.c | 108 ++++++++++++++++-- .../ovl_kaleido_scope/z_kaleido_equipment.c | 32 +++++- 3 files changed, 168 insertions(+), 13 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index c03cd8e78..3c3ca9c6c 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -861,9 +861,48 @@ namespace SohImGui { if (ImGui::BeginMenu("Graphics")) { + if (ImGui::BeginMenu("Animated Link in Pause Menu")) { + ImGui::Text("Rotation"); + EnhancementRadioButton("Disabled", "gPauseLiveRotation", 0); + EnhancementRadioButton("Rotate Link with D-pad", "gPauseLiveRotation", 1); + Tooltip("Allow you to rotate Link on the Equipment menu with the DPAD\nUse DPAD-Up or DPAD-Down to reset Link's rotation"); + EnhancementRadioButton("Rotate Link with C-buttons", "gPauseLiveRotation", 2); + Tooltip("Allow you to rotate Link on the Equipment menu with the C-buttons\nUse C-Up or C-Down to reset Link's rotation"); + + if (CVar_GetS32("gPauseLiveRotation", 0) != 0) { + EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, ""); + } + ImGui::Separator(); + ImGui::Text("Static loop"); + EnhancementRadioButton("Disabled", "gPauseLiveLink", 0); + EnhancementRadioButton("Idle (standing)", "gPauseLiveLink", 1); + EnhancementRadioButton("Idle (look around)", "gPauseLiveLink", 2); + EnhancementRadioButton("Idle (belt)", "gPauseLiveLink", 3); + EnhancementRadioButton("Idle (shield)", "gPauseLiveLink", 4); + EnhancementRadioButton("Idle (test sword)", "gPauseLiveLink", 5); + EnhancementRadioButton("Idle (yawn)", "gPauseLiveLink", 6); + EnhancementRadioButton("Battle Stance", "gPauseLiveLink", 7); + EnhancementRadioButton("Walking (no shield)", "gPauseLiveLink", 8); + EnhancementRadioButton("Walking (holding shield)", "gPauseLiveLink", 9); + EnhancementRadioButton("Running (no shield)", "gPauseLiveLink", 10); + EnhancementRadioButton("Running (holding shield)", "gPauseLiveLink", 11); + EnhancementRadioButton("Hand on hip", "gPauseLiveLink", 12); + EnhancementRadioButton("Spin attack charge", "gPauseLiveLink", 13); + EnhancementRadioButton("Look at hand", "gPauseLiveLink", 14); + ImGui::Separator(); + ImGui::Text("Randomize"); + EnhancementRadioButton("Random", "gPauseLiveLink", 15); + Tooltip("Randomize the animation played each time you open the menu"); + EnhancementRadioButton("Random cycle", "gPauseLiveLink", 16); + Tooltip("andomize the animation played on hte menu after a certain time"); + if (CVar_GetS32("gPauseLiveLink", 0) >= 16) { + EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", "gMinFrameCount", 1, 1000, ""); + } + + ImGui::EndMenu(); + } EnhancementCheckbox("N64 Mode", "gN64Mode"); Tooltip("Sets aspect ratio to 4:3 and lowers resolution to 240p, the N64's native resolution"); - EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink"); EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); Tooltip("Changes the rupee in the wallet icon to match the wallet size you currently have"); diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 83fae7ff1..cf7fbd51c 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1661,26 +1661,118 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, SkelAnime CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 3288); } +uintptr_t SelectedAnim = 0; // Current Animaiton on the menu +s16 EquipedStance; // Link's current mode (Two handed, One handed...) +s16 FrameCountSinceLastAnim = 0; // Time since last animation +s16 MinFrameCount; // Frame to wait before checking if we need to change the animation + void func_8009214C(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots) { + Input* p1Input = &globalCtx->state.input[0]; Vec3f eye = { 0.0f, 0.0f, -400.0f }; Vec3f at = { 0.0f, 0.0f, 0.0f }; Vec3s* destTable; Vec3s* srcTable; s32 i; + bool canswitchrnd = false; + s16 SelectedMode = CVar_GetS32("gPauseLiveLink", 1); + MinFrameCount = CVar_GetS32("gMinFrameCount", 200); gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800); gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800); - if (CVar_GetS32("gPauseLiveLink", 0) || CVar_GetS32("gPauseTriforce", 0)) { - uintptr_t anim = gPlayerAnim_003238; // idle + uintptr_t* PauseMenuAnimSet[15][4] = { + { 0, 0, 0, 0 }, // 0 = none + // IDLE // Two Handed // No shield // Kid Hylian Shield + { gPlayerAnim_003238, gPlayerAnim_002BE0, gPlayerAnim_003240, gPlayerAnim_003240 }, // Idle + { gPlayerAnim_003200, gPlayerAnim_003200, gPlayerAnim_003200, gPlayerAnim_003200 }, // Idle look around + { gPlayerAnim_0033E0, gPlayerAnim_0033E0, gPlayerAnim_0033E0, gPlayerAnim_0033E0 }, // Idle Belt + { gPlayerAnim_003418, gPlayerAnim_003418, gPlayerAnim_003418, gPlayerAnim_003418 }, // Idle shield adjust + { gPlayerAnim_003420, gPlayerAnim_003428, gPlayerAnim_003420, gPlayerAnim_003420 }, // Idle test sword + { gPlayerAnim_0033F0, gPlayerAnim_0033F0, gPlayerAnim_0033F0, gPlayerAnim_0033F0 }, // Idle yawn + { gPlayerAnim_0025D0, gPlayerAnim_002BD0, gPlayerAnim_0025D0, gPlayerAnim_0025D0 }, // Battle Stance + { gPlayerAnim_003290, gPlayerAnim_002BF8, gPlayerAnim_003290, gPlayerAnim_003290 }, // Walking (No shield) + { gPlayerAnim_003268, gPlayerAnim_002BF8, gPlayerAnim_003268, gPlayerAnim_003268 }, // Walking (Holding shield) + { gPlayerAnim_003138, gPlayerAnim_002B40, gPlayerAnim_003138, gPlayerAnim_003138 }, // Running (No shield) + { gPlayerAnim_003140, gPlayerAnim_002B40, gPlayerAnim_003140, gPlayerAnim_003140 }, // Running (Holding shield) + { gPlayerAnim_0031A8, gPlayerAnim_0031A8, gPlayerAnim_0031A8, gPlayerAnim_0031A8 }, // Hand on hip + { gPlayerAnim_002AF0, gPlayerAnim_002928, gPlayerAnim_002AF0, gPlayerAnim_002AF0 }, // Spin Charge + { gPlayerAnim_002820, gPlayerAnim_002820, gPlayerAnim_002820, gPlayerAnim_002820 }, // Look at hand + }; + s16 AnimArraySize = ARRAY_COUNT(PauseMenuAnimSet); - if (CUR_EQUIP_VALUE(EQUIP_SWORD) >= 3) - anim = gPlayerAnim_002BE0; // Two Handed Anim - else if (CUR_EQUIP_VALUE(EQUIP_SHIELD) == 0) - anim = gPlayerAnim_003240; - else if (CUR_EQUIP_VALUE(EQUIP_SHIELD) == 2 && LINK_AGE_IN_YEARS == YEARS_CHILD) - anim = gPlayerAnim_003240; + if (CVar_GetS32("gPauseLiveLink", !0) || CVar_GetS32("gPauseTriforce", 0)) { + uintptr_t anim = 0; // Initialise anim + + if (CUR_EQUIP_VALUE(EQUIP_SWORD) >= 3) { + EquipedStance = 1; + } else if (CUR_EQUIP_VALUE(EQUIP_SHIELD) == 0) { + EquipedStance = 2; + } else if (CUR_EQUIP_VALUE(EQUIP_SHIELD) == 2 && LINK_AGE_IN_YEARS == YEARS_CHILD) { + EquipedStance = 3; + } else { + // Link is idle so revert to 0 + EquipedStance = 0; + } + + if (SelectedMode == 16) { + // Apply Random function + s16 SwitchAtFrame = 0; + s16 CurAnimDuration = 0; + if (FrameCountSinceLastAnim == 0) { + // When opening Kaleido this will be passed one time + SelectedAnim = rand() % (AnimArraySize - 0); + if (SelectedAnim == 0) { + // prevent loading 0 that would result to a crash. + SelectedAnim = 1; + } + } else if (FrameCountSinceLastAnim >= 1) { + SwitchAtFrame = Animation_GetLastFrame(PauseMenuAnimSet[SelectedAnim][EquipedStance]); + CurAnimDuration = Animation_GetLastFrame(PauseMenuAnimSet[SelectedAnim][EquipedStance]); + if (SwitchAtFrame < MinFrameCount) { + // Animation frame count is lower than minimal wait time then we wait for another round. + // This will be looped to always add current animation time if that still lower than minimum time + while (SwitchAtFrame < MinFrameCount) { + SwitchAtFrame = SwitchAtFrame + CurAnimDuration; + } + } else if (CurAnimDuration >= MinFrameCount) { + // Since we have more (or same) animation time than min duration we set the wait time to animation + // time. + SwitchAtFrame = CurAnimDuration; + } + if (FrameCountSinceLastAnim >= SwitchAtFrame) { + SelectedAnim = rand() % (AnimArraySize - 0); + if (SelectedAnim == 0) { + // prevent loading 0 that would result to a crash. + SelectedAnim = 1; + } + FrameCountSinceLastAnim = 1; + } + anim = PauseMenuAnimSet[SelectedAnim][EquipedStance]; + } + FrameCountSinceLastAnim++; + } else if (SelectedMode == 15) { + // When opening Kaleido this will be passed one time + if (FrameCountSinceLastAnim < 1) { + SelectedAnim = rand() % (AnimArraySize - 0); + FrameCountSinceLastAnim++; + if (SelectedAnim == 0) { + // prevent loading 0 that would result to a crash. + SelectedAnim = 1; + } + FrameCountSinceLastAnim = 1; + } + if (CHECK_BTN_ALL(p1Input->press.button, BTN_B) || CHECK_BTN_ALL(p1Input->press.button, BTN_START)) { + FrameCountSinceLastAnim = 0; + } + anim = PauseMenuAnimSet[SelectedAnim][EquipedStance]; + } else if (SelectedMode < 16) { + // Not random so we place our CVar as SelectedAnim + SelectedAnim = SelectedMode; + anim = PauseMenuAnimSet[SelectedAnim][EquipedStance]; + } + + anim = PauseMenuAnimSet[SelectedAnim][EquipedStance]; //anim = gPlayerAnim_003428; // Use for biggoron sword? diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 719eaa3f3..125981bff 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -89,11 +89,17 @@ void KaleidoScope_DrawEquipmentImage(GlobalContext* globalCtx, void* source, u32 CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_equipment.c", 122); } +Vec3s link_kaleido_rot = { 0, 32300, 0 }; // Default rotation link face us. + void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) { PauseContext* pauseCtx = &globalCtx->pauseCtx; Vec3f pos; - Vec3s rot; + //Vec3s rot; // Removed for not having it use din the function f32 scale; + Input* input = &globalCtx->state.input[0]; + s16 RotationSpeed = 150 * CVar_GetS32("gPauseLiveLinkRotationSpeed", 0); + bool AllowCRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 2) ? true : false; + bool AllowDPadRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 1) ? true : false; if (LINK_AGE_IN_YEARS == YEARS_CHILD) { pos.x = 2.0f; @@ -112,11 +118,29 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) { scale = 0.047f; } - rot.y = 32300; - rot.x = rot.z = 0; + link_kaleido_rot.x = link_kaleido_rot.z = 0; + + if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT) || + AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT)) { + link_kaleido_rot.y = link_kaleido_rot.y - RotationSpeed; + } else if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT) || + AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT)) { + link_kaleido_rot.y = link_kaleido_rot.y + RotationSpeed; + } + + if (AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DUP) || + AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) { + link_kaleido_rot.y = 32300; + } else if (AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CUP) || + AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CDOWN)) { + link_kaleido_rot.y = 32300; + } + + link_kaleido_rot.x = 0; + extern int fbTest; gsSPSetFB(globalCtx->state.gfxCtx->polyOpa.p++, fbTest); - func_8009214C(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &rot, scale, + func_8009214C(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &link_kaleido_rot, scale, CUR_EQUIP_VALUE(EQUIP_SWORD), CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1, CUR_EQUIP_VALUE(EQUIP_SHIELD), CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1); gsSPResetFB(globalCtx->state.gfxCtx->polyOpa.p++); From daec428cb3844bdb5261f5ddf47b613cce514d05 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sun, 29 May 2022 16:45:27 -0400 Subject: [PATCH 03/18] call SDL_Quit() before exit(0) (linux window closing issue) (#408) * use _Exit(0) on linux * use SDL_Quit() instead of _Exit(0) * remove unnecessary call, add bandaid comment Co-authored-by: briaguya --- libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp index 94c3ef5ca..061e3a8ee 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp @@ -249,6 +249,7 @@ static void gfx_sdl_handle_events(void) { } break; case SDL_QUIT: + SDL_Quit(); // bandaid fix for linux window closing issue exit(0); } } From b387d06ad38332c8e18207903c40f76505c1e7b2 Mon Sep 17 00:00:00 2001 From: briaguya Date: Sun, 29 May 2022 21:10:38 -0400 Subject: [PATCH 04/18] revert cow change --- soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c index c290132b0..655dfb6e1 100644 --- a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -214,7 +214,7 @@ void func_809DF778(EnCow* this, GlobalContext* globalCtx) { this->actor.parent = NULL; this->actionFunc = func_809DF730; } else { - func_8002F434(&this->actor, globalCtx, GID_MEDALLION_FIRE, 10000.0f, 100.0f); + func_8002F434(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f); } } From e6f89ae3e6c22079eebf4ca26a1e0fc9ace2c66d Mon Sep 17 00:00:00 2001 From: briaguya Date: Sun, 29 May 2022 22:04:58 -0400 Subject: [PATCH 05/18] ganon's castle chests --- soh/soh/Enhancements/randomizer.cpp | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 4c62de44f..5e4760d8f 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1442,6 +1442,44 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 2860: return GERUDO_TRAINING_GROUND_MAZE_PATH_FINAL_CHEST; } + case 13: + switch(actorParams) { + case 30857: + return GANONS_CASTLE_FOREST_TRIAL_CHEST; + case 24455: + return GANONS_CASTLE_WATER_TRIAL_LEFT_CHEST; + case 22790: + return GANONS_CASTLE_WATER_TRIAL_RIGHT_CHEST; + case 22664: + return GANONS_CASTLE_SHADOW_TRIAL_FRONT_CHEST; + case 14021: + return GANONS_CASTLE_SHADOW_TRIAL_GOLDEN_GAUNTLETS_CHEST; + case 22668: + return GANONS_CASTLE_LIGHT_TRIAL_FIRST_LEFT_CHEST; + case 24459: + return GANONS_CASTLE_LIGHT_TRIAL_SECOND_LEFT_CHEST; + case 22797: + return GANONS_CASTLE_LIGHT_TRIAL_THIRD_LEFT_CHEST; + case 24462: + return GANONS_CASTLE_LIGHT_TRIAL_FIRST_RIGHT_CHEST; + case 22890: + return GANONS_CASTLE_LIGHT_TRIAL_SECOND_RIGHT_CHEST; + case 24463: + return GANONS_CASTLE_LIGHT_TRIAL_THIRD_RIGHT_CHEST; + case 30800: + return GANONS_CASTLE_LIGHT_TRIAL_INVISIBLE_ENEMIES_CHEST; + case -30639: + return GANONS_CASTLE_LIGHT_TRIAL_LULLABY_CHEST; + case -29326: + return GANONS_CASTLE_SPIRIT_TRIAL_CRYSTAL_SWITCH_CHEST; + case 26964: + return GANONS_CASTLE_SPIRIT_TRIAL_INVISIBLE_CHEST; + } + case 10: + switch(actorParams) { + case 10219: + return GANONS_TOWER_BOSS_KEY_CHEST; + } } return UNKNOWN_CHECK; From bceb06296a416908b2f366c87f4f66431e190e1c Mon Sep 17 00:00:00 2001 From: briaguya Date: Sun, 29 May 2022 22:38:50 -0400 Subject: [PATCH 06/18] maps and compasses --- soh/soh/Enhancements/randomizer.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 5e4760d8f..9a2a82062 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -921,6 +921,29 @@ GetItemID Randomizer::GetItemFromGet(RandomizerGet randoGet, GetItemID ogItemId) case SMALL_KEY_THIEVES_HIDEOUT: case SMALL_KEY_WATER_TEMPLE: return GI_KEY_SMALL; + // todo implement dungeon-specific maps/compasses + case MAP_DEKU_TREE: + case MAP_DODONGOS_CAVERN: + case MAP_JABU_JABUS_BELLY: + case MAP_FOREST_TEMPLE: + case MAP_FIRE_TEMPLE: + case MAP_WATER_TEMPLE: + case MAP_SPIRIT_TEMPLE: + case MAP_SHADOW_TEMPLE: + case MAP_BOTTOM_OF_THE_WELL: + case MAP_ICE_CAVERN: + return GI_MAP; + case COMPASS_DEKU_TREE: + case COMPASS_DODONGOS_CAVERN: + case COMPASS_JABU_JABUS_BELLY: + case COMPASS_FOREST_TEMPLE: + case COMPASS_FIRE_TEMPLE: + case COMPASS_WATER_TEMPLE: + case COMPASS_SPIRIT_TEMPLE: + case COMPASS_SHADOW_TEMPLE: + case COMPASS_BOTTOM_OF_THE_WELL: + case COMPASS_ICE_CAVERN: + return GI_COMPASS; case MAGIC_METER: switch (gSaveContext.magicLevel) { case 0: From 470cf70ef5e837fcef8db93cbe24d4c758eaae52 Mon Sep 17 00:00:00 2001 From: briaguya Date: Sun, 29 May 2022 23:08:33 -0400 Subject: [PATCH 07/18] desert colossus poh --- soh/soh/Enhancements/randomizer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 9a2a82062..65136d7f8 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1410,6 +1410,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST; case 13673: return SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST; + case 3334: + return COLOSSUS_FREESTANDING_POH; } case 9: switch(actorParams) { From 4ac4b282a03f9bf07f94cb5535766c5d5095567f Mon Sep 17 00:00:00 2001 From: briaguya Date: Sun, 29 May 2022 23:20:47 -0400 Subject: [PATCH 08/18] gv poh --- soh/soh/Enhancements/randomizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 65136d7f8..6cc04bc91 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1170,6 +1170,10 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act switch(actorParams) { case 23200: return GV_CHEST; + case 262: + return GV_WATERFALL_FREESTANDING_POH; + case 518: + return GV_CRATE_FREESTANDING_POH; } case 93: switch(actorParams) { From 17c968446f14f75aa4151fcaea0b7c172c7047d2 Mon Sep 17 00:00:00 2001 From: briaguya Date: Sun, 29 May 2022 23:33:04 -0400 Subject: [PATCH 09/18] lh poh --- soh/soh/Enhancements/randomizer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 6cc04bc91..a771a109f 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1509,6 +1509,11 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 10219: return GANONS_TOWER_BOSS_KEY_CHEST; } + case 87: + switch(actorParams) { + case 7686: + return LH_FREESTANDING_POH; + } } return UNKNOWN_CHECK; From d73bc1fb720baddf4991352fd0161cbae03e1e6e Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 00:01:02 -0400 Subject: [PATCH 10/18] hf tektite grotto poh --- soh/soh/Enhancements/randomizer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index a771a109f..384ea76dc 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1124,6 +1124,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return DMC_UPPER_GROTTO_CHEST; case 22985: return ZR_OPEN_GROTTO_CHEST; + case 262: + return HF_TEKTITE_GROTTO_FREESTANDING_POH; } case 64: switch(actorParams) { From bf44f42b6d07d74c1bf2b24298e67b6c30a58cf6 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 00:10:18 -0400 Subject: [PATCH 11/18] llr poh --- soh/soh/Enhancements/randomizer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 384ea76dc..a04745532 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1516,6 +1516,11 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 7686: return LH_FREESTANDING_POH; } + case 76: + switch(actorParams) { + case 262: + return LLR_FREESTANDING_POH; + } } return UNKNOWN_CHECK; From c7efcae6a95b307a4dbaee00c5d5501c4afa5478 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 00:25:11 -0400 Subject: [PATCH 12/18] windmill/impas house/graveyard poh --- soh/soh/Enhancements/randomizer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index a04745532..e8b5c36a9 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1146,6 +1146,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act switch(actorParams) { case 4352: return GRAVEYARD_HOOKSHOT_CHEST; + case 262: + return KAK_WINDMILL_FREESTANDING_POH; } case 96: switch(actorParams) { @@ -1521,6 +1523,16 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 262: return LLR_FREESTANDING_POH; } + case 55: + switch(actorParams) { + case 262: + return KAK_IMPAS_HOUSE_FREESTANDING_POH; + } + case 83: + switch(actorParams) { + case 1030: + return GRAVEYARD_FREESTANDING_POH; + } } return UNKNOWN_CHECK; From f3eff1e36d8caf2a7ead80051eeabb389b2455d5 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 00:52:28 -0400 Subject: [PATCH 13/18] dampe race poh --- soh/soh/Enhancements/randomizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index e8b5c36a9..ffa4d7b02 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1143,11 +1143,15 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return GRAVEYARD_ROYAL_FAMILYS_TOMB_CHEST; } case 72: + // todo make sure dampe gives the PoH when the chest is opened + // default logic seems to be give PoH when hookshot in inventory switch(actorParams) { case 4352: return GRAVEYARD_HOOKSHOT_CHEST; case 262: return KAK_WINDMILL_FREESTANDING_POH; + case 1798: + return GRAVEYARD_DAMPE_RACE_FREESTANDING_POH; } case 96: switch(actorParams) { From 402fbe4d0427adb603af1ff3f2c9587cb4800f9b Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 01:22:24 -0400 Subject: [PATCH 14/18] gc pot soh --- soh/soh/Enhancements/randomizer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index ffa4d7b02..561c1cf2a 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1168,6 +1168,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return GC_MAZE_RIGHT_CHEST; case 23202: return GC_MAZE_CENTER_CHEST; + case 7942: + return GC_POT_FREESTANDING_POH; } case 88: switch(actorParams) { From 36e44ba2654349b53a97dbcf6412d7d2c86e32f2 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 01:57:15 -0400 Subject: [PATCH 15/18] dmc poh --- soh/soh/Enhancements/randomizer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 561c1cf2a..82610cfb1 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1539,6 +1539,13 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 1030: return GRAVEYARD_FREESTANDING_POH; } + case 97: + switch(actorParams) { + case 2054: + return DMC_VOLCANO_FREESTANDING_POH; + case 518: + return DMC_WALL_FREESTANDING_POH; + } } return UNKNOWN_CHECK; From 58ce65834eb7b6e58e50498e5aec6fb5bb86cbd2 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 02:22:53 -0400 Subject: [PATCH 16/18] zf poh --- soh/soh/Enhancements/randomizer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index 82610cfb1..bab49c00a 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1546,6 +1546,13 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 518: return DMC_WALL_FREESTANDING_POH; } + case 89: + switch(actorParams) { + case 5126: + return ZF_BOTTOM_FREESTANDING_POH; + case 262: + return ZF_ICEBERG_FREESTANDING_POH; + } } return UNKNOWN_CHECK; From b88779f6c042ee5d863c4431752d6b046c6db514 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 02:34:23 -0400 Subject: [PATCH 17/18] ice cavern poh --- soh/soh/Enhancements/randomizer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index bab49c00a..ca3422271 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1435,6 +1435,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return ICE_CAVERN_COMPASS_CHEST; case 5570: return ICE_CAVERN_IRON_BOOTS_CHEST; + case 262: + return ICE_CAVERN_FREESTANDING_POH; } case 11: switch(actorParams) { From 218c2257da77969e1c0690e10ebc82586bf245a4 Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 30 May 2022 03:15:13 -0400 Subject: [PATCH 18/18] boss heart containers --- soh/soh/Enhancements/randomizer.cpp | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index ca3422271..64fb6f714 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -1077,6 +1077,36 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 93: return BARINADE; } + case 20: + switch (actorId) { + case 95: + return FOREST_TEMPLE_PHANTOM_GANON_HEART; + // todo PHANTOM_GANON + } + case 21: + switch (actorId) { + case 95: + return FIRE_TEMPLE_VOLVAGIA_HEART; + // todo VOLVAGIA + } + case 22: + switch (actorId) { + case 95: + return WATER_TEMPLE_MORPHA_HEART; + // todo MORPHA + } + case 23: + switch (actorId) { + case 95: + return SPIRIT_TEMPLE_TWINROVA_HEART; + // todo TWINROVA + } + case 24: + switch (actorId) { + case 95: + return SHADOW_TEMPLE_BONGO_BONGO_HEART; + // todo BONGO_BONGO + } case 40: switch(actorParams) { case 22944: