Skip to content

TileBehaviorLayer

Struct

Source: TileAttributes.h

Description

Runtime representation of exported behavior layer for O(1) flag lookup.

This structure matches the format exported by the Tilemap Editor and provides efficient access to tile behavior flags without runtime strings.

Properties

NameTypeDescription
uint8_tconstPointer to dense uint8_t array (1 byte per tile)
widthuint16_tLayer width in tiles
heightuint16_tLayer height in tiles

Methods

inline uint8_t getTileFlags(const TileBehaviorLayer& layer, int x, int y)

Description:

Get TileFlags for a specific tile position in a behavior layer.

Parameters:

  • layer: Behavior layer structure containing the data
  • x: X coordinate in tiles
  • y: Y coordinate in tiles

Returns: TileFlags combination (0 = TILE_NONE if out of bounds)

Released under the MIT License.