Skip to content

Commit

Permalink
Manual formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 committed Jun 14, 2019
1 parent 9a7b3d0 commit 84e043a
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions flixel/addons/editors/tiled/TiledTileSet.hx
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,20 @@ class TiledTileSet
numRows = numCols = 1;

// Use the correct data format
#if (haxe_ver < "4.0.0")
if (Std.is(data, Access))
#else
if (Std.is(data, Xml))
#end
if (Std.is(data, #if (haxe_ver < "4.0.0") Access #else Xml #end))
{
source = data;
}
else if (Std.is(data, ValidByteArray))
{
var bytes:ValidByteArray = cast data;
source = new Access(Xml.parse(bytes.toString()));
source = source.node.tileset;
}
else
{
throw "Unknown TMX tileset format";
}
else if (Std.is(data, ValidByteArray))
{
var bytes:ValidByteArray = cast data;
source = new Access(Xml.parse(bytes.toString()));
source = source.node.tileset;
}
else
{
throw "Unknown TMX tileset format";
}

firstGID = (source.has.firstgid) ? Std.parseInt(source.att.firstgid) : 1;

Expand Down

0 comments on commit 84e043a

Please sign in to comment.