MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetRedErrorSquare

Function SetRedErrorSquare

src/viewport.cpp:2601–2612  ·  view source on GitHub ↗

* Set a tile to display a red error square. * @param tile Tile that should show the red error square. */

Source from the content-addressed store, hash-verified

2599 * @param tile Tile that should show the red error square.
2600 */
2601void SetRedErrorSquare(TileIndex tile)
2602{
2603 TileIndex old;
2604
2605 old = _thd.redsq;
2606 _thd.redsq = tile;
2607
2608 if (tile != old) {
2609 if (tile != INVALID_TILE) MarkTileDirtyByTile(tile);
2610 if (old != INVALID_TILE) MarkTileDirtyByTile(old);
2611 }
2612}
2613
2614/**
2615 * Highlight \a w by \a h tiles at the cursor.

Callers 4

CcTerraformFunction · 0.85
CloseMethod · 0.85
CcBuildRailTunnelFunction · 0.85
CcBuildRoadTunnelFunction · 0.85

Calls 1

MarkTileDirtyByTileFunction · 0.70

Tested by

no test coverage detected