Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Jun 6, 2024
1 parent df650a8 commit 3b46b5a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Version 3.3.1] - 2024-06-06

### Added

- Added max-sprites definition.
- Added Cocos2d-x template.

### Changed

- Abort globbing when pattern is too coarse.

### Fixed

- Ensure the lowest index duplicate sprite is the one that is kept.
- globbing does not always search subdirectories.

## [Version 3.3.0] - 2023-05-28

### Added
Expand Down Expand Up @@ -228,6 +244,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fixed -- commandline arguments.
- Fixed sample cpp.template.

[version 3.3.1]: https://github.com/houmain/spright/compare/3.3.0...3.3.1
[version 3.3.0]: https://github.com/houmain/spright/compare/3.2.0...3.3.0
[version 3.2.0]: https://github.com/houmain/spright/compare/3.1.0...3.2.0
[version 3.1.0]: https://github.com/houmain/spright/compare/3.0.0...3.1.0
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,14 @@ The following table contains a list of all definitions, with the item each affec
| **input** | - | path | Adds a new input file at _path_. It can define a single file or an un-/bounded sequence of files (e.g. `"frames{0-}.png", "frames{0001-0013}.png"`). |
| path | input | path | A _path_ which should be prepended to the input's path. |
| colorkey | input | [color] | Specifies that the input has a color, which should be considered transparent (in hex notation e.g. `FF00FF`). |
| grid | input | x, y | Specifies that the input contains multiple sprites, arranged in a grid of a certain cell size. In this mode the _rect_ of each _sprite_ is deduced from the grid. Each _sprite_ automatically advances the current cell horizontally. |
| grid | input | x, [y] | Specifies that the input contains multiple sprites, arranged in a grid of a certain cell size. In this mode the _rect_ of each _sprite_ is deduced from the grid. Each _sprite_ automatically advances the current cell horizontally. |
| grid-cells | input | x, y | As _grid_, but specifies the number of cells instead of their size. When the cells are squares, one dimension is allowed to be _0_, so it is automatically deduced. |
| grid-offset | input | x, [y],<br/>[r-x], [b-y] | Offsets the grid from the top-left corner by a number of pixels. Optionally the grid's offset from the bottom-right corner can also be specified, which is used when deducing the cell-size using _grid-cells_. |
| grid-spacing | input | x, [y] | Sets a spacing between the grid cells. |
| row | input | row | Sets a sprite's vertical offset within a grid (starting with 0). |
| skip | input | [count] | Skips one or more horizontal grid cells or indices in file sequences (a non-numeric parameter is treated as 1, to allow simple substitutions of _sprite_). |
| row | input | row | Sets a sprite's row within a grid (starting with 0). |
| skip | input | [count] | Skips one or more horizontal grid cells or indices in file sequences (a non-numeric parameter is treated as 1, to allow simple substitution of _sprite "id"_). |
| atlas | input | [pixels] | Specifies that the input contains multiple unaligned sprites, separated by more than a specific number of transparent pixel rows. |
| max-sprites | input | count | Limits the number of sprites to prevent editors from becoming unresponsive on invalid input (default is 1000). |
| **sprite** | - | [id] | Adds a new sprite to an input and optionally sets its id. |
| id | sprite | id | Sets the sprite's id (defaults to `"sprite_{{index}}"`). See list of available [variables](#variables). |
| span | sprite | columns, rows | Sets the number of grid cells a sprite spans. |
Expand Down
2 changes: 1 addition & 1 deletion src/Definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void apply_definition(Definition definition,
break;
}
case Definition::grid:
state.grid = check_size(false);
state.grid = check_size(true);
check(state.grid.x > 0 && state.grid.y > 0, "invalid grid");
break;

Expand Down

0 comments on commit 3b46b5a

Please sign in to comment.