about summary refs log tree commit diff stats
path: root/src/ap_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ap_state.h')
-rw-r--r--src/ap_state.h44
1 files changed, 36 insertions, 8 deletions
diff --git a/src/ap_state.h b/src/ap_state.h index 5fbb720..a757d89 100644 --- a/src/ap_state.h +++ b/src/ap_state.h
@@ -11,7 +11,7 @@
11 11
12class TrackerFrame; 12class TrackerFrame;
13 13
14enum DoorShuffleMode { kNO_DOORS = 0, kSIMPLE_DOORS = 1, kCOMPLEX_DOORS = 2 }; 14enum DoorShuffleMode { kNO_DOORS = 0, kPANELS_MODE = 1, kDOORS_MODE = 2 };
15 15
16enum VictoryCondition { 16enum VictoryCondition {
17 kTHE_END = 0, 17 kTHE_END = 0,
@@ -26,6 +26,8 @@ enum LocationChecks {
26 kPANELSANITY = 2 26 kPANELSANITY = 2
27}; 27};
28 28
29enum PanelShuffleMode { kNO_PANELS = 0, kREARRANGE_PANELS = 1 };
30
29enum SunwarpAccess { 31enum SunwarpAccess {
30 kSUNWARP_ACCESS_NORMAL = 0, 32 kSUNWARP_ACCESS_NORMAL = 0,
31 kSUNWARP_ACCESS_DISABLED = 1, 33 kSUNWARP_ACCESS_DISABLED = 1,
@@ -39,35 +41,57 @@ struct SunwarpMapping {
39 int exit_index; 41 int exit_index;
40}; 42};
41 43
44struct ItemState {
45 std::string name;
46 int amount = 0;
47 int index = 0;
48};
49
42void AP_SetTrackerFrame(TrackerFrame* tracker_frame); 50void AP_SetTrackerFrame(TrackerFrame* tracker_frame);
43 51
44void AP_Connect(std::string server, std::string player, std::string password); 52void AP_Connect(std::string server, std::string player, std::string password);
45 53
46bool AP_HasCheckedGameLocation(int location_id); 54std::string AP_GetStatusMessage();
47 55
48bool AP_HasCheckedHuntPanel(int location_id); 56std::string AP_GetSaveName();
49 57
58bool AP_HasCheckedGameLocation(int location_id);
59
60// This doesn't lock the state mutex, for speed, so it must ONLY be called from
61// RecalculateReachability, which is only called from the APState thread anyway.
50bool AP_HasItem(int item_id, int quantity = 1); 62bool AP_HasItem(int item_id, int quantity = 1);
51 63
64bool AP_HasItemSafe(int item_id, int quantity = 1);
65
52DoorShuffleMode AP_GetDoorShuffleMode(); 66DoorShuffleMode AP_GetDoorShuffleMode();
53 67
68bool AP_AreDoorsGrouped();
69
54bool AP_IsColorShuffle(); 70bool AP_IsColorShuffle();
55 71
56bool AP_IsPaintingShuffle(); 72bool AP_IsPaintingShuffle();
57 73
58const std::map<std::string, std::string>& AP_GetPaintingMapping(); 74std::map<std::string, std::string> AP_GetPaintingMapping();
59 75
60const std::set<std::string>& AP_GetCheckedPaintings(); 76bool AP_IsPaintingMappedTo(const std::string& painting_id);
77
78std::set<std::string> AP_GetCheckedPaintings();
79
80bool AP_IsPaintingChecked(const std::string& painting_id);
81
82void AP_RevealPaintings();
61 83
62int AP_GetMasteryRequirement(); 84int AP_GetMasteryRequirement();
63 85
64int AP_GetLevel2Requirement(); 86int AP_GetLevel2Requirement();
65 87
88LocationChecks AP_GetLocationsChecks();
89
66bool AP_IsLocationVisible(int classification); 90bool AP_IsLocationVisible(int classification);
67 91
68VictoryCondition AP_GetVictoryCondition(); 92PanelShuffleMode AP_GetPanelShuffleMode();
69 93
70bool AP_HasAchievement(const std::string& achievement_name); 94VictoryCondition AP_GetVictoryCondition();
71 95
72bool AP_HasEarlyColorHallways(); 96bool AP_HasEarlyColorHallways();
73 97
@@ -81,10 +105,14 @@ SunwarpAccess AP_GetSunwarpAccess();
81 105
82bool AP_IsSunwarpShuffle(); 106bool AP_IsSunwarpShuffle();
83 107
84const std::map<int, SunwarpMapping>& AP_GetSunwarpMapping(); 108std::map<int, SunwarpMapping> AP_GetSunwarpMapping();
109
110bool AP_IsPostgameShuffle();
85 111
86bool AP_HasReachedGoal(); 112bool AP_HasReachedGoal();
87 113
88std::optional<std::tuple<int, int>> AP_GetPlayerPosition(); 114std::optional<std::tuple<int, int>> AP_GetPlayerPosition();
89 115
116bool AP_IsPanelSolved(int solve_index);
117
90#endif /* end of include guard: AP_STATE_H_664A4180 */ 118#endif /* end of include guard: AP_STATE_H_664A4180 */