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

Change: Use extended Action1s #309

Merged
merged 2 commits into from
Nov 30, 2024
Merged

Change: Use extended Action1s #309

merged 2 commits into from
Nov 30, 2024

Conversation

glx22
Copy link
Contributor

@glx22 glx22 commented Oct 7, 2023

Each spriteset gets its own unique ID.
Removes the "all spritesets in a single sprite group/layout must have the same size" limitation.

Not really tested beside checking NFO output.

nml/actions/action1.py Fixed Show fixed Hide fixed
@glx22 glx22 force-pushed the action1 branch 2 times, most recently from 1364257 to ecb70d0 Compare October 7, 2023 12:25
@andythenorth
Copy link
Contributor

Works for me in test of

  • nml CHIPS with unequal sized spritesets
  • pre-existing Iron Horse
  • pre-existing FIRS

@PeterN
Copy link
Member

PeterN commented Feb 14, 2024

First question... what is an extended action 1?
Does this need a specific version of OpenTTD or is it an older feature that just isn't used?

@glx22
Copy link
Contributor Author

glx22 commented Feb 14, 2024

https://newgrf-specs.tt-wiki.net/wiki/Action1#Extended_format present since OpenTTD 1.2.
The most important part is https://newgrf-specs.tt-wiki.net/wiki/Action1#first-set which allows to reduce duplication and the need for same size spriteset in a spritelayout.

@andythenorth
Copy link
Contributor

Still works for me :P

Each spriteset gets its own unique ID.
Removes the "all spritesets in a single sprite group/layout must have the same size" limitation.
@glx22
Copy link
Contributor Author

glx22 commented Nov 29, 2024

Now includes changes from @PeterN's pr309-redux branch.

@PeterN
Copy link
Member

PeterN commented Nov 29, 2024

I'm not sure why the examples are being changed -- presumably they don't do anything that requires this new format as they work before. Makes me think something is not quite right.

@glx22
Copy link
Contributor Author

glx22 commented Nov 29, 2024

Examples are changed because IDs are not reused anymore.
Before the change it was always act1 starting from 0 followed by act2 (act2 only using most recent act1), now all spritesets are accessible from anywhere once defined and they get their own ID.

@glx22 glx22 merged commit f756c76 into OpenTTD:master Nov 30, 2024
21 checks passed
@glx22 glx22 deleted the action1 branch November 30, 2024 14:45
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

Successfully merging this pull request may close these issues.

3 participants