tileson icon indicating copy to clipboard operation
tileson copied to clipboard

Using tileset with size different than map tile/grid size

Open Kedan opened this issue 10 months ago • 2 comments

Tiled™ allows you to use tilesets with tile size different than tile size defined in map options. This couse problems:

  1. tson::Tile::getDrawindRect() - returns wrong texture coordinates -> [ map_grid_width * tile_x_index, map_grid_height * tile_y_index, tile.width, tile.height ]. Should be: [ tile_width * tile_x_index, tile_height * tile_y_index, tile.width, tile.height ]. Note that tile width and height are correct.
  2. tson::TileObject::getPosition() return wrong tile position on the map -> [ tile_width * tile_x_index, tile_height * tile_y_index ]. Should be: [ map_grid_width * tile_x_index, map_grid_height * tile_y_index ]

Kedan avatar Mar 26 '24 19:03 Kedan