From b61e4e5b140278705c79674c02de6886b2189f71 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 26 Jun 2016 11:50:15 -0400 Subject: fixing everything that's apparently broken... --- src/ui.cpp | 6 ++++++ src/world.cpp | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ui.cpp b/src/ui.cpp index 14df95e..037ba89 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -629,6 +629,11 @@ namespace ui { while (fadeIntensity < 255); fadeIntensity = 255; } + + void waitForUncover(void) { + while (fadeIntensity > 0); + fadeIntensity = 0; + } void waitForNothing(unsigned int ms) { unsigned int target = millis() + ms; @@ -1301,6 +1306,7 @@ EXIT: wsi.first->bgmPlay(currentWorld); std::tie(currentWorld, player->loc) = wsi; toggleBlackFast(); + waitForUncover(); player->canMove = true; }; diff --git a/src/world.cpp b/src/world.cpp index 7c62739..2f1a8a6 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -1154,7 +1154,7 @@ void World::save(const std::string& s) { for (const auto &e : entity) e->saveToXML(); - currentXMLDoc.SaveFile((xmlFolder + (s.empty() ? currentXML : s)).c_str(), false); + currentXMLDoc.SaveFile((s.empty() ? currentXML : xmlFolder + s).c_str(), false); } /** @@ -1844,7 +1844,7 @@ static bool loadedRight = false; World *loadWorldFromXML(std::string path) { if (!currentXML.empty()) - currentWorld->save(path); + currentWorld->save(); return loadWorldFromXMLNoSave(path); } @@ -1994,7 +1994,7 @@ loadWorldFromXMLNoSave(std::string path) { tmp->generate(wxml->UnsignedAttribute("width") / game::HLINE); else { if (Indoor) - UserError("XML Error: tags can't be in tags (in " + _currentXML + ")!"); + UserError("XML Error: tags can't be in tags, use instead (in " + _currentXML + ")!"); else UserError("XML Error: Invalid tag in " + _currentXML + "!"); } -- cgit v1.2.3