Hi there,
Here is a suggestion for a small API change (so I guess this will have to
wait for SDL 1.3 or 2.0 or whatever…)
I’d like this function:
int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
changed to:
int SDL_SetAlpha(SDL_Surface *surface, Uint8 alpha);
I think flags are not needed in the parameters because:
-
you can safely guess the value of SDL_SRCALPHA
alpha<255 => set SDL_SRCALPHA
alpha=255 => unset SDL_SRCALPHA -
SDL_RLEACCEL shouldn’t be set here ! It’s annoying to have to check if
SDL_RLEACCEL was on not to remove it accidentaly by setting the alpha. We
should have a new procedure SDL_SetRLEAccel or something like that.
the same comment applies to
int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key);
except here you might want to keep the flag to have the full 32bits of the
key argument to specify the color (not very usefull though since I don’t
think the 8bits of the alpha channel is of any use in a colorkey.
Ok, that’s it… for now…
-Ga?tan.