Revert "Fixed map rendering glitching when using an oversized tileset"

This reverts commit 770de8161c.
This commit is contained in:
infinitefusion
2022-05-08 17:39:41 -04:00
parent 8b8dd086a5
commit bb1a8c6a35

View File

@@ -85,8 +85,8 @@ class TilemapRenderer
tile.src_rect.y = ((tile_id - TILESET_START_ID) / TILESET_TILES_PER_ROW) * SOURCE_TILE_HEIGHT
if @bitmap_wraps[tile.filename]
height = @bitmaps[tile.filename].height
col = (tile_id - TILESET_START_ID) * SOURCE_TILE_HEIGHT / (TILESET_TILES_PER_ROW * height)
tile.src_rect.x += col * TILESET_TILES_PER_ROW * SOURCE_TILE_WIDTH
col = (tile_id - TILESET_START_ID) * SOURCE_TILE_HEIGHT / height
tile.src_rect.x += col * AUTOTILES_COUNT * SOURCE_TILE_WIDTH
tile.src_rect.y -= col * height
end
end