suggestions for animation with alpha value?
I'm a bit confused with how to go about blitting a section of a tga file which has alpha values, because the way to blit a transparent image only allows you to draw the whole thing..
Am I overlooking something?
How would I go about blitting a section of a translucent image, and not the whole thing?
if it's not possible to blit only a part of the image you could save the animation in different files.
and so on.
Then just blitt the diffrent images.
I do it this way.
yeah, i figured that would be possible, but I'm wondering if there is an alternative where you can keep the frames all in 1 file.
You can load one tga file and create individual memory bitmaps using it. Mapping the right alpha values is an easy task.
(edited for clarification)
gifs can't be translucent like I described, they can only be transparent.
I'm useing the tga format.
Create sub-bitmaps of the main bitmap:
Don't forget to destroy the sub-bitmaps before the main one.
cool, that works great, cat!
If I rotate the bitmap, will there be a problem about translucency?
I wanted to do just that, so I went and tried it, tapir.
rotate_sprite works, it keeps the alphas and evrything.
What you gotta make sure to do is draw/rotate it onto a new bitmap, and then draw the new bitmap instead of the sub_bitmap.
? That allows you to draw transparent stuff...
Thread #556586. Printed from Allegro.cc
maksed_blit skips the keycolor, he wants translucency = alpha