From 8628c5b2f3f2908a45a412bb94b1d0b97fc8eee5 Mon Sep 17 00:00:00 2001 From: Manuel Giesa Date: Fri, 7 Feb 2014 17:45:46 +0100 Subject: [PATCH] Added a warning when the expected image dimensions of the tile set do not match the actual dimensions. --- src/tilemap/TilemapParser.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tilemap/TilemapParser.js b/src/tilemap/TilemapParser.js index b9f1a8eb7..089013133 100644 --- a/src/tilemap/TilemapParser.js +++ b/src/tilemap/TilemapParser.js @@ -319,6 +319,10 @@ Phaser.TilemapParser = { newSet.columns = (set.imagewidth - set.margin) / (set.tilewidth + set.spacing); newSet.total = newSet.rows * newSet.columns; + if (newSet.rows % 1 !== 0 || newSet.columns % 1 !== 0) { + console.warn('TileSet image dimensions do not match expected dimensions.'); + } + tilesets.push(newSet); }