# TileArea Struct Reference

Represents the covered area of e.g. More...

`#include <station_type.h>`

Inherited by ETileArea.

## Public Member Functions

| TileArea ()
| Just construct this tile area.
| TileArea (TileIndex tile, uint8 w, uint8 h)
| Construct this tile area with some set values.
| TileArea (TileIndex start, TileIndex end)
| Construct this tile area based on two points.
void | Add (TileIndex to_add)
| Add a single tile to a tile area; enlarge if needed.
void | Clear ()
| Clears the 'tile area', i.e.

## Data Fields

TileIndex | tile
| The base tile of the area.
uint8 | w
| The width of the area.
uint8 | h
| The height of the area.

## Detailed Description

Represents the covered area of e.g.

a rail station

Definition at line 95 of file station_type.h.

## Constructor & Destructor Documentation

TileArea::TileArea | ( | TileIndex | tile,
|  | uint8 | w,
|  | uint8 | h |
| ) |  |  | `[inline]`

Construct this tile area with some set values.

Parameters:

  | tile | the base tile
  | w | the width
  | h | the height

Definition at line 105 of file station_type.h.

TileArea::TileArea | ( | TileIndex | start,
|  | TileIndex | end |
| ) |  |  |

Construct this tile area based on two points.

Parameters:

  | start | the start of the area
  | end | the end of the area

Definition at line 500 of file station.cpp.

References Swap(), TileX(), TileXY(), and TileY().

## Member Function Documentation

void TileArea::Add | ( | TileIndex | to_add | ) |

Add a single tile to a tile area; enlarge if needed.

Parameters:

  | to_add | The tile to add

Definition at line 515 of file station.cpp.

References INVALID_TILE, max(), min(), TileX(), TileXY(), and TileY().

Referenced by CmdBuildRoadStop(), and RemoveRoadStop().

void TileArea::Clear | ( |  | ) | `[inline]`

Clears the 'tile area', i.e.

make the tile invalid.

Definition at line 127 of file station_type.h.

References h, INVALID_TILE, tile, and w.

Referenced by RemoveRoadStop().

The documentation for this struct was generated from the following files:

- src/station_type.h
- src/station.cpp