summaryrefslogtreecommitdiff
path: root/industry.h
diff options
context:
space:
mode:
Diffstat (limited to 'industry.h')
-rw-r--r--industry.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/industry.h b/industry.h
index 7fac15f28..c7a2dd063 100644
--- a/industry.h
+++ b/industry.h
@@ -32,6 +32,14 @@ struct Industry {
extern MemoryPool _industry_pool;
/**
+ * Check if an Industry really exists.
+ */
+static inline bool IsValidIndustry(Industry* industry)
+{
+ return industry->xy != 0; /* XXX: Replace by INVALID_TILE someday */
+}
+
+/**
* Get the pointer to the industry with index 'index'
*/
static inline Industry *GetIndustry(uint index)