about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 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() {
diff --git a/src/game_data.cpp b/src/game_data.cpp index be31b8f..bc4f41b 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp
@@ -552,6 +552,10 @@ struct GameData {
552 } 552 }
553 } 553 }
554 554
555 if (room_name == "Starting Room") {
556 classification |= kLOCATION_SMALL_SPHERE_ONE;
557 }
558
555 int area_id = AddOrGetArea(area_name); 559 int area_id = AddOrGetArea(area_name);
556 MapArea &map_area = map_areas_[area_id]; 560 MapArea &map_area = map_areas_[area_id];
557 // room field should be the original room ID 561 // room field should be the original room ID
diff --git a/src/game_data.h b/src/game_data.h index f3edaa2..e30675a 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,