summary refs log tree commit diff stats
path: root/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h index c5ecc64..e4096f4 100644 --- a/src/map.h +++ b/src/map.h
@@ -25,6 +25,7 @@ struct Prototype {
25 std::string interactionScript; 25 std::string interactionScript;
26 bool shadow = false; 26 bool shadow = false;
27 bool wander = false; 27 bool wander = false;
28 std::string enclosureZone;
28}; 29};
29 30
30struct Trigger { 31struct Trigger {
@@ -34,6 +35,11 @@ struct Trigger {
34 std::string script; 35 std::string script;
35}; 36};
36 37
38struct Zone {
39 vec2i ul;
40 vec2i dr;
41};
42
37class Map { 43class Map {
38public: 44public:
39 45
@@ -61,6 +67,8 @@ public:
61 67
62 const std::vector<Trigger>& getTriggers() const { return triggers_; } 68 const std::vector<Trigger>& getTriggers() const { return triggers_; }
63 69
70 const Zone& getZone(const std::string& name) const { return zones_.at(name); }
71
64private: 72private:
65 73
66 std::string name_; 74 std::string name_;
@@ -72,6 +80,7 @@ private:
72 std::vector<Prototype> prototypes_; 80 std::vector<Prototype> prototypes_;
73 std::map<std::string, vec2i> warpPoints_; 81 std::map<std::string, vec2i> warpPoints_;
74 std::vector<Trigger> triggers_; 82 std::vector<Trigger> triggers_;
83 std::map<std::string, Zone> zones_;
75}; 84};
76 85
77#endif /* end of include guard: MAP_H_D95D6D47 */ 86#endif /* end of include guard: MAP_H_D95D6D47 */