summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-06-21 16:28:17 +0000
committercelestar <celestar@openttd.org>2005-06-21 16:28:17 +0000
commit354058341b8500cbb0075c0c568ec12063e84fe7 (patch)
treedbd1b9d6a856fcab15da2adfe0bacfb2bdc19b7e /main_gui.c
parent09f92807fc061b80b976a4134d71670ef4ef64fa (diff)
downloadopenttd-354058341b8500cbb0075c0c568ec12063e84fe7.tar.xz
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main_gui.c b/main_gui.c
index df618e865..760f8f943 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -84,7 +84,7 @@ void HandleOnEditText(WindowEvent *e)
NetworkServer_HandleChat(NETWORK_ACTION_CHAT + (id & 0xFF), id & 0xFF, (id >> 8) & 0xFF, e->edittext.str, NETWORK_SERVER_INDEX);
break;
case 3: { /* Give money, you can only give money in excess of loan */
- const Player *p = DEREF_PLAYER(_current_player);
+ const Player *p = GetPlayer(_current_player);
int32 money = min(p->money64 - p->current_loan, atoi(e->edittext.str) / GetCurrentCurrencyRate());
char msg[20];
@@ -329,7 +329,7 @@ static void MenuClickShowAir(int index)
static void MenuClickBuildRail(int index)
{
- Player *p = DEREF_PLAYER(_local_player);
+ Player *p = GetPlayer(_local_player);
_last_built_railtype = min(index, p->max_railtype-1);
ShowBuildRailToolbar(_last_built_railtype, -1);
}
@@ -941,7 +941,7 @@ static void ToolbarZoomOutClick(Window *w)
static void ToolbarBuildRailClick(Window *w)
{
- Player *p = DEREF_PLAYER(_local_player);
+ Player *p = GetPlayer(_local_player);
Window *w2;
w2 = PopupMainToolbMenu(w, 457, 19, STR_1015_RAILROAD_CONSTRUCTION, p->max_railtype);
WP(w2,menu_d).sel_index = _last_built_railtype;
@@ -2211,7 +2211,7 @@ static void StatusBarWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
case WE_PAINT: {
- const Player *p = (_local_player == OWNER_SPECTATOR) ? NULL : DEREF_PLAYER(_local_player);
+ const Player *p = (_local_player == OWNER_SPECTATOR) ? NULL : GetPlayer(_local_player);
DrawWindowWidgets(w);
SetDParam(0, _date);