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

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

Meta