diff options
author | rubidium <rubidium@openttd.org> | 2009-07-26 21:07:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-26 21:07:03 +0000 |
commit | 47a37b6093c3bb93dba81e4d3440c4098699a849 (patch) | |
tree | 322f91b3bf8e463dde3d472a4b390600a84ca350 /src/station_type.h | |
parent | 4aa2785757b132a4faee3a5fa821f2795be94f76 (diff) | |
download | openttd-47a37b6093c3bb93dba81e4d3440c4098699a849.tar.xz |
(svn r16965) -Codechange: use tile area instead of sets of variables for the station joiner code.
Diffstat (limited to 'src/station_type.h')
-rw-r--r-- | src/station_type.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/station_type.h b/src/station_type.h index f6803421f..4af075f20 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -6,6 +6,7 @@ #define STATION_TYPE_H #include "core/enum_type.hpp" +#include "tile_type.h" typedef uint16 StationID; typedef uint16 RoadStopID; @@ -81,4 +82,29 @@ enum { MAX_LENGTH_STATION_NAME_PIXELS = 180, ///< The maximum length of a station name in pixels }; +/** Represents the covered area of e.g. a rail station */ +struct TileArea { + /** Just construct this tile area */ + TileArea() {} + + /** + * Construct this tile area with some set values + * @param tile the base tile + * @param w the width + * @param h the height + */ + TileArea(TileIndex tile, uint8 w, uint8 h) : tile(tile), w(w), h(h) {} + + /** + * Construct this tile area based on two points. + * @param start the start of the area + * @param end the end of the area + */ + TileArea(TileIndex start, TileIndex end); + + TileIndex tile; ///< The base tile of the area + uint8 w; ///< The width of the area + uint8 h; ///< The height of the area +}; + #endif /* STATION_TYPE_H */ |