diff --git a/MLEM.Extended/Tiled/IndividualTiledMapRenderer.cs b/MLEM.Extended/Tiled/IndividualTiledMapRenderer.cs index 9307fa9..e1693ad 100644 --- a/MLEM.Extended/Tiled/IndividualTiledMapRenderer.cs +++ b/MLEM.Extended/Tiled/IndividualTiledMapRenderer.cs @@ -33,7 +33,7 @@ namespace MLEM.Extended.Tiled { public void UpdateDrawInfo(int layerIndex, int x, int y) { var layer = this.map.TileLayers[layerIndex]; - var tile = layer.GetTile((ushort) x, (ushort) y); + var tile = layer.GetTile(x, y); if (tile.IsBlank) return; var tileset = tile.GetTileset(this.map); diff --git a/MLEM.Extended/Tiled/TiledExtensions.cs b/MLEM.Extended/Tiled/TiledExtensions.cs index a8c09cb..a15d871 100644 --- a/MLEM.Extended/Tiled/TiledExtensions.cs +++ b/MLEM.Extended/Tiled/TiledExtensions.cs @@ -54,7 +54,11 @@ namespace MLEM.Extended.Tiled { public static TiledMapTile GetTile(this TiledMap map, string layerName, int x, int y) { var layer = map.GetLayer(layerName); - return layer != null ? layer.GetTile((ushort) x, (ushort) y) : default; + return layer != null ? layer.GetTile(x, y) : default; + } + + public static TiledMapTile GetTile(this TiledMapTileLayer layer, int x, int y) { + return layer.GetTile((ushort) x, (ushort) y); } public static RectangleF GetArea(this TiledMapObject obj, TiledMap map, Vector2 position) { diff --git a/MLEM.Extended/Tiled/TiledMapCollisions.cs b/MLEM.Extended/Tiled/TiledMapCollisions.cs index 559c72c..c5daa76 100644 --- a/MLEM.Extended/Tiled/TiledMapCollisions.cs +++ b/MLEM.Extended/Tiled/TiledMapCollisions.cs @@ -32,7 +32,7 @@ namespace MLEM.Extended.Tiled { public void UpdateCollisionInfo(int layerIndex, int x, int y) { var layer = this.map.TileLayers[layerIndex]; - var tile = layer.GetTile((ushort) x, (ushort) y); + var tile = layer.GetTile(x, y); if (tile.IsBlank) return; var tilesetTile = tile.GetTilesetTile(this.map);