TiledFlag

Flags set by Tiled in the guid field. Used to indicate mirroring and rotation.

Values

ValueMeaning
none0x00000000

Tile is not flipped

flipDiagonal0x20000000

Tile is flipped diagonally

flipVertical0x40000000

Tile is flipped vertically (over x axis)

flipHorizontal0x80000000

Tile is flipped horizontally (over y axis)

allflipHorizontal | flipVertical | flipDiagonal

bitwise or of all tile flags.

Examples

// this is the GID for a tile with tileset index 21 that was flipped horizontally
TiledGid gid = 2147483669;
// clearing the flip flags yields a gid that should map to a tileset index
assert((gid & ~TiledFlag.all) == 21);
// it is flipped horizontally
assert(gid & TiledFlag.flipHorizontal);
assert(!(gid & TiledFlag.flipVertical));
assert(!(gid & TiledFlag.flipDiagonal));

Meta