(svn r16965) -Codechange: use tile area instead of sets of variables for the station joiner code.

This commit is contained in:
rubidium
2009-07-26 21:07:03 +00:00
parent 4aa2785757
commit 47a37b6093
9 changed files with 72 additions and 58 deletions

View File

@@ -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 */