diff options
Diffstat (limited to 'frontend/load_dungeon.cpp')
-rw-r--r-- | frontend/load_dungeon.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/frontend/load_dungeon.cpp b/frontend/load_dungeon.cpp index 41c7fc4..23b4094 100644 --- a/frontend/load_dungeon.cpp +++ b/frontend/load_dungeon.cpp @@ -31,7 +31,7 @@ unique_ptr<Dungeon> load_dungeon(const string & filename) { throw Exception("Kon bestand niet vinden"); } - xml_parse_result result = doc.load_file(canonical.c_str()); + xml_parse_result result = doc.load_file(canonical.c_str(), parse_default, encoding_latin1); if (!result) throw Exception("Kon XML-bestand niet lezen"); @@ -48,10 +48,10 @@ unique_ptr<Dungeon> load_dungeon(const string & filename) { map<unsigned, TempData> temp_map; for (xml_node & tag : locations) { - const char * name = tag.text().as_string(); - const char * description = tag.child("beschrijving").text().as_string(); - - Location * location = LocationFactory::create_location(name, description); + Location * location = LocationFactory::create_location( + tag.text().as_string(), + tag.child("beschrijving").text().as_string() + ); vector<string> objects_hidden = str_split(tag.attribute("objectenverborgen").as_string(), ";"); for (string & name : objects_hidden) { |