Re: [AD] Fix for C version of draw_trans_sprite |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I switched to using the C sprite routines after getting strange crashes in
> the assembler versions - anyway, I noticed that the draw_trans_sprite
> doesn't work as it should (the transparent pixels turn to pink).
This used to be true...
> Starting on line 511 of cspr.h: (allegro 4.1.7), the fix:
>
> for (x = w - 1; x >= 0; INC_PIXEL_PTR(s), INC_PIXEL_PTR(d), x--) {
> unsigned long c = GET_MEMORY_PIXEL(s);
> + if (!IS_SPRITE_MASK(src, c)) {
> c = DTS_BLEND(blender, GET_MEMORY_PIXEL(d), c);
> PUT_MEMORY_PIXEL(d, c);
> + }
> }
Note that the fix is incomplete, the two similar patterns above need to be
fixed too.
Anyway, lillo spotted the problem while working on the MacOS X port and the
problem is now corrected on trunk and branch.
Thanks for reporting it though.
--
Eric Botcazou