diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-02 10:07:25 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-02 10:07:25 -0400 |
commit | 9f25878acfe1c7281a96f83742349516510c5b6d (patch) | |
tree | d68daca94d65ac97fe9ac0a87fb0a3f95f4b6fea /game_data.h | |
parent | 531898b0fef9f81e82ad5d5f38d2c627a0c10e56 (diff) | |
download | lingo-ap-tracker-9f25878acfe1c7281a96f83742349516510c5b6d.tar.gz lingo-ap-tracker-9f25878acfe1c7281a96f83742349516510c5b6d.tar.bz2 lingo-ap-tracker-9f25878acfe1c7281a96f83742349516510c5b6d.zip |
Added areas to map
Diffstat (limited to 'game_data.h')
-rw-r--r-- | game_data.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/game_data.h b/game_data.h index 761b233..91b48a5 100644 --- a/game_data.h +++ b/game_data.h | |||
@@ -57,6 +57,7 @@ struct Location { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | struct MapArea { | 59 | struct MapArea { |
60 | int id; | ||
60 | std::string name; | 61 | std::string name; |
61 | std::vector<Location> locations; | 62 | std::vector<Location> locations; |
62 | int map_x; | 63 | int map_x; |
@@ -67,20 +68,27 @@ class GameData { | |||
67 | public: | 68 | public: |
68 | GameData(); | 69 | GameData(); |
69 | 70 | ||
71 | const std::vector<MapArea>& GetMapAreas() const { return map_areas_; } | ||
72 | |||
73 | const MapArea& GetMapArea(int id) const { return map_areas_.at(id); } | ||
74 | |||
70 | private: | 75 | private: |
71 | int AddOrGetRoom(std::string room); | 76 | int AddOrGetRoom(std::string room); |
72 | int AddOrGetDoor(std::string room, std::string door); | 77 | int AddOrGetDoor(std::string room, std::string door); |
73 | int AddOrGetPanel(std::string room, std::string panel); | 78 | int AddOrGetPanel(std::string room, std::string panel); |
79 | int AddOrGetArea(std::string area); | ||
74 | 80 | ||
75 | std::vector<Room> rooms_; | 81 | std::vector<Room> rooms_; |
76 | std::vector<Door> doors_; | 82 | std::vector<Door> doors_; |
77 | std::vector<Panel> panels_; | 83 | std::vector<Panel> panels_; |
84 | std::vector<MapArea> map_areas_; | ||
78 | 85 | ||
79 | std::map<std::string, int> room_by_id_; | 86 | std::map<std::string, int> room_by_id_; |
80 | std::map<std::string, int> door_by_id_; | 87 | std::map<std::string, int> door_by_id_; |
81 | std::map<std::string, int> panel_by_id_; | 88 | std::map<std::string, int> panel_by_id_; |
89 | std::map<std::string, int> area_by_id_; | ||
82 | }; | 90 | }; |
83 | 91 | ||
84 | const GameData &GetGameData(); | 92 | const GameData& GetGameData(); |
85 | 93 | ||
86 | #endif /* end of include guard: GAME_DATA_H_9C42AC51 */ | 94 | #endif /* end of include guard: GAME_DATA_H_9C42AC51 */ |