Tileset containing the given gid
MapData map; map.tilesets ~= TilesetData(); map.tilesets[0].firstGid = 1; map.tilesets ~= TilesetData(); map.tilesets[1].firstGid = 5; map.tilesets ~= TilesetData(); map.tilesets[2].firstGid = 12; assert(map.getTileset(1) == map.tilesets[0]); assert(map.getTileset(3) == map.tilesets[0]); assert(map.getTileset(5) == map.tilesets[1]); assert(map.getTileset(9) == map.tilesets[1]); assert(map.getTileset(15) == map.tilesets[2]);
Fetch the tileset containing the tile a given GID. Throws if the gid is out of range for all tilesets