Fixed missing attributes in TMX file loading and writing (sizes in

tilesets).
Added a fancy logo in the workspace selector... could look better
though.
This commit is contained in:
Zukero
2015-08-12 15:14:30 +02:00
parent 1c90d47bdf
commit c870be2d1f
4 changed files with 23 additions and 3 deletions

View File

@@ -74,6 +74,7 @@ public class TileSet implements Iterable<Tile>
private Color transparentColor;
private Image tileSetImage;
public Spritesheet sheet = null;
public Rectangle sheetDimensions;
/**
* Default constructor
@@ -120,8 +121,10 @@ public class TileSet implements Iterable<Tile>
importTileBitmap(buffered, cutter);
}
public void loadFromProject(String name, TMXMap tmxMap) {
public void loadFromProject(String name, TMXMap tmxMap, int tileWidth, int tileHeight) {
sheet = tmxMap.getProject().getSpritesheet(name);
tileDimensions.width = tileWidth;
tileDimensions.height = tileHeight;
int i = 0;
Image tileImage = sheet.getImage(i);
while (tileImage != null) {