OpenTTD Source 20261112-master-gbcbec5e63f
tilearea_type.h File Reference

Type for storing the 'area' of something uses on the map. More...

#include "tile_type.h"
#include "tilearea_orthogonal.h"
#include "tilearea_diagonal.h"
#include "tilearea_wrapper.h"

Go to the source code of this file.

Typedefs

using OrthoDiagonalTileIterator = TileIteratorWrapper<OrthogonalTileArea::iterator, DiagonalTileArea::iterator>
 Wrapper for orthogonal or diagonal tile iterators.
using OrthoDiagonalTileArea = TileAreaWrapper<OrthoDiagonalTileIterator, OrthogonalTileArea, DiagonalTileArea>
 Wrapper for orthogonal or diagonal tile areas.

Functions

OrthoDiagonalTileArea CreateOrthoDiagonalArea (TileIndex corner1, TileIndex corner2, bool diagonal)
 Create an Orthogonal/Diagonal tile area wrapper.

Detailed Description

Type for storing the 'area' of something uses on the map.

Definition in file tilearea_type.h.

Typedef Documentation

◆ OrthoDiagonalTileArea

Wrapper for orthogonal or diagonal tile areas.

Definition at line 22 of file tilearea_type.h.

◆ OrthoDiagonalTileIterator

Wrapper for orthogonal or diagonal tile iterators.

Definition at line 19 of file tilearea_type.h.

Function Documentation

◆ CreateOrthoDiagonalArea()

OrthoDiagonalTileArea CreateOrthoDiagonalArea ( TileIndex corner1,
TileIndex corner2,
bool diagonal )

Create an Orthogonal/Diagonal tile area wrapper.

Parameters
corner1Tile from where to begin iterating.
corner2Tile where to end the iterating.
diagonalWhether to create a DiagonalTileArea or OrthogonalTileArea.
Returns
The OrthoDiagonalArea.

Definition at line 23 of file tilearea.cpp.

Referenced by CmdBuildCanal(), CmdBuildObjectArea(), CmdClearArea(), CmdConvertRail(), CmdConvertRoad(), CmdLevelLand(), CmdPlaceHouseArea(), and CmdPlantTree().