diff options
author | rubidium <rubidium@openttd.org> | 2009-12-02 16:20:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-02 16:20:44 +0000 |
commit | 81062163a25497e9d83fd354b53234d1796f675d (patch) | |
tree | 207947eb4a906654b373c62ba6b6fca2fbe96727 /src/station_type.h | |
parent | 1c65150d6d30e460d1615c907e9c403d45a518ed (diff) | |
download | openttd-81062163a25497e9d83fd354b53234d1796f675d.tar.xz |
(svn r18377) -Codechange: add 'cache' of the tile area of truck and bus stops.
Diffstat (limited to 'src/station_type.h')
-rw-r--r-- | src/station_type.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/station_type.h b/src/station_type.h index 2784f123b..769455d20 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -114,6 +114,22 @@ struct TileArea { TileIndex tile; ///< The base tile of the area uint8 w; ///< The width of the area uint8 h; ///< The height of the area + + /** + * Add a single tile to a tile area; enlarge if needed. + * @param to_add The tile to add + */ + void Add(TileIndex to_add); + + /** + * Clears the 'tile area', i.e. make the tile invalid. + */ + void Clear() + { + this->tile = INVALID_TILE; + this->w = 0; + this->h = 0; + } }; /** List of stations */ |