diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-20 14:33:43 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-20 14:33:43 -0500 |
commit | 3c49081df34fb1801063c0b538d12d4422fcf3f0 (patch) | |
tree | f4d267d953c97b0ee3e78730d8e36484abf7f096 /src/subway_map.h | |
parent | 5a7559e39d2cd8306a99adbc6d39e90716b14687 (diff) | |
download | lingo-ap-tracker-3c49081df34fb1801063c0b538d12d4422fcf3f0.tar.gz lingo-ap-tracker-3c49081df34fb1801063c0b538d12d4422fcf3f0.tar.bz2 lingo-ap-tracker-3c49081df34fb1801063c0b538d12d4422fcf3f0.zip |
Fixed remaining thread unsafe APState/IPCState reads
Still would like to add some kind of wrapper object that TrackerState could use to read APState without locking, since it'll only ever be called from the thread that would do the mutating, but this is fine for now.
Diffstat (limited to 'src/subway_map.h')
-rw-r--r-- | src/subway_map.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/subway_map.h b/src/subway_map.h index feee8ff..6aa31f5 100644 --- a/src/subway_map.h +++ b/src/subway_map.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <quadtree/Quadtree.h> | 16 | #include <quadtree/Quadtree.h> |
17 | 17 | ||
18 | #include "ap_state.h" | ||
18 | #include "game_data.h" | 19 | #include "game_data.h" |
19 | #include "network_set.h" | 20 | #include "network_set.h" |
20 | 21 | ||
@@ -50,6 +51,8 @@ class SubwayMap : public wxPanel { | |||
50 | void SetScrollSpeed(int scroll_x, int scroll_y); | 51 | void SetScrollSpeed(int scroll_x, int scroll_y); |
51 | void SetZoom(double zoom, wxPoint static_point); | 52 | void SetZoom(double zoom, wxPoint static_point); |
52 | 53 | ||
54 | std::optional<int> GetRealSubwayDoor(const SubwayItem subway_item); | ||
55 | |||
53 | wxImage map_image_; | 56 | wxImage map_image_; |
54 | wxImage owl_image_; | 57 | wxImage owl_image_; |
55 | wxBitmap unchecked_eye_; | 58 | wxBitmap unchecked_eye_; |
@@ -87,6 +90,9 @@ class SubwayMap : public wxPanel { | |||
87 | 90 | ||
88 | NetworkSet networks_; | 91 | NetworkSet networks_; |
89 | std::set<std::string> checked_paintings_; | 92 | std::set<std::string> checked_paintings_; |
93 | |||
94 | // Cached from APState. | ||
95 | std::map<int, SunwarpMapping> sunwarp_mapping_; | ||
90 | }; | 96 | }; |
91 | 97 | ||
92 | #endif /* end of include guard: SUBWAY_MAP_H_BD2D843E */ | 98 | #endif /* end of include guard: SUBWAY_MAP_H_BD2D843E */ |