API Reference › Tiled › Tiled.resolve
method

Tiled.resolve

Tiled.resolve(map, gid: int) -> gidinfo

Decomposes a raw GID: strips the three flip flags (0x80000000 horizontal, 0x40000000 vertical, 0x20000000 anti-diagonal), keeps the low 29 bits as the global tile id, and finds the owning tileset. Returns a value with fields tileset (index, -1 if none), local (id within that tileset), fh/fv/fd (the flip flags) and empty (1 when the GID was 0).

← All symbols