Re: [AD] Another custom cursor question |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-09-14, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> While going through the code used by the other ports to set up the
> custom cursor, I came across this in the X11 port:
>
> for (iy = 0; iy < bmp_h; iy++) {
> for (ix = 0; ix < bmp_w; ix++) {
> ALLEGRO_COLOR col;
> unsigned char r, g, b, a;
>
> col = al_get_pixel(bmp, ix, iy);
> al_unmap_rgb(col, &r, &g, &b);
> a = 255;
> image->pixels[c++] = (a<<24) | (r<<16) | (g<<8) | (b);
> }
> }
>
> The alpha cahnnel from the source bitmap is completely unused, which
> doesn't look right to me.
Probably an oversight. It would be good to make ex_mouse_cursor use a
sprite with an alpha channel.
Peter