summary refs log tree commit diff stats
path: root/tools/mapedit/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mapedit/src/map.cpp')
-rw-r--r--tools/mapedit/src/map.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/mapedit/src/map.cpp b/tools/mapedit/src/map.cpp index 0f8826c..0db7031 100644 --- a/tools/mapedit/src/map.cpp +++ b/tools/mapedit/src/map.cpp
@@ -19,6 +19,7 @@ Map::Map(const Map& map)
19 world = map.world; 19 world = map.world;
20 treeItemId = map.treeItemId; 20 treeItemId = map.treeItemId;
21 children = map.children; 21 children = map.children;
22 hidden = map.hidden;
22} 23}
23 24
24Map::Map(Map&& map) : Map(-1, map.world) 25Map::Map(Map&& map) : Map(-1, map.world)
@@ -49,6 +50,7 @@ void swap(Map& first, Map& second)
49 std::swap(first.world, second.world); 50 std::swap(first.world, second.world);
50 std::swap(first.treeItemId, second.treeItemId); 51 std::swap(first.treeItemId, second.treeItemId);
51 std::swap(first.children, second.children); 52 std::swap(first.children, second.children);
53 std::swap(first.hidden, second.hidden);
52} 54}
53 55
54int Map::getID() const 56int Map::getID() const
@@ -118,6 +120,11 @@ World* Map::getWorld() const
118 return world; 120 return world;
119} 121}
120 122
123bool Map::getHidden() const
124{
125 return hidden;
126}
127
121void Map::setTitle(std::string title, bool dirty) 128void Map::setTitle(std::string title, bool dirty)
122{ 129{
123 this->title = title; 130 this->title = title;
@@ -149,7 +156,7 @@ void Map::setMapdata(int* mapdata, bool dirty)
149 } 156 }
150} 157}
151 158
152void Map::addObject(std::shared_ptr<MapObjectEntry>& obj, bool dirty) 159void Map::addObject(std::shared_ptr<MapObjectEntry> obj, bool dirty)
153{ 160{
154 objects.push_back(obj); 161 objects.push_back(obj);
155 162
@@ -159,7 +166,7 @@ void Map::addObject(std::shared_ptr<MapObjectEntry>& obj, bool dirty)
159 } 166 }
160} 167}
161 168
162void Map::removeObject(std::shared_ptr<MapObjectEntry>& obj, bool dirty) 169void Map::removeObject(std::shared_ptr<MapObjectEntry> obj, bool dirty)
163{ 170{
164 objects.remove(obj); 171 objects.remove(obj);
165 172
@@ -203,3 +210,8 @@ void Map::setExpanded(bool exp)
203{ 210{
204 expanded = exp; 211 expanded = exp;
205} 212}
213
214void Map::setHidden(bool hid)
215{
216 hidden = hid;
217}