diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-15 23:24:22 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-15 23:24:22 -0400 |
| commit | 213cab3c04b81428ab715f340bd7c12438fdb980 (patch) | |
| tree | 295d25eac4b94357ac5b9bb4b3fd03130181b956 /tools/mapedit/src/map.cpp | |
| parent | 25240241e91dc913d20fbb93aa4acc9433dda6a0 (diff) | |
| download | therapy-213cab3c04b81428ab715f340bd7c12438fdb980.tar.gz therapy-213cab3c04b81428ab715f340bd7c12438fdb980.tar.bz2 therapy-213cab3c04b81428ab715f340bd7c12438fdb980.zip | |
Map editor can now add entities to maps
Also fixed a big bug regarding scrolling
Diffstat (limited to 'tools/mapedit/src/map.cpp')
| -rw-r--r-- | tools/mapedit/src/map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
| diff --git a/tools/mapedit/src/map.cpp b/tools/mapedit/src/map.cpp index b0440fb..1414e16 100644 --- a/tools/mapedit/src/map.cpp +++ b/tools/mapedit/src/map.cpp | |||
| @@ -66,7 +66,7 @@ Map::Map(std::string filename) | |||
| 66 | if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-type")) | 66 | if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-type")) |
| 67 | { | 67 | { |
| 68 | xmlChar* key = xmlNodeListGetString(doc, entityDataNode->xmlChildrenNode, 1); | 68 | xmlChar* key = xmlNodeListGetString(doc, entityDataNode->xmlChildrenNode, 1); |
| 69 | data.object = MapObject::getAllObjects().at((char*) key); | 69 | data.object = MapObject::getAllObjects().at((char*) key).get(); |
| 70 | xmlFree(key); | 70 | xmlFree(key); |
| 71 | } else if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-position")) | 71 | } else if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-position")) |
| 72 | { | 72 | { |
| @@ -226,7 +226,7 @@ void Map::setTitle(std::string title) | |||
| 226 | this->title = title; | 226 | this->title = title; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | std::list<MapObjectEntry> Map::getObjects() | 229 | std::list<MapObjectEntry>& Map::getObjects() |
| 230 | { | 230 | { |
| 231 | return objects; | 231 | return objects; |
| 232 | } | 232 | } |
