IconForge: Headless Icon Generation #236
Open
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.
Adds a new headless generation system to IconForge via
rustg_iconforge_generate_headless
:This system is intended for generating icons with only a few states that have little in common with each other, and only one size, as opposed to the traditional generation which is suitable for large batches that re-use icons regularly.
The new function is suitable for creating drop-in replacement for one-time icon operations and could be used for something like generating a minimap with DrawBox. Speed relative to native BYOND icons is not guaranteed due to the I/O cost and less optimization / caching, but it's likely to be faster for icons that are built with a large number of transforms in sequence, because it doesn't resolve the icon until it's converted.
Also fixes a bug where flattened icons could pollute the cache with incorrect data by splitting the caches for flattened and non-flattened icons.
Adds error-tests for icon generation using the new headless generator, checking for common error cases. Also tests headless generation for consistency with BYOND and regular batch generation.
not to mention that one could potentially combine this with
get_flat_uni_icon
to produce a speedier GFI