about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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 aeed914..9aceef6 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -473,16 +473,27 @@ int AP_GetMasteryRequirement() { return GetState().mastery_requirement; }
473int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } 473int AP_GetLevel2Requirement() { return GetState().level_2_requirement; }
474 474
475bool AP_IsLocationVisible(int classification) { 475bool 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
488VictoryCondition AP_GetVictoryCondition() { 499VictoryCondition AP_GetVictoryCondition() {
diff --git a/src/game_data.cpp b/src/game_data.cpp index c98f532..dbc269a 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp
@@ -534,6 +534,10 @@ struct GameData {
534 } 534 }
535 } 535 }
536 536
537 if (room_name == "Starting Room") {
538 classification |= kLOCATION_SMALL_SPHERE_ONE;
539 }
540
537 int area_id = AddOrGetArea(area_name); 541 int area_id = AddOrGetArea(area_name);
538 MapArea &map_area = map_areas_[area_id]; 542 MapArea &map_area = map_areas_[area_id];
539 // room field should be the original room ID 543 // room field should be the original room ID
diff --git a/src/game_data.h b/src/game_data.h index cd09627..88f8a13 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,