/**
* The currently used folder to look for XML files in.
*/
-std::string xmlFolder = "xml/";
+std::string xmlFolder = "./xml/";
/**
* The current center of the screen, updated in main render.
// kill the world if needed
if (worldReset) {
+ for (const auto& s : xmlFiles) {
+ if (s.find(".dat", s.size() - 4) != std::string::npos) {
+ std::string re = xmlFolder;
+ re.append(s);
+ auto r = re.c_str();
+ std::cout << "Removing " << r << "...\n";
+ std::remove(r);
+ }
+ }
+
// TODO TODO TODO we do xml/*.dat now... kill that
game::briceClear();
}
return;
// save the current world's data
- save();
+ if (!currentXMLFile.empty())
+ save();
// load file data to string
auto xmlPath = xmlFolder + file;