summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-21 11:11:05 +0000
committerrubidium <rubidium@openttd.org>2009-07-21 11:11:05 +0000
commit43eda3dfbf45a8f5060aaca3da9b8cad59a1aad8 (patch)
treef679af938cac59410e256882dfa0f5845b47b71e /src/station_base.h
parentc63338cd8158fa8a60afe74395d4f5e659317581 (diff)
downloadopenttd-43eda3dfbf45a8f5060aaca3da9b8cad59a1aad8.tar.xz
(svn r16896) -Codechange: make station spec allocation and station animation functions work for both stations and waypoints
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/station_base.h b/src/station_base.h
index b68858a59..18f7c9ca5 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -77,6 +77,13 @@ struct StationRect : public Rect {
StationRect& operator = (Rect src);
};
+/** Represents the covered area */
+struct TileArea {
+ TileIndex tile; ///< The base tile of the area
+ uint8 w; ///< The width of the area
+ uint8 h; ///< The height of the area
+};
+
/** Base class for all station-ish types */
struct BaseStation {
TileIndex xy; ///< Base tile of the station
@@ -126,6 +133,13 @@ struct BaseStation {
virtual void UpdateVirtCoord() = 0;
/**
+ * Get the tile area for a given station type.
+ * @param ta tile area to fill.
+ * @param type the type of the area
+ */
+ virtual void GetTileArea(TileArea *ta, StationType type) const = 0;
+
+ /**
* Get the base station belonging to a specific tile.
* @param tile The tile to get the base station from.
* @return the station associated with that tile.
@@ -258,6 +272,8 @@ public:
/* virtual */ uint32 GetNewGRFVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) const;
+ /* virtual */ void GetTileArea(TileArea *ta, StationType type) const;
+
/**
* Determines whether a station is a buoy only.
* @todo Ditch this encoding of buoys