summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2006-01-04 18:58:43 +0000
committerYohann Ferreira <bertram@cegetel.net>2006-01-04 18:58:43 +0000
commit180f39cb9da6e3169f95e9da5c8782c50f826af4 (patch)
treebdd66467f4d87d0618ddf2d2fcc67b722480cea4
parent0407ba5655db79e81f6fc23d660e37a927b8f7cc (diff)
downloadmana-180f39cb9da6e3169f95e9da5c8782c50f826af4.tar.gz
mana-180f39cb9da6e3169f95e9da5c8782c50f826af4.tar.bz2
mana-180f39cb9da6e3169f95e9da5c8782c50f826af4.tar.xz
mana-180f39cb9da6e3169f95e9da5c8782c50f826af4.zip
FreeBSD Fixes from Icy.
-rw-r--r--ChangeLog5
-rw-r--r--src/game.cpp2
-rw-r--r--src/main.cpp4
-rw-r--r--src/main.h12
4 files changed, 15 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 81cb37c0..d2f92117 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/main.h b/src/main.h
index 69d54a5a..a939879b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -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;