equal
deleted
inserted
replaced
199 |
199 |
200 static void UpdateTownRadius(Town *t); |
200 static void UpdateTownRadius(Town *t); |
201 |
201 |
202 static bool IsCloseToTown(TileIndex tile, uint dist) |
202 static bool IsCloseToTown(TileIndex tile, uint dist) |
203 { |
203 { |
204 Town *t; |
204 const Town* t; |
205 |
205 |
206 FOR_ALL_TOWNS(t) { |
206 FOR_ALL_TOWNS(t) { |
207 if (t->xy != 0 && DistanceManhattan(tile, t->xy) < dist) |
207 if (t->xy != 0 && DistanceManhattan(tile, t->xy) < dist) |
208 return true; |
208 return true; |
209 } |
209 } |
243 } |
243 } |
244 |
244 |
245 uint32 GetWorldPopulation(void) |
245 uint32 GetWorldPopulation(void) |
246 { |
246 { |
247 uint32 pop; |
247 uint32 pop; |
248 Town *t; |
248 const Town* t; |
|
249 |
249 pop = 0; |
250 pop = 0; |
250 FOR_ALL_TOWNS(t) { |
251 FOR_ALL_TOWNS(t) { |
251 pop += t->population; |
252 pop += t->population; |
252 } |
253 } |
253 return pop; |
254 return pop; |