diff options
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 */ |