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

32bpp assets dont need a palette to be defined. #19445

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

IceReaper
Copy link
Contributor

Currently when you use 32bpp sprites you encounter dozens of crashes quite easily. Most of them are tied to the palettes being null. The dirty workaround was to define a palette in yaml which exists but wont be used on 32bpp assets to get around the crash.
This changes allows palettes to be null, resulting in palettes being not resolved in that case.
There is a note at the end of the SpriteRenderable constructor which sets the palette also to null if an rgba asset is used, so this pr comes along with that behavior and just makes sure the traits do not crash before.

@pchote
Copy link
Member

pchote commented Jun 11, 2021

#3692 will be the proper fix, but this PR seems like a reasonable workaround to take before then.

👍 to the idea, but not tested.

@pchote
Copy link
Member

pchote commented Jun 11, 2021

It might be worth adding a comment explaining why the null check is needed.

@IceReaper
Copy link
Contributor Author

Added a small comment to explain.

@IceReaper
Copy link
Contributor Author

Updated and rebased.

Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@reaperrr reaperrr merged commit 6220731 into OpenRA:bleed Jun 25, 2021
@IceReaper IceReaper deleted the optionalpalette branch June 29, 2021 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants