From: Christoph Sommer Date: Mon, 8 Jan 2007 21:13:17 +0000 (+0000) Subject: Enable loading levels from .zip files in config dir, e.g. from ~/.supertux2/foo.zip... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5bdb8c3fe5670b07f1e39c5b2a13e04ec19b7adb;p=supertux.git Enable loading levels from .zip files in config dir, e.g. from ~/.supertux2/foo.zip/levels/01.stl SVN-Revision: 4534 --- diff --git a/src/lisp/parser.cpp b/src/lisp/parser.cpp index d108ba014..cfc30e8f6 100644 --- a/src/lisp/parser.cpp +++ b/src/lisp/parser.cpp @@ -60,7 +60,9 @@ static std::string dirname(std::string filename) Lisp* Parser::parse(const std::string& filename) { - IFileStream in(filename); + IFileStreambuf ins(filename); + std::istream in(&ins); + if(!in.good()) { std::stringstream msg; msg << "Parser problem: Couldn't open file '" << filename << "'."; diff --git a/src/world.cpp b/src/world.cpp index 121718e34..3f50e543c 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -106,7 +106,7 @@ World::load(const std::string& filename) // Level info file doesn't define any levels, so read the // directory to see what we can find - std::string path = basedir + "/"; + std::string path = basedir; char** files = PHYSFS_enumerateFiles(path.c_str()); if(!files) { log_warning << "Couldn't read subset dir '" << path << "'" << std::endl;