diff options
Diffstat (limited to 'town.h')
-rw-r--r-- | town.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -81,7 +81,6 @@ uint32 GetWorldPopulation(void); void UpdateTownVirtCoord(Town *t); void InitializeTown(void); void ShowTownViewWindow(TownID town); -void DeleteTown(Town *t); void ExpandTown(Town *t); Town *CreateRandomTown(uint attempts, uint size_mode); @@ -218,6 +217,14 @@ static inline bool IsValidTownID(uint index) return index < GetTownPoolSize() && IsValidTown(GetTown(index)); } +void DestroyTown(Town *t); + +static inline void DeleteTown(Town *t) +{ + DestroyTown(t); + t->xy = 0; +} + #define FOR_ALL_TOWNS_FROM(t, start) for (t = GetTown(start); t != NULL; t = (t->index + 1 < GetTownPoolSize()) ? GetTown(t->index + 1) : NULL) if (IsValidTown(t)) #define FOR_ALL_TOWNS(t) FOR_ALL_TOWNS_FROM(t, 0) |