From: Matthias Braun Date: Tue, 16 Nov 2004 20:37:30 +0000 (+0000) Subject: make it possible to start supertux from top soruce directory X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6a03a65019a3f5218f5775dfc08fa81f42573fcb;p=supertux.git make it possible to start supertux from top soruce directory SVN-Revision: 2101 --- diff --git a/lib/app/gettext.h b/lib/app/gettext.h index c9b81e3b2..4eb1085bd 100644 --- a/lib/app/gettext.h +++ b/lib/app/gettext.h @@ -32,6 +32,8 @@ /* Get declarations of GNU message catalog functions. */ #include +// needed for LC_ALL constant +#include #else diff --git a/lib/app/globals.cpp b/lib/app/globals.cpp index 0a328d4b5..81ca98e58 100644 --- a/lib/app/globals.cpp +++ b/lib/app/globals.cpp @@ -18,6 +18,8 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. +#include + #include "../app/globals.h" namespace SuperTux { diff --git a/lib/app/setup.cpp b/lib/app/setup.cpp index a0b4b903a..6245e4995 100644 --- a/lib/app/setup.cpp +++ b/lib/app/setup.cpp @@ -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 + #include #include #include @@ -285,6 +287,12 @@ void Setup::directories(void) 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()) { diff --git a/lib/app/setup.h b/lib/app/setup.h index 3acca6c88..9d05267c1 100644 --- a/lib/app/setup.h +++ b/lib/app/setup.h @@ -24,7 +24,6 @@ #include #include #include "../gui/menu.h" -#include "../special/base.h" namespace SuperTux {