From d7212d755dca7f4fd99cf4b775cd0d372d7bcbb2 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 5 May 2023 16:35:09 -0400 Subject: Refactored away singletons (Except TrackerConfig, for now at least) --- src/area_popup.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/area_popup.cpp') diff --git a/src/area_popup.cpp b/src/area_popup.cpp index a8ff612..88dffe0 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp @@ -6,7 +6,7 @@ AreaPopup::AreaPopup(wxWindow* parent, int area_id) : wxPanel(parent, wxID_ANY), area_id_(area_id) { - const MapArea& map_area = GetGameData().GetMapArea(area_id); + const MapArea& map_area = GD_GetMapArea(area_id); wxFlexGridSizer* section_sizer = new wxFlexGridSizer(2, 10, 10); @@ -40,12 +40,11 @@ AreaPopup::AreaPopup(wxWindow* parent, int area_id) } void AreaPopup::UpdateIndicators() { - const MapArea& map_area = GetGameData().GetMapArea(area_id_); + const MapArea& map_area = GD_GetMapArea(area_id_); for (int section_id = 0; section_id < map_area.locations.size(); section_id++) { bool checked = AP_HasCheckedGameLocation(area_id_, section_id); - bool reachable = - GetTrackerState().IsLocationReachable(area_id_, section_id); + bool reachable = IsLocationReachable(area_id_, section_id); const wxColour* text_color = reachable ? wxWHITE : wxRED; section_labels_[section_id]->SetForegroundColour(*text_color); -- cgit 1.4.1