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

[color_adjust] no longer allows setting the screen to a single colour with ToD #3144

Closed
shikadiqueen opened this issue May 21, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@shikadiqueen
Copy link
Member

commented May 21, 2018

In 1.14, the RGB values passed to the [color_adjust] tag are clamped in the [-255, 255] range by the tod_color class constructor (wesnoth.color_adjust calls display::adjust_color_overlay(), which sets display::color_adjust_ to a new tod_color value). While this "makes sense", it unfortunately breaks edge cases from 1.12 and 1.10 where it was possible to use [color_adjust] with excessively large or small values (e.g. 500 or -500) to completely negate the effects of the existing time schedule colour shift (see the [time] tag) in case it would interfere in some way since the [color_adjust] shift is added to the base ToD shift.

For example, if the ToD shift is 100,100,100, using [color_adjust] with -255,-255-255 will leave the effective shift at -155,-155,-155, which is not 100% black, so we'd use -500,-500,-500 in 1.12 and 1.10 instead.

This regression affects a huge number of cutscenes in my campaigns and I'd greatly prefer to see it fixed in the engine without having to resort to the alternative of manipulating the ToD schedule of the scenario every single time I need to have the screen painted a full solid colour.

It could be considered for 1.16 to leave it to the author to specify whether the [color_adjust] shift should be added to the ToD shift or override it entirely.

@Vultraz

This comment has been minimized.

Copy link
Member

commented May 21, 2018

Introduced by c77faf2

shikadiqueen added a commit that referenced this issue May 21, 2018

Clamp tod_color values in the [-510, 510] range instead of [-255, 255]
[color_adjust] needs to be able to use absolute values as large as
2*255 in certain edge cases to set the screen a single solid colour when
interacting with time of day colour shifts.

Fixes #3144.
@CelticMinstrel

This comment has been minimized.

Copy link
Member

commented May 21, 2018

I thought this should've stayed open as a reminder to add something like override_tod to [color_adjust]...

jostephd added a commit to jostephd/wesnoth that referenced this issue Oct 6, 2018

Clamp tod_color values in the [-510, 510] range instead of [-255, 255]
[color_adjust] needs to be able to use absolute values as large as
2*255 in certain edge cases to set the screen a single solid colour when
interacting with time of day colour shifts.

Fixes wesnoth#3144.

jostephd pushed a commit to jostephd/wesnoth that referenced this issue Oct 7, 2018

Clamp tod_color values in the [-510, 510] range instead of [-255, 255]
[color_adjust] needs to be able to use absolute values as large as
2*255 in certain edge cases to set the screen a single solid colour when
interacting with time of day colour shifts.

Fixes wesnoth#3144.

(cherry-picked from commit ae127ea)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.