encode_gid / decode_gid pack atlas_index (8 bits), tile_id (20 bits), and rotation (2 bits) into a single u32; gid == 0 is reserved as the empty-cell sentinel. Lua 5.4 native bitwise operators used throughout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 KiB
13 KiB