diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-16 10:30:31 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-16 10:30:31 -0400 |
commit | c46db36fe1c319a76cb6bd089b25952db0d98e11 (patch) | |
tree | a4ede892db1dc292a221ff33f991e1b92028a9b4 /tools/mapedit/src/object.cpp | |
parent | 54eee8e0a79898825b39749b38134f4369ccd3ab (diff) | |
download | therapy-c46db36fe1c319a76cb6bd089b25952db0d98e11.tar.gz therapy-c46db36fe1c319a76cb6bd089b25952db0d98e11.tar.bz2 therapy-c46db36fe1c319a76cb6bd089b25952db0d98e11.zip |
Added ability to edit and remove entities to map editor
Diffstat (limited to 'tools/mapedit/src/object.cpp')
-rw-r--r-- | tools/mapedit/src/object.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/mapedit/src/object.cpp b/tools/mapedit/src/object.cpp index 4cd267d..a783691 100644 --- a/tools/mapedit/src/object.cpp +++ b/tools/mapedit/src/object.cpp | |||
@@ -10,7 +10,7 @@ const std::map<std::string, std::shared_ptr<MapObject>> MapObject::getAllObjects | |||
10 | { | 10 | { |
11 | if (!objsInit) | 11 | if (!objsInit) |
12 | { | 12 | { |
13 | DIR* dir = opendir("../../../entities/"); | 13 | DIR* dir = opendir("entities/"); |
14 | if (dir != NULL) | 14 | if (dir != NULL) |
15 | { | 15 | { |
16 | struct dirent* ent; | 16 | struct dirent* ent; |
@@ -37,7 +37,7 @@ MapObject::MapObject(const char* filename) | |||
37 | { | 37 | { |
38 | type = filename; | 38 | type = filename; |
39 | 39 | ||
40 | xmlDocPtr doc = xmlParseFile(("../../../entities/" + std::string(filename) + ".xml").c_str()); | 40 | xmlDocPtr doc = xmlParseFile(("entities/" + std::string(filename) + ".xml").c_str()); |
41 | if (doc == nullptr) throw MapObjectLoadException(filename); | 41 | if (doc == nullptr) throw MapObjectLoadException(filename); |
42 | 42 | ||
43 | xmlNodePtr top = xmlDocGetRootElement(doc); | 43 | xmlNodePtr top = xmlDocGetRootElement(doc); |
@@ -56,7 +56,7 @@ MapObject::MapObject(const char* filename) | |||
56 | std::string spriteFile = (char*) key; | 56 | std::string spriteFile = (char*) key; |
57 | xmlFree(key); | 57 | xmlFree(key); |
58 | 58 | ||
59 | sprite = wxImage("../../" + spriteFile); | 59 | sprite = wxImage(spriteFile); |
60 | } else if (!xmlStrcmp(node->name, (const xmlChar*) "action")) | 60 | } else if (!xmlStrcmp(node->name, (const xmlChar*) "action")) |
61 | { | 61 | { |
62 | xmlChar* key = xmlNodeListGetString(doc, node->xmlChildrenNode, 1); | 62 | xmlChar* key = xmlNodeListGetString(doc, node->xmlChildrenNode, 1); |