cleanGid

Clear the TiledFlag portion of a GID, leaving just the tile id.

Parameters

gid
Type: TiledGid

GID to clean

Return Value

Type: TiledGid

A GID with the flag bits zeroed out

Examples

1 // normal tile, no flags
2 TiledGid gid = 0x00000002;
3 assert(gid.cleanGid == gid);
4 
5 // normal tile, no flags
6 gid = 0x80000002; // tile with id 2 flipped horizontally
7 assert(gid.cleanGid == 0x2);
8 assert(gid & TiledFlag.flipHorizontal);

Meta