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

Bug(?): Re-definition of alternative sprites is not treated as an error but has no productive use #372

Open
zephyris opened this issue Apr 3, 2025 · 0 comments

Comments

@zephyris
Copy link
Contributor

zephyris commented Apr 3, 2025

NML warns when alternative_sprites with the same zoom level and bit depth are defined twice, and overwrites the earlier definition with the later definition. However, there is never(?) a productive use of this behaviour, as alternative sprites are effectively part of the real sprite, so can't be redefined without redefining the entire real sprite.

replace grid_temperate_spr3981(3981, "temperate_groundtiles_gridline_8bpp.png") { template_groundtiles(0, 0, 1) }
alternative_sprites (grid_temperate_spr3981, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "temperate_groundtiles_gridline_bt32bpp.png") { template_groundtiles(0, 0, 1) }
alternative_sprites (grid_temperate_spr3981, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "arctic_groundtiles_gridline_bt32bpp.png") { template_groundtiles(0, 0, 1) }

Gives a warning like:

nmlc warning: "test.nml", line 47: Sprites are already defined for replace-block 'grid_temperate_spr3981' for this zoom level / bit depth combination. This data will be overridden.

This is reported as a warning at the same level as the 8bpp sprites containing white or animated pixels. However, as there are no(?) valid uses for redefining an alternative sprite set then it should probably be an error.

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

No branches or pull requests

1 participant