From da8f3caeee5b01c38db30ebb146b76dc41f9ca74 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 21 Apr 2024 14:36:15 -0400 Subject: Expand sphere 1 in door shuffle + no ECH --- src/ap_state.cpp | 17 ++++++++++++++--- src/game_data.cpp | 4 ++++ src/game_data.h | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/ap_state.cpp b/src/ap_state.cpp index aeed914..9aceef6 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp @@ -473,16 +473,27 @@ int AP_GetMasteryRequirement() { return GetState().mastery_requirement; } int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } bool AP_IsLocationVisible(int classification) { + int world_state = 0; + switch (GetState().location_checks) { case kNORMAL_LOCATIONS: - return classification & kLOCATION_NORMAL; + world_state = kLOCATION_NORMAL; + break; case kREDUCED_LOCATIONS: - return classification & kLOCATION_REDUCED; + world_state = kLOCATION_REDUCED; + break; case kPANELSANITY: - return classification & kLOCATION_INSANITY; + world_state = kLOCATION_INSANITY; + break; default: return false; } + + if (GetState().door_shuffle_mode && !GetState().early_color_hallways) { + world_state |= kLOCATION_SMALL_SPHERE_ONE; + } + + return (world_state & classification); } VictoryCondition AP_GetVictoryCondition() { diff --git a/src/game_data.cpp b/src/game_data.cpp index c98f532..dbc269a 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -534,6 +534,10 @@ struct GameData { } } + if (room_name == "Starting Room") { + classification |= kLOCATION_SMALL_SPHERE_ONE; + } + int area_id = AddOrGetArea(area_name); MapArea &map_area = map_areas_[area_id]; // room field should be the original room ID diff --git a/src/game_data.h b/src/game_data.h index cd09627..88f8a13 100644 --- a/src/game_data.h +++ b/src/game_data.h @@ -22,6 +22,7 @@ enum class LingoColor { constexpr int kLOCATION_NORMAL = 1; constexpr int kLOCATION_REDUCED = 2; constexpr int kLOCATION_INSANITY = 4; +constexpr int kLOCATION_SMALL_SPHERE_ONE = 8; enum class EntranceType { kNormal, -- cgit 1.4.1