(svn r10145) -Fix: make compiling with networking disabled (again) possible.
authorrubidium
Wed, 13 Jun 2007 17:34:05 +0000
changeset 6898 d23c46e9a6ec
parent 6897 8eb8cb2b5d1e
child 6899 7edc4e4b1fd8
(svn r10145) -Fix: make compiling with networking disabled (again) possible.
src/intro_gui.cpp
src/main_gui.cpp
src/oldloader.cpp
src/strings.cpp
--- a/src/intro_gui.cpp	Wed Jun 13 16:23:59 2007 +0000
+++ b/src/intro_gui.cpp	Wed Jun 13 17:34:05 2007 +0000
@@ -64,9 +64,11 @@
 		break;
 
 	case WE_CLICK:
+#ifdef ENABLE_NETWORK
 		/* Do not create a network server when you (just) have closed one of the game
 		 * creation/load windows for the network server. */
 		if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false;
+#endif /* ENABLE_NETWORK */
 
 		switch (e->we.click.widget) {
 		case 2: ShowGenerateLandscape(); break;
--- a/src/main_gui.cpp	Wed Jun 13 16:23:59 2007 +0000
+++ b/src/main_gui.cpp	Wed Jun 13 17:34:05 2007 +0000
@@ -61,6 +61,7 @@
 
 void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
+#ifdef ENABLE_NETWORK
 	if (!success) return;
 
 	char msg[20];
@@ -72,6 +73,7 @@
 	} else {
 		NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, NETWORK_SERVER_INDEX);
 	}
+#endif /* ENABLE_NETWORK */
 }
 
 void HandleOnEditText(const char *str)
--- a/src/oldloader.cpp	Wed Jun 13 16:23:59 2007 +0000
+++ b/src/oldloader.cpp	Wed Jun 13 17:34:05 2007 +0000
@@ -22,7 +22,7 @@
 #include "signs.h"
 #include "debug.h"
 #include "depot.h"
-#include "network/network.h"
+#include "newgrf_config.h"
 #include "ai/ai.h"
 #include "date.h"
 
--- a/src/strings.cpp	Wed Jun 13 16:23:59 2007 +0000
+++ b/src/strings.cpp	Wed Jun 13 17:34:05 2007 +0000
@@ -1101,7 +1101,11 @@
 	}
 }
 
+#ifdef ENABLE_NETWORK
 extern void SortNetworkLanguages();
+#else /* ENABLE_NETWORK */
+static inline void SortNetworkLanguages() {}
+#endif /* ENABLE_NETWORK */
 extern void SortTownGeneratorNames();
 
 bool ReadLanguagePack(int lang_index)