summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-06-12 14:22:28 +0000
committerbelugas <belugas@openttd.org>2007-06-12 14:22:28 +0000
commit443db4bb2e446268d1b2caad05026ffebb4a49a5 (patch)
treee88376d870071459c30dec9caddb01a99d9677d8 /src
parent94d390eac49841f350a357dbfc7e0904276c9dd9 (diff)
downloadopenttd-443db4bb2e446268d1b2caad05026ffebb4a49a5.tar.xz
(svn r10115) -Codechange: Create accessors to triggers and random bits for industries.
Implementation will follow soon.
Diffstat (limited to 'src')
-rw-r--r--src/industry_map.h43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/industry_map.h b/src/industry_map.h
index 86a62bdbf..d09a2e615 100644
--- a/src/industry_map.h
+++ b/src/industry_map.h
@@ -160,7 +160,7 @@ static inline void MakeIndustry(TileIndex t, IndustryID index, IndustryGfx gfx)
_m[t].m2 = index;
_m[t].m3 = 0;
_m[t].m4 = 0;
- _m[t].m5 = gfx;
+ SetIndustryGfx(t, gfx);
}
/**
@@ -246,4 +246,45 @@ static inline void SetIndustryAnimationState(TileIndex tile, byte state)
_m[tile].m3 = state;
}
+/**
+ * Get the random bits for this tile.
+ * Used for grf callbacks
+ * @param tile TileIndex of the tile to query
+ * @pre IsTileType(tile, MP_INDUSTRY)
+ * @return requested bits
+ * @todo implement the storage in map array
+ */
+static inline byte GetIndustryRandomBits(TileIndex tile)
+{
+ assert(IsTileType(tile, MP_INDUSTRY));
+ return 0;
+}
+
+/**
+ * Get the activated triggers bits for this industry tile
+ * Used for grf callbacks
+ * @param tile TileIndex of the tile to query
+ * @pre IsTileType(tile, MP_INDUSTRY)
+ * @return requested triggers
+ * @todo implement the storage in map array
+ */
+static inline byte GetIndustryTriggers(TileIndex tile)
+{
+ assert(IsTileType(tile, MP_INDUSTRY));
+ return 0;
+}
+
+
+/**
+ * Set the activated triggers bits for this industry tile
+ * Used for grf callbacks
+ * @param tile TileIndex of the tile to query
+ * @pre IsTileType(tile, MP_INDUSTRY)
+ * @todo implement the storage in map array
+ */
+static inline void SetIndustryTriggers(TileIndex tile, byte triggers)
+{
+ assert(IsTileType(tile, MP_INDUSTRY));
+}
+
#endif /* INDUSTRY_MAP_H */