Change: add --no-palette-validation optional arg #322
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To defend authors against mixing Windows / DOS palettes in the same grf, nmlc will open all sprite files from the filesystem and validate their palette. This is a separate step to sprite encoding.
For certain cases, this is of no benefit, and just increases compile times. For example, with Iron Horse:
The nmlc palette check adds 1s to 2s to every Iron Horse compile for me, which is 5% to 10% of total compile time.
I previously tried to solve this in #254, by inferring when the sprites might not need processed, but that route was not viable, as it depended too much on assuming that we don't want validation if we're outputting nfo.
This route provides an explicit arg flag for authors to suppress validation.
The names of the flag and option probably are too long and not the best choice.