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

fades should be done with the physical palette only #71

Open
pphaneuf opened this issue Aug 22, 2014 · 1 comment
Open

fades should be done with the physical palette only #71

pphaneuf opened this issue Aug 22, 2014 · 1 comment

Comments

@pphaneuf
Copy link
Member

No description provided.

@pphaneuf
Copy link
Member Author

SDL_Surface, compared to Bitmap, has the slight difference that it keeps
one logical palette per instance (instead of just always interpreting the
pixel values in terms of the physical palette).

The thing is, when blitting from one surface to another, the pixel values
are mapped from one palette to the other. So we need to keep adjusting the
source surface's palette when blitting during a fade, otherwise all the
pixels get mapped to dark color entries, and it doesn't "fix itself" when
the fade is over.

If we would keep the logical palette of the display surface stable and
played only with the physical palette for the fading effect, this would be
much simpler, where source surfaces (of which there seems to be only one at
a time in most screens? yet to be verified) would need to be adjusted only
when we changed the logical palette. In fact, it seems like we usually do
it the other way around (set the display palette from the background image,
for example) in the first place.

Palettes in general are really starting to annoy me, though. :-)

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

No branches or pull requests

1 participant