diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-09 22:33:00 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-09 22:33:00 +0000 |
commit | ab954a934a20e21dc9e2672c380d8a7ab8531d33 (patch) | |
tree | adf0a3467d8519f1ef67e90a0a06731ea8c4dc1a /town.h | |
parent | 4ad80ae872fe2eea09d431a1d9849936ac37223b (diff) | |
download | openttd-ab954a934a20e21dc9e2672c380d8a7ab8531d33.tar.xz |
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
Diffstat (limited to 'town.h')
-rw-r--r-- | town.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -157,6 +157,11 @@ static inline uint16 GetTownPoolSize(void) return _town_pool.total_items; } +static inline bool IsTownIndex(uint index) +{ + return index < GetTownPoolSize(); +} + #define FOR_ALL_TOWNS_FROM(t, start) for (t = GetTown(start); t != NULL; t = (t->index + 1 < GetTownPoolSize()) ? GetTown(t->index + 1) : NULL) #define FOR_ALL_TOWNS(t) FOR_ALL_TOWNS_FROM(t, 0) |