Skip to content

fix: Graphical issues with tint_config implementation#8211

Merged
chaosvolt merged 5 commits intocataclysmbn:mainfrom
usagirei:bugfix_tint_config_color
Feb 20, 2026
Merged

fix: Graphical issues with tint_config implementation#8211
chaosvolt merged 5 commits intocataclysmbn:mainfrom
usagirei:bugfix_tint_config_color

Conversation

@usagirei
Copy link
Collaborator

@usagirei usagirei commented Feb 19, 2026

Purpose of change (The Why)

Fix graphical issues introduced by #8026

Describe the solution (The How)

tint_config made use of std::optional<SDL_Color>, but std::nullopt and TILESET_NO_COLOR evaluated to different tiles (hash mismatch), when they should be the same, causing issues with dynamic tile lookup

Describe alternatives you've considered

N/A

Testing

Load Game
Change Tileset (e.g UltiCa) when the game is open
or Debug - Reload Tileset

Additional context

Note: Reloading/Changing the Tileset at z-level != 0 has its own issues, unrelated to this PR, and will be dealt with later.

Aditionally:

std::optional<float> contrast;    
std::optional<float> saturation;
std::optional<float> brightness;

Are prone to the same issue, and should also be changed to be always present values, with bias (-1 ~ 1 range), and 0 being treated as no-op like TILESET_NO_COLOR

Tagging @AzmodiusX for this

Checklist

Mandatory

@github-actions github-actions bot added the src changes related to source code. label Feb 19, 2026
@AzmodiusX
Copy link
Collaborator

I'm going to swap the post processing fields to be non-optional as well, but I need to handle other stuff.
Please don't merge this beforehand.

Copy link
Collaborator

@AzmodiusX AzmodiusX left a comment

Choose a reason for hiding this comment

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

Everything seems to work perfectly.
My additions were minor, so I'll approve
But I'll let someone else merge, just in case

@chaosvolt chaosvolt merged commit 46e063a into cataclysmbn:main Feb 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

src changes related to source code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants