[AD] Dissolve blender, findfirst on MSVC |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
When I wrote the blenders so many years ago, I obviously neglected to
test the dissolve blender, as the opacity polarity is inverted. It
should be:
if (n == 0)
return y;
if (n == 255)
return x;
return ((rand() & 255) < (int)n) ? x : y;
Instead of what's in there.
Also, findfirst emulation should be enabled for MSVC; MSVC only has
_findfirst, which has different, poorly-designed semantics, and is
undocumented. It doesn't compile out-of-box with ALLEGRO_NO_FINDFIRST
set.
It appears that Shawn didn't finish up with this behavior.
_al_findfirst is the function to link to (src/win/wfile.c and such),
but if ALLEGRO_NO_FINDFIRST is set it defaults to opendir instead
(src/libc.c), which MSVC is also lacking.
The necessary fixes could easily be done without changing the external
API, but a number of files will be hit, and the implementation is a
design choice.
--
Burton Radons (burton-radons@xxxxxxxxxx)
Vancouver Island, British Columbia, Canada
Designing the smarter ass since 1979.