forked from mirror/OpenTTD
(svn r16965) -Codechange: use tile area instead of sets of variables for the station joiner code.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user