Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --unique command-line argument #14

Merged
merged 8 commits into from
Aug 7, 2022

Conversation

flother
Copy link
Owner

@flother flother commented Jul 28, 2022

Match spritezero-cli behaviour by supporting a --unique command-line argument. When given it only includes unique images in the spritesheet but maps them to multiple names in the index file.

Fixes #13.

@flother flother force-pushed the issue-13-add-unique-cli-argument branch from d408501 to c04de4c Compare August 3, 2022 11:38
@flother flother marked this pull request as ready for review August 7, 2022 21:29
flother added 8 commits August 7, 2022 21:33
A few too many clones in here to be good Rust code, but I'll have a stab
at removing them later on.
Don't split the Spritesheet struct and implementation blocks.
The previous test only checked that the spreet CLI could run
successfully. Now it actually checks that the output is correct: that
the `--ratio` changes the size of the sprites, and that the `--unique`
flag removes duplicate sprites from the spritesheet and correctly
references them by multiple names in the index. The test run output is
now put into a temp directory rather than the root of the repo.
Discovered while browsing the docs for the derive_builder crate.

https://docs.rs/derive_builder/latest/derive_builder/
@flother flother force-pushed the issue-13-add-unique-cli-argument branch from c04de4c to abda6d3 Compare August 7, 2022 21:42
@flother flother merged commit 3da4872 into master Aug 7, 2022
@flother flother deleted the issue-13-add-unique-cli-argument branch August 7, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --unique command-line argument
1 participant