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

Fix custom texture archive palettes #1144

Merged
merged 2 commits into from
Jan 9, 2024
Merged

Fix custom texture archive palettes #1144

merged 2 commits into from
Jan 9, 2024

Conversation

bates64
Copy link
Member

@bates64 bates64 commented Jan 9, 2024

There was an issue in txa generation where palettes were blindly copied from the png without regard to how many colors there are. This fixes that and generates a warning if the png has too many colours.

This issue didn't occur in matching builds because we split pngs with the correct palette size, but when modding this can break.

I also ported the size calculation from load_texture_by_name to make sure this sort of thing can't happen again 😁

@ethteck ethteck merged commit 070a548 into main Jan 9, 2024
3 checks passed
@ethteck ethteck deleted the fix-txa-palette branch January 9, 2024 05:17
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.

2 participants