diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/main.h | 12 |
4 files changed, 15 insertions, 8 deletions
@@ -1,3 +1,8 @@ +2006-01-04 Icy <icywolf@web.de> + + * src/game.cpp, src/main.cpp, src/main.h: FreeBSD fixes to The Mana + World. + 2006-01-03 Eugenio Favalli <elvenprogrammer@gmail.com> * src/game.cpp, src/gui/chat.cpp, src/gui/chat.h, src/gui/login.cpp, diff --git a/src/game.cpp b/src/game.cpp index 7f873aef..72dbb0c9 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -344,7 +344,7 @@ bool saveScreenshot(SDL_Surface *screenshot) do { screenshotCount++; filename.str(""); -#ifdef __USE_UNIX98 +#if (defined __USE_UNIX98 || defined __FreeBSD__) filename << PHYSFS_getUserDir() << "/"; #endif filename << "TMW_Screenshot_" << screenshotCount << ".png"; diff --git a/src/main.cpp b/src/main.cpp index 0a126afb..f0f885e7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,7 +33,7 @@ #include <libxml/parser.h> -#ifdef __USE_UNIX98 +#if (defined __USE_UNIX98 || defined __FreeBSD__) #include <cerrno> #include <sys/stat.h> #endif @@ -136,7 +136,7 @@ void init_engine() SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); std::string homeDir = ""; -#ifndef __USE_UNIX98 +#if !(defined __USE_UNIX98 || defined __FreeBSD__) // In Windows and other systems we currently store data next to executable. homeDir = "."; #else @@ -29,7 +29,7 @@ class Image; class Sound; -#ifdef __USE_UNIX98 +#if (defined __USE_UNIX98 || defined __FreeBSD__) #include "../config.h" #elif defined WIN32 #include "../The_Mana_World_private.h" @@ -59,10 +59,12 @@ enum { * to be able to use strncpy instead of strcpy for * security and stability reasons */ -#define LEN_MAX_USERNAME 25 -#define LEN_MIN_USERNAME 4 -#define LEN_MAX_PASSWORD 25 -#define LEN_MIN_PASSWORD 4 +enum { + LEN_MAX_USERNAME = 25, + LEN_MIN_USERNAME = 4, + LEN_MAX_PASSWORD = 25, + LEN_MIN_PASSWORD = 4 +}; extern int map_address, char_ID; extern short map_port; |