[Scummvm-devel] blendPixelPtr()
Willem Jan Palenstijn
wjp at usecode.org
Sun Jan 12 13:38:01 CET 2014
On Fri, Jan 10, 2014 at 08:14:02PM +0100, Marcus Comstedt wrote:
>
> "Marcus Comstedt" <marcus at mc.pp.se> writes:
>
> > Ah, it seems there is some bug in the code for drawing the _non_ round
> > parts of the box, which decreases the alpha. Maybe that is where the
> > non-opaque pixels came from?
>
> Nailed it.
>
> Seems the act of using blendPixelPtr() to draw a fully opaque pixel on
> top of another pixel which was also already fully opaque, would cause
> a numeric overflow making the computed alpha value truncated down to 0
> (by computing 256&255).
>
> I guess the classic UI doesn't spend much time first drawing one set
> of fully opaque pixels, and then overdrawing them with something else.
> If it did I ought to have noticed this earlier. ;-)
>
> Anyway, pushing now. I fixed the blend function in the Android port
> as well, but it's probably a good idea to check any other GL based
> ports too.
Thanks for tracking this down!
-Willem Jan
More information about the Scummvm-devel
mailing list