Page 1 of 1

Using API to generate special effect..

PostPosted: Jul 15, 2008 @ 3:54am
by mamahow

PostPosted: Jul 15, 2008 @ 10:34am
by edge

PostPosted: Aug 24, 2009 @ 9:01am
by igolovin

PostPosted: Aug 25, 2009 @ 8:27am
by edge
Hi,

For your effect we recommend using RGBA surfaces. Store the image with your transparent pixels in a PNG and load it on a E2DSurfaceRGBA. You can also load your current image, and use replacecolor to replace black (rgba: 0, 0, 0, 255) to black with 50% transparency (rgba: 0, 0, 0, 128).

PostPosted: Aug 25, 2009 @ 8:36am
by igolovin
Thanks for your reply. Using RGBA surfaces, of course, the obvious option. But I was hoping to use RGB surfaces, because they support the scaling and rotation. But if this is impossible, I have to use RGBA surfaces.

PostPosted: Sep 3, 2009 @ 5:25pm
by edge

PostPosted: Sep 16, 2009 @ 11:28am
by igolovin
Hi,

Thanks for your reply. You offered a good solution but my sprites already contain areas marked as a shadow using some color.