Tileset containing the given gid
1 MapData map; 2 map.tilesets ~= TilesetData(); 3 map.tilesets[0].firstGid = 1; 4 map.tilesets ~= TilesetData(); 5 map.tilesets[1].firstGid = 5; 6 map.tilesets ~= TilesetData(); 7 map.tilesets[2].firstGid = 12; 8 9 assert(map.getTileset(1) == map.tilesets[0]); 10 assert(map.getTileset(3) == map.tilesets[0]); 11 assert(map.getTileset(5) == map.tilesets[1]); 12 assert(map.getTileset(9) == map.tilesets[1]); 13 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