Skip to content

Commit

Permalink
added scale parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dvergar committed Nov 8, 2019
1 parent c9fa7ee commit 3cd8f60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pmi/PyxelMapImporter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class PyxelMapImporter
private var mapDatas:Array<Map<String, String>>;
private var pyxelMap:haxe.xml.Fast;

public function new(xmlDatas:String)
public function new(xmlDatas:String, ?scale=1)
{
var xml = Xml.parse(xmlDatas);
pyxelMap = new haxe.xml.Fast(xml.firstElement());
TILE_WIDTH = Std.parseInt(pyxelMap.att.tilewidth);
TILE_HEIGHT = Std.parseInt(pyxelMap.att.tileheight);
TILE_WIDTH = Std.parseInt(pyxelMap.att.tilewidth) * scale;
TILE_HEIGHT = Std.parseInt(pyxelMap.att.tileheight) * scale;
TILES_WIDE = Std.parseInt(pyxelMap.att.tileswide);
TILES_HIGH = Std.parseInt(pyxelMap.att.tileshigh);
}
Expand Down

0 comments on commit 3cd8f60

Please sign in to comment.