diff options
-rw-r--r-- | src/ap_state.cpp | 17 | ||||
-rw-r--r-- | src/game_data.cpp | 4 | ||||
-rw-r--r-- | 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 e4d892b..876fdd8 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp | |||
@@ -550,16 +550,27 @@ int AP_GetMasteryRequirement() { return GetState().mastery_requirement; } | |||
550 | int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } | 550 | int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } |
551 | 551 | ||
552 | bool AP_IsLocationVisible(int classification) { | 552 | bool AP_IsLocationVisible(int classification) { |
553 | int world_state = 0; | ||
554 | |||
553 | switch (GetState().location_checks) { | 555 | switch (GetState().location_checks) { |
554 | case kNORMAL_LOCATIONS: | 556 | case kNORMAL_LOCATIONS: |
555 | return classification & kLOCATION_NORMAL; | 557 | world_state = kLOCATION_NORMAL; |
558 | break; | ||
556 | case kREDUCED_LOCATIONS: | 559 | case kREDUCED_LOCATIONS: |
557 | return classification & kLOCATION_REDUCED; | 560 | world_state = kLOCATION_REDUCED; |
561 | break; | ||
558 | case kPANELSANITY: | 562 | case kPANELSANITY: |
559 | return classification & kLOCATION_INSANITY; | 563 | world_state = kLOCATION_INSANITY; |
564 | break; | ||
560 | default: | 565 | default: |
561 | return false; | 566 | return false; |
562 | } | 567 | } |
568 | |||
569 | if (GetState().door_shuffle_mode && !GetState().early_color_hallways) { | ||
570 | world_state |= kLOCATION_SMALL_SPHERE_ONE; | ||
571 | } | ||
572 | |||
573 | return (world_state & classification); | ||
563 | } | 574 | } |
564 | 575 | ||
565 | VictoryCondition AP_GetVictoryCondition() { | 576 | VictoryCondition AP_GetVictoryCondition() { |
diff --git a/src/game_data.cpp b/src/game_data.cpp index 77e435a..e75170e 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp | |||
@@ -550,6 +550,10 @@ struct GameData { | |||
550 | } | 550 | } |
551 | } | 551 | } |
552 | 552 | ||
553 | if (room_name == "Starting Room") { | ||
554 | classification |= kLOCATION_SMALL_SPHERE_ONE; | ||
555 | } | ||
556 | |||
553 | int area_id = AddOrGetArea(area_name); | 557 | int area_id = AddOrGetArea(area_name); |
554 | MapArea &map_area = map_areas_[area_id]; | 558 | MapArea &map_area = map_areas_[area_id]; |
555 | // room field should be the original room ID | 559 | // room field should be the original room ID |
diff --git a/src/game_data.h b/src/game_data.h index 66f3e0e..b787e6f 100644 --- a/src/game_data.h +++ b/src/game_data.h | |||
@@ -22,6 +22,7 @@ enum class LingoColor { | |||
22 | constexpr int kLOCATION_NORMAL = 1; | 22 | constexpr int kLOCATION_NORMAL = 1; |
23 | constexpr int kLOCATION_REDUCED = 2; | 23 | constexpr int kLOCATION_REDUCED = 2; |
24 | constexpr int kLOCATION_INSANITY = 4; | 24 | constexpr int kLOCATION_INSANITY = 4; |
25 | constexpr int kLOCATION_SMALL_SPHERE_ONE = 8; | ||
25 | 26 | ||
26 | enum class EntranceType { | 27 | enum class EntranceType { |
27 | kNormal, | 28 | kNormal, |