Change: Allow creating 32bpp-only NewGRFs #314
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.
The NFO requirement that the first sprite is 8bpp and 'normal zoom', was never actually enforced by OpenTTD itself which has no problem loading 32bpp-only NewGRFs.
NML allows 32bpp and zoom levels but only on alternative_sprites.
This change supports the use of zoom level and bit depth parameters on the spriteset() instruction. The format is similar to alternative_sprites();
spriteset(name[, image_file])
spriteset(name, zoom_level, bit_depth[, image_file[, mask_file]])
A short regression test is included.
Rationale: some NewGRF authors are already creating 32bpp-only sets with other tools that already allow it, whilst authors using NML are creating 32bpp-only with fake transparent 8bpp sprites. Given that we can't (and shouldn't) force authors to create content they don't want to, it is better to just remove the requirement for 8bpp sprites. This is beneficial as it means that OpenTTD may be able to detect when 8bpp sprites are missing which it cannot do if dummy 8bpp sprites are present.