diff options
| author | Philip Dubé <159546+serprex@users.noreply.github.com> | 2026-04-10 16:37:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-10 16:37:22 +0000 |
| commit | c879c970666cb79ec3bd2f3e301a8ec4c62a6bec (patch) | |
| tree | 859a9db248ea82738141ae402b36cec0768dfea2 | |
| parent | 9945041888bc7d21e24842218680d2922866fc2a (diff) | |
randomizer_check_tracker: small cleanup (#6480)
| -rw-r--r-- | soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index e42a399bc..83a2a57f4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -25,7 +25,6 @@ #include "item_location.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "z64item.h" -#include "fishsanity.h" extern "C" { #include "variables.h" @@ -475,14 +474,9 @@ RandomizerCheckArea GetCheckArea() { return area; } -bool vector_contains_scene(std::vector<SceneID> vec, const int16_t scene) { - return std::any_of(vec.begin(), vec.end(), [&](const auto& x) { return x == scene; }); -} - -std::vector<SceneID> skipScenes = { +std::array<SceneID, 4> skipScenes = { SCENE_GANON_BOSS, SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR, - SCENE_GANON_BOSS, SCENE_INSIDE_GANONS_CASTLE_COLLAPSE, SCENE_GANONS_TOWER_COLLAPSE_INTERIOR, }; @@ -659,7 +653,8 @@ void CheckTrackerTransition(uint32_t sceneNum) { } void CheckTrackerItemReceive(GetItemEntry giEntry) { - if (!GameInteractor::IsSaveLoaded() || vector_contains_scene(skipScenes, gPlayState->sceneNum)) { + if (!GameInteractor::IsSaveLoaded() || std::find(std::begin(skipScenes), std::end(skipScenes), + (SceneID)gPlayState->sceneNum) != std::end(skipScenes)) { return; } auto scene = static_cast<SceneID>(gPlayState->sceneNum); |
