summaryrefslogtreecommitdiff
path: root/town.h
diff options
context:
space:
mode:
Diffstat (limited to 'town.h')
-rw-r--r--town.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/town.h b/town.h
index c5c3b574f..cf7eee16e 100644
--- a/town.h
+++ b/town.h
@@ -134,6 +134,14 @@ VARDEF uint16 *_town_sort;
extern MemoryPool _town_pool;
/**
+ * Check if a Town really exists.
+ */
+static inline bool IsValidTown(Town* town)
+{
+ return town->xy != 0; /* XXX: Replace by INVALID_TILE someday */
+}
+
+/**
* Get the pointer to the town with index 'index'
*/
static inline Town *GetTown(uint index)