diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-17 13:58:32 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-17 13:58:32 -0400 |
| commit | e882367d80a0bcdd09b5412d908b0fdb6b6bfe34 (patch) | |
| tree | e5a023fc51f02cf37b97bfbb9ef09d2ddfc6591e /tools/mapedit/src/world.cpp | |
| parent | 29f818c314f86f9a842840c20d9634f0711507a6 (diff) | |
| download | therapy-e882367d80a0bcdd09b5412d908b0fdb6b6bfe34.tar.gz therapy-e882367d80a0bcdd09b5412d908b0fdb6b6bfe34.tar.bz2 therapy-e882367d80a0bcdd09b5412d908b0fdb6b6bfe34.zip | |
Implemented undo/redo framework in map editor
Diffstat (limited to 'tools/mapedit/src/world.cpp')
| -rw-r--r-- | tools/mapedit/src/world.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
| diff --git a/tools/mapedit/src/world.cpp b/tools/mapedit/src/world.cpp index 3145e4e..db1201e 100644 --- a/tools/mapedit/src/world.cpp +++ b/tools/mapedit/src/world.cpp | |||
| @@ -135,7 +135,7 @@ World::World(std::string filename) | |||
| 135 | } else if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-position")) | 135 | } else if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-position")) |
| 136 | { | 136 | { |
| 137 | xmlChar* key = xmlNodeListGetString(doc, entityDataNode->xmlChildrenNode, 1); | 137 | xmlChar* key = xmlNodeListGetString(doc, entityDataNode->xmlChildrenNode, 1); |
| 138 | sscanf((char*) key, "%lf,%lf", &data->position.first, &data->position.second); | 138 | sscanf((char*) key, "%d,%d", &data->position.first, &data->position.second); |
| 139 | xmlFree(key); | 139 | xmlFree(key); |
| 140 | } | 140 | } |
| 141 | } | 141 | } |
| @@ -268,6 +268,8 @@ void World::save(std::string name, wxTreeCtrl* mapTree) | |||
| 268 | { | 268 | { |
| 269 | Map& map = *mapPair.second; | 269 | Map& map = *mapPair.second; |
| 270 | 270 | ||
| 271 | if (map.getHidden()) continue; | ||
| 272 | |||
| 271 | // <map> | 273 | // <map> |
| 272 | rc = xmlTextWriterStartElement(writer, (xmlChar*) "map"); | 274 | rc = xmlTextWriterStartElement(writer, (xmlChar*) "map"); |
| 273 | if (rc < 0) throw MapWriteException(name); | 275 | if (rc < 0) throw MapWriteException(name); |
