about summary refs log tree commit diff stats
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
parent96f7f50ee10165a76495b7bcd2f269464fb8c79e (diff)
parentb744535ac15bb26344d334ada81d5509a4bc382d (diff)
downloadlingo-ap-tracker-6f46d871169ba177bbd398e2d489f32e22d192c9.tar.gz
lingo-ap-tracker-6f46d871169ba177bbd398e2d489f32e22d192c9.tar.bz2
lingo-ap-tracker-6f46d871169ba177bbd398e2d489f32e22d192c9.zip
Merge branch 'future'
-rw-r--r--src/ap_state.cpp17
-rw-r--r--src/game_data.cpp4
-rw-r--r--src/game_data.h1
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; }
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() {
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 {
22constexpr int kLOCATION_NORMAL = 1; 22constexpr int kLOCATION_NORMAL = 1;
23constexpr int kLOCATION_REDUCED = 2; 23constexpr int kLOCATION_REDUCED = 2;
24constexpr int kLOCATION_INSANITY = 4; 24constexpr int kLOCATION_INSANITY = 4;
25constexpr int kLOCATION_SMALL_SPHERE_ONE = 8;
25 26
26enum class EntranceType { 27enum class EntranceType {
27 kNormal, 28 kNormal,