about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
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 8feb78b..b0b4f0b 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -476,16 +476,27 @@ int AP_GetMasteryRequirement() { return GetState().mastery_requirement; }
476int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } 476int AP_GetLevel2Requirement() { return GetState().level_2_requirement; }
477 477
478bool AP_IsLocationVisible(int classification) { 478bool AP_IsLocationVisible(int classification) {
479 int world_state = 0;
480
479 switch (GetState().location_checks) { 481 switch (GetState().location_checks) {
480 case kNORMAL_LOCATIONS: 482 case kNORMAL_LOCATIONS:
481 return classification & kLOCATION_NORMAL; 483 world_state = kLOCATION_NORMAL;
484 break;
482 case kREDUCED_LOCATIONS: 485 case kREDUCED_LOCATIONS:
483 return classification & kLOCATION_REDUCED; 486 world_state = kLOCATION_REDUCED;
487 break;
484 case kPANELSANITY: 488 case kPANELSANITY:
485 return classification & kLOCATION_INSANITY; 489 world_state = kLOCATION_INSANITY;
490 break;
486 default: 491 default:
487 return false; 492 return false;
488 } 493 }
494
495 if (GetState().door_shuffle_mode && !GetState().early_color_hallways) {
496 world_state |= kLOCATION_SMALL_SPHERE_ONE;
497 }
498
499 return (world_state & classification);
489} 500}
490 501
491VictoryCondition AP_GetVictoryCondition() { 502VictoryCondition AP_GetVictoryCondition() {