summaryrefslogtreecommitdiff
path: root/player_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-12 14:59:27 +0000
committerDarkvater <darkvater@openttd.org>2006-10-12 14:59:27 +0000
commitcad526ef3658ad6420939a6d51707c9dbfee97c3 (patch)
tree9d8040d778bee72bdeda716299434c03e98d3b14 /player_gui.c
parent15bf48acfda4ce5e5291e0a68292d7f9d9b6a569 (diff)
downloadopenttd-cad526ef3658ad6420939a6d51707c9dbfee97c3.tar.xz
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
disabled hardcode _networking/_network_available to zero and let the compiler handle all optimizations.
Diffstat (limited to 'player_gui.c')
-rw-r--r--player_gui.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/player_gui.c b/player_gui.c
index 801aeb104..133ef5148 100644
--- a/player_gui.c
+++ b/player_gui.c
@@ -18,15 +18,11 @@
#include "train.h"
#include "date.h"
#include "newgrf.h"
-
-#ifdef ENABLE_NETWORK
#include "network_data.h"
#include "network_client.h"
-#endif
static void DoShowPlayerFinances(PlayerID player, bool show_small, bool show_stickied);
-
static void DrawPlayerEconomyStats(const Player *p, byte mode)
{
int x,y,i,j,year;
@@ -811,15 +807,15 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
DoCommandP(0, w->window_number, 0, NULL, CMD_SELL_SHARE_IN_COMPANY | CMD_MSG(STR_707C_CAN_T_SELL_25_SHARE_IN));
break;
+ #ifdef ENABLE_NETWORK
case PCW_WIDGET_COMPANY_PASSWORD:
- #ifdef ENABLE_NETWORK
if (w->window_number == _local_player) {
WP(w,def_d).byte_1 = 2;
ShowQueryString(BindCString(_network_player_info[_local_player].password),
STR_SET_COMPANY_PASSWORD, sizeof(_network_player_info[_local_player].password), 250, w->window_class, w->window_number, CS_ALPHANUMERAL);
}
- #endif
break;
+ #endif /* ENABLE_NETWORK */
}
break;
@@ -857,12 +853,12 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
case 1: /* Change company name */
DoCommandP(0, 0, 0, NULL, CMD_CHANGE_COMPANY_NAME | CMD_MSG(STR_700C_CAN_T_CHANGE_COMPANY_NAME));
break;
+ #ifdef ENABLE_NETWORK
case 2: /* Change company password */
- #ifdef ENABLE_NETWORK
if (*b == '\0') *b = '*'; // empty password is a '*' because of console argument
NetworkChangeCompanyPassword(1, &b);
- #endif
break;
+ #endif /* ENABLE_NETWORK */
}
break;
}