mirror of
https://github.com/openeggbert/sprite-utils.git
synced 2025-03-25 15:37:50 +01:00
Some issues were fixed
This commit is contained in:
parent
ed6ce266e9
commit
6c7e2d49b3
@ -360,7 +360,7 @@ public class DrawCommand implements Command {
|
|||||||
g.setStroke(dashedStroke);
|
g.setStroke(dashedStroke);
|
||||||
|
|
||||||
Color currentColor = g.getColor();
|
Color currentColor = g.getColor();
|
||||||
g.setColor(Color.RED);
|
g.setColor(spriteUtilsOptions.getRectangleColor());
|
||||||
g.drawRect(row.getX(), row.getY(), row.getWidth() - 1, row.getHeight() - 1);
|
g.drawRect(row.getX(), row.getY(), row.getWidth() - 1, row.getHeight() - 1);
|
||||||
g.setColor(currentColor);
|
g.setColor(currentColor);
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,12 @@ public class SpriteSheet {
|
|||||||
|
|
||||||
validateRow(spriteSheetRow);
|
validateRow(spriteSheetRow);
|
||||||
|
|
||||||
|
SpriteSheetRow previousSheetRow = rows.isEmpty() ? null : rows.get(rows.size() - 1);
|
||||||
|
|
||||||
|
if (spriteSheetRow.getColumn() > 1 && previousSheetRow != null && Math.abs(spriteSheetRow.height) >= Math.abs(previousSheetRow.height) && (spriteSheetRow.getColumn() > 2 ? (previousSheetRow.height != 0 && spriteSheetRow.height != 0) : false)) {
|
||||||
|
spriteSheetRow.height = -spriteSheetRow.height;
|
||||||
|
}
|
||||||
|
|
||||||
updateSpriteSheetRow(spriteSheetRow);
|
updateSpriteSheetRow(spriteSheetRow);
|
||||||
|
|
||||||
rows.add(spriteSheetRow);
|
rows.add(spriteSheetRow);
|
||||||
|
@ -77,7 +77,7 @@ public class SpriteSheetRow {
|
|||||||
numberPerSheet = i < csvColumns.length ? Integer.parseInt(csvColumns[i]) : 0;
|
numberPerSheet = i < csvColumns.length ? Integer.parseInt(csvColumns[i]) : 0;
|
||||||
|
|
||||||
// Adjust height if the column is greater than 1
|
// Adjust height if the column is greater than 1
|
||||||
if (column > 1 && height == 0) {
|
if (column > 1) {
|
||||||
height = -height;
|
height = -height;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
@ -45,7 +45,7 @@ public class SpriteUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void run(String[] args) {
|
public void run(String[] args) {
|
||||||
//args = "draw --dir /rv/data/desktop/code/code.nanoboot.org/nanoboot/open-eggbert-legacy-assets/speedy_eggbert_1/IMAGE08 --rectangle-color 0,255,0 --sprite-sheet-path /rv/data/desktop/code/code.nanoboot.org/nanoboot/open-eggbert/assets/default-spritesheets/speedy_blupi_I.spritesheet.csv --rows 8 --file-name EXPLO.BLP ".split(" ");
|
//args = "draw --dir /rv/data/desktop/code/code.nanoboot.org/nanoboot/open-eggbert-legacy-assets/speedy_eggbert_1/IMAGE08 --rectangle-color 0,255,0 --sprite-sheet-path /rv/data/desktop/code/code.nanoboot.org/nanoboot/open-eggbert/assets/default-spritesheets/speedy_blupi_I.spritesheet.csv --row 2 --file-name OBJECT.BLP ".split(" ");
|
||||||
run(new SpriteUtilsArgs(args));
|
run(new SpriteUtilsArgs(args));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user