diff options
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r-- | src/ap_state.cpp | 17 |
1 files changed, 14 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; } | |||
473 | int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } | 473 | int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } |
474 | 474 | ||
475 | bool AP_IsLocationVisible(int classification) { | 475 | bool AP_IsLocationVisible(int classification) { |
476 | int world_state = 0; | ||
477 | |||
476 | switch (GetState().location_checks) { | 478 | switch (GetState().location_checks) { |
477 | case kNORMAL_LOCATIONS: | 479 | case kNORMAL_LOCATIONS: |
478 | return classification & kLOCATION_NORMAL; | 480 | world_state = kLOCATION_NORMAL; |
481 | break; | ||
479 | case kREDUCED_LOCATIONS: | 482 | case kREDUCED_LOCATIONS: |
480 | return classification & kLOCATION_REDUCED; | 483 | world_state = kLOCATION_REDUCED; |
484 | break; | ||
481 | case kPANELSANITY: | 485 | case kPANELSANITY: |
482 | return classification & kLOCATION_INSANITY; | 486 | world_state = kLOCATION_INSANITY; |
487 | break; | ||
483 | default: | 488 | default: |
484 | return false; | 489 | return false; |
485 | } | 490 | } |
491 | |||
492 | if (GetState().door_shuffle_mode && !GetState().early_color_hallways) { | ||
493 | world_state |= kLOCATION_SMALL_SPHERE_ONE; | ||
494 | } | ||
495 | |||
496 | return (world_state & classification); | ||
486 | } | 497 | } |
487 | 498 | ||
488 | VictoryCondition AP_GetVictoryCondition() { | 499 | VictoryCondition AP_GetVictoryCondition() { |