diff options
author | Darkvater <darkvater@openttd.org> | 2005-09-18 20:56:44 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-09-18 20:56:44 +0000 |
commit | 8e6a911700de2875db95d254e5a5771e73ceedd7 (patch) | |
tree | 2e474d7261d3d1f3a5a381895f572bd5b78fe606 /player_gui.c | |
parent | 3097ee24292dc0c9fc19e98078a0403b96654787 (diff) | |
download | openttd-8e6a911700de2875db95d254e5a5771e73ceedd7.tar.xz |
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
Diffstat (limited to 'player_gui.c')
-rw-r--r-- | player_gui.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/player_gui.c b/player_gui.c index 650a829c3..5d9918dae 100644 --- a/player_gui.c +++ b/player_gui.c @@ -24,10 +24,11 @@ static void DoShowPlayerFinances(int player, bool show_small, bool show_stickied); -static void DrawPlayerEconomyStats(Player *p, byte mode) +static void DrawPlayerEconomyStats(const Player *p, byte mode) { int x,y,i,j,year; - int64 (*tbl)[13], sum,cost; + const int64 (*tbl)[13]; + int64 sum, cost; StringID str; if (!(mode & 1)) { // normal sized economics window (mode&1) is minimized status @@ -415,7 +416,7 @@ static const Widget _my_player_company_bh_widgets[] = { { WIDGETS_END}, }; -static void DrawPlayerVehiclesAmount(int player) +static void DrawPlayerVehiclesAmount(PlayerID player) { const int x = 110; int y = 72; @@ -470,7 +471,7 @@ static void DrawPlayerVehiclesAmount(int player) } } -int GetAmountOwnedBy(Player *p, byte owner) +int GetAmountOwnedBy(const Player *p, PlayerID owner) { return (p->share_owners[0] == owner) + (p->share_owners[1] == owner) + @@ -478,7 +479,7 @@ int GetAmountOwnedBy(Player *p, byte owner) (p->share_owners[3] == owner); } -static void DrawCompanyOwnerText(Player *p) +static void DrawCompanyOwnerText(const Player *p) { int num = -1; Player *p2; |