[Super-tux-commit] supertux/lib/app gettext.h,1.1,1.2 globals.cpp,1.8,1.9 setup.cpp,1.15,1.16 setup.
Brought to you by:
wkendrick
From: Matze B. <mat...@us...> - 2004-11-16 20:37:40
|
Update of /cvsroot/super-tux/supertux/lib/app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26669 Modified Files: gettext.h globals.cpp setup.cpp setup.h Log Message: make it possible to start supertux from top soruce directory Index: gettext.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/gettext.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gettext.h 20 Jul 2004 17:51:34 -0000 1.1 +++ gettext.h 16 Nov 2004 20:37:30 -0000 1.2 @@ -32,6 +32,8 @@ /* Get declarations of GNU message catalog functions. */ #include <libintl.h> +// needed for LC_ALL constant +#include <locale.h> #else Index: setup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/setup.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- setup.cpp 13 Aug 2004 11:43:15 -0000 1.15 +++ setup.cpp 16 Nov 2004 20:37:30 -0000 1.16 @@ -17,6 +17,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#include <config.h> + #include <cassert> #include <cstdio> #include <iostream> @@ -285,6 +287,12 @@ mkdir((st_dir + "/levels").c_str(), 0755); + // try current directory as datadir + if(datadir.empty()) { + if(FileSystem::faccessible("./data/intro.txt")) + datadir = "./data"; + } + // User has not that a datadir, so we try some magic if (datadir.empty()) { Index: globals.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/globals.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- globals.cpp 6 Aug 2004 11:43:07 -0000 1.8 +++ globals.cpp 16 Nov 2004 20:37:30 -0000 1.9 @@ -18,6 +18,8 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. +#include <config.h> + #include "../app/globals.h" namespace SuperTux { Index: setup.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/setup.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- setup.h 6 Aug 2004 11:43:08 -0000 1.8 +++ setup.h 16 Nov 2004 20:37:30 -0000 1.9 @@ -24,7 +24,6 @@ #include <set> #include <string> #include "../gui/menu.h" -#include "../special/base.h" namespace SuperTux { |