Feature: [NewGRF] Allow fixed layout up to 256 tiles per NewGRF rail station. #12554
+85
−39
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.
Motivation / Problem
Station layouts may contain more than 8 different tile types, but due to hysterical reasons, only 8 tiles can be used and stored in the map on build.
Callback 24 exists which allows to choose the fixed layout dynamically but this is still limited to 8.
Using more than this requires using callback 14, which allows more (more than 256 even) but also requires complex calculations for each station tile to be drawn.
The technical limit that originally prevented using more than 8 tile layouts on the map was removed in 2007, in commit 3dd6362.
Description
Allow using up to 256 tile layouts in property 0E or callback 24, which defines the layout to be saved into the map.
This was originally limited to 8, because station graphics above 8 referred to other station types but that was changed in 2007.
Using more than 256 layouts still requires callback 14.
Limitations
Not actually tested as this requires skill at creating NewGRF stations...
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.