From c46db36fe1c319a76cb6bd089b25952db0d98e11 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 16 Mar 2015 10:30:31 -0400 Subject: Added ability to edit and remove entities to map editor --- tools/mapedit/src/object.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/mapedit/src/object.cpp') 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> MapObject::getAllObjects { if (!objsInit) { - DIR* dir = opendir("../../../entities/"); + DIR* dir = opendir("entities/"); if (dir != NULL) { struct dirent* ent; @@ -37,7 +37,7 @@ MapObject::MapObject(const char* filename) { type = filename; - xmlDocPtr doc = xmlParseFile(("../../../entities/" + std::string(filename) + ".xml").c_str()); + xmlDocPtr doc = xmlParseFile(("entities/" + std::string(filename) + ".xml").c_str()); if (doc == nullptr) throw MapObjectLoadException(filename); xmlNodePtr top = xmlDocGetRootElement(doc); @@ -56,7 +56,7 @@ MapObject::MapObject(const char* filename) std::string spriteFile = (char*) key; xmlFree(key); - sprite = wxImage("../../" + spriteFile); + sprite = wxImage(spriteFile); } else if (!xmlStrcmp(node->name, (const xmlChar*) "action")) { xmlChar* key = xmlNodeListGetString(doc, node->xmlChildrenNode, 1); -- cgit 1.4.1