Skip to content

Rework palette information into palettes.dat#25681

Merged
AaronVanGeffen merged 11 commits into
OpenRCT2:developfrom
AaronVanGeffen:rework-palettes
Jan 25, 2026
Merged

Rework palette information into palettes.dat#25681
AaronVanGeffen merged 11 commits into
OpenRCT2:developfrom
AaronVanGeffen:rework-palettes

Conversation

@AaronVanGeffen

@AaronVanGeffen AaronVanGeffen commented Dec 21, 2025

Copy link
Copy Markdown
Member

Building on the font information having already been moved to fonts.dat (#24342), this PR reworks the palette information, such that the game can be launched without G1. This would be useful for 'onboarding' purposes, e.g. selecting the game path if it cannot be automatically detected. Currently, this has been implemented using various platform-specific dialog toolkits (e.g. Zenity/KDialog).

Previously, there were several places where palettes were defined, and in different orders, no less. This has now been harmonised, compiling all palette info into its own graphics file, palettes.dat. This collects our extended (remap) palettes together with the vanilla (remap) palettes.

As part of dumping all palettes, the old text palette was also dumped. However, as of #25658, this is no longer necessary. It should probably be removed from this PR as well.

Comment thread src/openrct2/interface/Colour.cpp Outdated
@AaronVanGeffen

This comment was marked as outdated.

@AaronVanGeffen

This comment was marked as outdated.

@AaronVanGeffen

This comment was marked as resolved.

@AaronVanGeffen AaronVanGeffen changed the title Rework palette information Rework palette information into palettes.dat Dec 22, 2025
Comment thread src/openrct2/SpriteIds.h Outdated
Comment thread src/openrct2/drawing/Drawing.cpp Outdated
@Gymnasiast

Copy link
Copy Markdown
Member

As part of dumping all palettes, the old text palette was also dumped. However, as of #25658, this is no longer necessary. It should probably be removed from this PR as well.

Has this been done already?

@AaronVanGeffen

Copy link
Copy Markdown
Member Author

As part of dumping all palettes, the old text palette was also dumped. However, as of #25658, this is no longer necessary. It should probably be removed from this PR as well.

Has this been done already?

Thanks, it has been done now.

The commit introducing the OnboardingScene has also been split off to a separate branch, removing it from this PR. With that, I think this is ready for review.

@AaronVanGeffen
AaronVanGeffen marked this pull request as ready for review December 26, 2025 20:45
@AaronVanGeffen AaronVanGeffen added the squash merge A PR that should be squashed on merge. label Dec 26, 2025
Comment thread src/openrct2/Context.cpp

@mixiate mixiate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tested this and didn't find any differences.

Tested with diffing giant screenshots from the command line of various parks (nedesigns, dkmp, etc).

Made a very quick test with glass scenery:
transparenttest.zip

Tested a few ui screenshots and things that use the marker palettes.

Palettes.dat doesn't get built with msvc, gym has a patch for it though as I can't leave it as a suggestion here.

Have only briefly looked at the code but seems okay.

@github-actions github-actions Bot added the build Pertains to compilation, language standard, external dependencies. label Jan 13, 2026
Comment thread src/openrct2/drawing/ImageImporter.cpp Outdated
Comment thread src/openrct2/drawing/ImageImporter.cpp
Comment thread src/openrct2/command_line/sprite/SpriteBuild.cpp Outdated
@AaronVanGeffen

Copy link
Copy Markdown
Member Author

The rework of palette sprites has been split off to #25844. That just leaves the update to gxc in OpenRCT2/libsawyer#9 to finally wrap this up.

@Gymnasiast Gymnasiast left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems to work. I tried compressing the PNGs with zopflipng but that just caused some very weird effects.

@mixiate Could you give it one more test?

@mixiate mixiate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did the same tests as before and it's all good.

@AaronVanGeffen
AaronVanGeffen merged commit e6fa0e4 into OpenRCT2:develop Jan 25, 2026
25 checks passed
@Gymnasiast Gymnasiast added this to the v0.4.31 milestone Jan 25, 2026
@AaronVanGeffen
AaronVanGeffen deleted the rework-palettes branch January 25, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Pertains to compilation, language standard, external dependencies. squash merge A PR that should be squashed on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants