Skip to content

IMAGE: Get palette class by reference on image decoders #6535

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

Merged
merged 2 commits into from
Apr 12, 2025

Conversation

OMGPizzaGuy
Copy link
Member

This expands the use of palette class by altering the getPalette() method on ImageDecoder to return a const reference to the palette class. Image decoders without palettes return an empty palette. A few decoder instances now copy palette data rather than retain a pointer.

Thoughts:

  • Should Palette have a default of zero on the size constructor to ease use as a member variable?
  • Should Palette have a static const empty palette for references where it will always be empty?

@OMGPizzaGuy OMGPizzaGuy force-pushed the image-decoder-palette-interface branch 2 times, most recently from 095831f to d0c5b60 Compare April 5, 2025 23:10
@OMGPizzaGuy OMGPizzaGuy force-pushed the image-decoder-palette-interface branch from d0c5b60 to c319d82 Compare April 6, 2025 13:48
@bluegr
Copy link
Member

bluegr commented Apr 12, 2025

Great work, thanks!

@bluegr bluegr merged commit 1b58e6d into scummvm:master Apr 12, 2025
5 of 8 checks passed
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