diff options
author | celestar <celestar@openttd.org> | 2005-06-21 16:28:17 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-06-21 16:28:17 +0000 |
commit | aa7334a3eca674131dc1198c592c7e4a925f1d56 (patch) | |
tree | dbd1b9d6a856fcab15da2adfe0bacfb2bdc19b7e /main_gui.c | |
parent | e2df1d71d5ec39f89c540f116c1cb0b765a74229 (diff) | |
download | openttd-aa7334a3eca674131dc1198c592c7e4a925f1d56.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.c | 8 |
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); |