You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to define 10 additional shore sprites in OpenGFX's extra newgrf. The corresponding diff and description is found at http://dev.openttdcoop.org/issues/688
Unfortunately the extra newgrf is not recognized as as valid grf to define these, as newgrf.cpp:503 checks IsOpenTTDGRFid for a hard-coded 0xFF4F5400 (or the first three bytes thereof) which is the ID of openttdw.grf as far as I know.
The question now remains, whether not all GRFs starting their ID with FF should be recognized as valid input in these cases and allow other base grfs to use different newgrfIDs for their extra file.
The attached diff introduces a new routine IsBaseGRF which checks for the presence of FF as the first byte of the GRFid. Together with the OpenGFX patch it will then allow
- to use different GRFids for the extra newgrfs of different base sets
- allow the extra newgrfs to define the 10 shore sprites while still allowing newgrfs to define their own shores without glitches.
Something worth considering is to use something like
# define BASEGRFID_IDENTIFIER 0xFF000000
in order to replace the 0xFF000000 and avoid it as magic constant
Additionally maybe: http://wiki.ttdpatch.net/tiki-index.php?page=Action8 defines grfIDs starting with FF as internal to TTDP (so I guess also to OTTD). I haven't entirely checked for other places where such check for a general IsBaseGRF might also be more appropriate than IsOpenTTDBaseGRF.
If, on the other hand, any check for a grf starting with FF may return true for IsOpenTTDBaseGRF then the attached patch might help. But... I'm not sure there are cases where it fails horribly.
planetmaker opened the ticket and wrote:
Attachments
Reported version: other
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/3385
The text was updated successfully, but these errors were encountered: