(svn r16896) -Codechange: make station spec allocation and station animation functions work for both stations and waypoints
This commit is contained in:
@@ -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
|
||||
@@ -125,6 +132,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.
|
||||
@@ -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
|
||||
|
Reference in New Issue
Block a user