about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-07-01 19:06:15 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-07-01 19:06:15 -0400
commit6f46d871169ba177bbd398e2d489f32e22d192c9 (patch)
treefce8e9f17f846c40e0858f516a617244822e6478 /src/ap_state.cpp
parent96f7f50ee10165a76495b7bcd2f269464fb8c79e (diff)
parentb744535ac15bb26344d334ada81d5509a4bc382d (diff)
downloadlingo-ap-tracker-6f46d871169ba177bbd398e2d489f32e22d192c9.tar.gz
lingo-ap-tracker-6f46d871169ba177bbd398e2d489f32e22d192c9.tar.bz2
lingo-ap-tracker-6f46d871169ba177bbd398e2d489f32e22d192c9.zip
Merge branch 'future'
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r--src/ap_state.cpp17
1 files changed, 14 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; }
550int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } 550int AP_GetLevel2Requirement() { return GetState().level_2_requirement; }
551 551
552bool AP_IsLocationVisible(int classification) { 552bool 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
565VictoryCondition AP_GetVictoryCondition() { 576VictoryCondition AP_GetVictoryCondition() {