dtiled.grid

A grid wraps a 2D array to provide specialized grid-based functionality.

Currently, the only grid type is RectGrid, which can serve as the base for an orthogonal or isometric map. HexGrid may be added in a later version to support hexagonal maps.

Members

Enums

isArray2D
eponymoustemplate isArray2D(T)

True if T is a static or dynamic array type.

Functions

createMask
void createMask(T grid, RowCol offset, U mask)

Generate a mask from a region of tiles based on a condition.

createMaskAround
void createMaskAround(T grid, RowCol center, U mask)

Same as createMask, but specify the offset of the mask's center rather than the top-left corner.

rectGrid
auto rectGrid(T tiles)

Convenience function to wrap a RectGrid around a 2D array.

Structs

RectGrid
struct RectGrid(T)

A grid of rectangular tiles. Wraps a 2D array to provide grid-based access to tiles.

Meta

Authors

<a href="https://github.com/rcorre">rcorre</a>

License

<a href="http://opensource.org/licenses/MIT">MIT</a>