(svn r8651) -Codechange: group the functions related to getting and setting the town index and move one function that is not related to the map array out of town_map.h.

This commit is contained in:
rubidium
2007-02-09 16:21:03 +00:00
parent 0cfd58f21a
commit 396f905b6e
2 changed files with 20 additions and 15 deletions

View File

@@ -218,6 +218,8 @@ static inline void DeleteTown(Town *t)
t->xy = 0;
}
Town* CalcClosestTownFromTile(TileIndex tile, uint threshold);
#define FOR_ALL_TOWNS_FROM(t, start) for (t = GetTown(start); t != NULL; t = (t->index + 1U < GetTownPoolSize()) ? GetTown(t->index + 1U) : NULL) if (IsValidTown(t))
#define FOR_ALL_TOWNS(t) FOR_ALL_TOWNS_FROM(t, 0)