[Scummvm-devel] blendPixelPtr()

Marcus Comstedt marcus at mc.pp.se
Fri Jan 10 20:14:02 CET 2014


"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.


  // Marcus






More information about the Scummvm-devel mailing list