about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/area_popup.cpp14
-rw-r--r--src/game_data.cpp4
-rw-r--r--src/game_data.h4
-rw-r--r--src/tracker_panel.cpp15
4 files changed, 20 insertions, 17 deletions
diff --git a/src/area_popup.cpp b/src/area_popup.cpp index b18ba62..8d6487e 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp
@@ -55,7 +55,7 @@ void AreaPopup::UpdateIndicators() {
55 const Location& location = map_area.locations.at(section_id); 55 const Location& location = map_area.locations.at(section_id);
56 56
57 if (tracker_panel->IsPanelsMode()) { 57 if (tracker_panel->IsPanelsMode()) {
58 if (!location.panel) { 58 if (!location.single_panel) {
59 continue; 59 continue;
60 } 60 }
61 } else { 61 } else {
@@ -117,12 +117,12 @@ void AreaPopup::UpdateIndicators() {
117 if (IsLocationWinCondition(location)) { 117 if (IsLocationWinCondition(location)) {
118 checked = AP_HasReachedGoal(); 118 checked = AP_HasReachedGoal();
119 } else if (tracker_panel->IsPanelsMode()) { 119 } else if (tracker_panel->IsPanelsMode()) {
120 checked = location.panel && std::any_of( 120 const Panel& panel = GD_GetPanel(*location.single_panel);
121 location.panels.begin(), location.panels.end(), 121 if (panel.non_counting) {
122 [tracker_panel](int panel_id) { 122 checked = AP_HasCheckedGameLocation(location.ap_location_id);
123 const Panel& panel = GD_GetPanel(panel_id); 123 } else {
124 return tracker_panel->GetSolvedPanels().contains(panel.nodepath); 124 checked = tracker_panel->GetSolvedPanels().contains(panel.nodepath);
125 }); 125 }
126 } else { 126 } else {
127 checked = 127 checked =
128 AP_HasCheckedGameLocation(location.ap_location_id) || 128 AP_HasCheckedGameLocation(location.ap_location_id) ||
diff --git a/src/game_data.cpp b/src/game_data.cpp index b8e1386..c39e239 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp
@@ -570,7 +570,7 @@ struct GameData {
570 .panels = {panel.id}, 570 .panels = {panel.id},
571 .classification = classification, 571 .classification = classification,
572 .hunt = panel.hunt, 572 .hunt = panel.hunt,
573 .panel = true}); 573 .single_panel = panel.id});
574 locations_by_name[location_name] = {area_id, 574 locations_by_name[location_name] = {area_id,
575 map_area.locations.size() - 1}; 575 map_area.locations.size() - 1};
576 } 576 }
@@ -623,7 +623,7 @@ struct GameData {
623 for (const Location &location : map_area.locations) { 623 for (const Location &location : map_area.locations) {
624 map_area.classification |= location.classification; 624 map_area.classification |= location.classification;
625 map_area.hunt |= location.hunt; 625 map_area.hunt |= location.hunt;
626 map_area.panel |= location.panel; 626 map_area.has_single_panel |= location.single_panel.has_value();
627 } 627 }
628 } 628 }
629 629
diff --git a/src/game_data.h b/src/game_data.h index 71bc533..3179365 100644 --- a/src/game_data.h +++ b/src/game_data.h
@@ -114,7 +114,7 @@ struct Location {
114 std::vector<int> panels; 114 std::vector<int> panels;
115 int classification = 0; 115 int classification = 0;
116 bool hunt = false; 116 bool hunt = false;
117 bool panel = false; 117 std::optional<int> single_panel;
118}; 118};
119 119
120struct MapArea { 120struct MapArea {
@@ -126,7 +126,7 @@ struct MapArea {
126 int map_y; 126 int map_y;
127 int classification = 0; 127 int classification = 0;
128 bool hunt = false; 128 bool hunt = false;
129 bool panel = false; 129 bool has_single_panel = false;
130}; 130};
131 131
132enum class SubwaySunwarpType { 132enum class SubwaySunwarpType {
diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 42c3132..27e825a 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp
@@ -180,7 +180,7 @@ void TrackerPanel::Redraw() {
180 for (AreaIndicator &area : areas_) { 180 for (AreaIndicator &area : areas_) {
181 const MapArea &map_area = GD_GetMapArea(area.area_id); 181 const MapArea &map_area = GD_GetMapArea(area.area_id);
182 if (panels_mode_) { 182 if (panels_mode_) {
183 area.active = map_area.panel; 183 area.active = map_area.has_single_panel;
184 } else if (!AP_IsLocationVisible(map_area.classification) && 184 } else if (!AP_IsLocationVisible(map_area.classification) &&
185 !(map_area.hunt && GetTrackerConfig().show_hunt_panels) && 185 !(map_area.hunt && GetTrackerConfig().show_hunt_panels) &&
186 !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { 186 !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) {
@@ -200,11 +200,14 @@ void TrackerPanel::Redraw() {
200 if (IsLocationWinCondition(section)) { 200 if (IsLocationWinCondition(section)) {
201 has_unchecked = !AP_HasReachedGoal(); 201 has_unchecked = !AP_HasReachedGoal();
202 } else if (panels_mode_) { 202 } else if (panels_mode_) {
203 has_unchecked = section.panel && std::any_of( 203 if (section.single_panel) {
204 section.panels.begin(), section.panels.end(), [this](int panel_id) { 204 const Panel &panel = GD_GetPanel(*section.single_panel);
205 const Panel &panel = GD_GetPanel(panel_id); 205 if (panel.non_counting) {
206 return !solved_panels_.contains(panel.nodepath); 206 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id);
207 }); 207 } else {
208 has_unchecked = !solved_panels_.contains(panel.nodepath);
209 }
210 }
208 } else if (AP_IsLocationVisible(section.classification)) { 211 } else if (AP_IsLocationVisible(section.classification)) {
209 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); 212 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id);
210 } else if (section.hunt && GetTrackerConfig().show_hunt_panels) { 213 } else if (section.hunt && GetTrackerConfig().show_hunt_panels) {