mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed map rendering glitching when using an oversized tileset
This commit is contained in:
@@ -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 / height
|
||||
tile.src_rect.x += col * AUTOTILES_COUNT * SOURCE_TILE_WIDTH
|
||||
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
|
||||
tile.src_rect.y -= col * height
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user