summaryrefslogtreecommitdiff
path: root/town.h
diff options
context:
space:
mode:
Diffstat (limited to 'town.h')
-rw-r--r--town.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/town.h b/town.h
index 4c54e6bf0..1e0c0b1bc 100644
--- a/town.h
+++ b/town.h
@@ -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)