diff options
author | celestar <celestar@openttd.org> | 2005-01-21 16:51:25 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-01-21 16:51:25 +0000 |
commit | 962dd27a8cab5bf7f97f6af2cba427f8fe59fdf3 (patch) | |
tree | 1aed489ee1c47c403cb96224a6855fd62654d846 /town_cmd.c | |
parent | 2f4959dcd83fb8bc8ac3486d93313e53ee98f302 (diff) | |
download | openttd-962dd27a8cab5bf7f97f6af2cba427f8fe59fdf3.tar.xz |
(svn r1581) Added a display for the total map population to the town display (Jango)
Diffstat (limited to 'town_cmd.c')
-rw-r--r-- | town_cmd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/town_cmd.c b/town_cmd.c index 54d478d1b..9b09c4b7c 100644 --- a/town_cmd.c +++ b/town_cmd.c @@ -203,6 +203,17 @@ static void ChangePopulation(Town *t, int mod) if (_town_sort_order & 2) _town_sort_dirty = true; } +uint32 GetWorldPopulation() +{ + uint32 pop; + Town *t; + pop = 0; + FOR_ALL_TOWNS(t) { + pop += t->population; + } + return pop; +} + static void MakeSingleHouseBigger(uint tile) { byte b; |