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-05-17 18:08:52 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-05-17 18:08:52 -0400
commitb744535ac15bb26344d334ada81d5509a4bc382d (patch)
tree666d1d07ff04f4e5823cf35d37a0f927c14ad718 /src/ap_state.cpp
parent085531b53449dc28bc18739b06772641c5c82192 (diff)
parentda8f3caeee5b01c38db30ebb146b76dc41f9ca74 (diff)
downloadlingo-ap-tracker-b744535ac15bb26344d334ada81d5509a4bc382d.tar.gz
lingo-ap-tracker-b744535ac15bb26344d334ada81d5509a4bc382d.tar.bz2
lingo-ap-tracker-b744535ac15bb26344d334ada81d5509a4bc382d.zip
Merge branch 'tinysphere' into 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 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() {