Re: Trying to understand the unsignedness in ALPHA_BLEND_RGBA

Sam Lantinga <[email protected]> Tue, 3 Jan 2017 23:48:06 -0800
Newsgroups gmane.comp.lib.sdl
Message-ID <CACC3sbEQ=WKDYybRw56z62u8E3sgya+HUoJwiWLig4P9t7Vs0w@mail.gmail.com>
I think that was just trying to promote Uint8 to a larger type. Does it
work if you replace (unsigned) with (int)?

On Tue, Jan 3, 2017 at 12:44 PM, capehill <[email protected]> wrote:

> After debugging testautomation_surface, I have concluded that SW blending
> doesn't work at least for me (big endian AmigaOS platform).
>
> For example, if sR is 0 and dR is 255, we will get -255*sA casted to an
> unsigned value. Basically results are quite large numbers instead of the
> expected 0-255 range. Am I missing something here?
>
> Reference: https://hg.libsdl.org/SDL/file/d11daa346140/src/video/
> SDL_blit.h#l455
>
> _______________________________________________
> SDL mailing list
> [email protected]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org