Update of /cvsroot/super-tux/supertux/lib/app
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/lib/app
Modified Files:
setup.cpp setup.h
Log Message:
changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile
Index: setup.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/setup.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- setup.cpp 25 Nov 2004 19:48:24 -0000 1.21
+++ setup.cpp 2 Dec 2004 00:25:27 -0000 1.22
@@ -67,7 +67,7 @@
void usage(char * prog, int ret);
/* Does the given file exist and is it accessible? */
-int FileSystem::faccessible(const std::string& filename)
+bool FileSystem::faccessible(const std::string& filename)
{
struct stat filestat;
if (stat(filename.c_str(), &filestat) == -1)
@@ -84,7 +84,7 @@
}
/* Can we write to this location? */
-int FileSystem::fwriteable(const std::string& filename)
+bool FileSystem::fwriteable(const std::string& filename)
{
FILE* fi;
fi = fopen(filename.c_str(), "wa");
@@ -97,7 +97,7 @@
}
/* Makes sure a directory is created in either the SuperTux home directory or the SuperTux base directory.*/
-int FileSystem::fcreatedir(const std::string& relative_dir)
+bool FileSystem::fcreatedir(const std::string& relative_dir)
{
std::string path = st_dir + "/" + relative_dir + "/";
if(mkdir(path.c_str(),0755) != 0)
Index: setup.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/setup.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- setup.h 23 Nov 2004 22:21:50 -0000 1.11
+++ setup.h 2 Dec 2004 00:25:27 -0000 1.12
@@ -29,9 +29,9 @@
/// File system utility functions
struct FileSystem
{
- static int faccessible(const std::string& filename);
- static int fcreatedir(const std::string& relative_dir);
- static int fwriteable(const std::string& filename);
+ static bool faccessible(const std::string& filename);
+ static bool fcreatedir(const std::string& relative_dir);
+ static bool fwriteable(const std::string& filename);
static std::set<std::string> read_directory(const std::string& pathname);
static std::set<std::string> dsubdirs(const std::string& rel_path, const std::string& expected_file);
static std::set<std::string> dfiles(const std::string& rel_path, const std::string& glob, const std::string& exception_str);
|