Is it possible? (allegro)

Started by
10 comments, last by 23yrold3yrold 18 years, 5 months ago
Hi I was just wondering if it was possible to use gifs with allegro instead of bitmaps.. I can only find a good program for making animated gifs and I can't find one that will save an animated bmp... If you can't use gifs.. then does anyone know a program that will save animated bmps? Any help would be appreciated.
Advertisement
I'm sorry, but animated bitmaps don't exist. The file type doesn't support it.
The code in this post is probably C++ & DirectX ;)
That wouldn't be your only obstacle; the only animation file type Allegro supports is FLIC last I checked.
{[JohnE, Chief Architect and Senior Programmer, Twilight Dragon Media{[+++{GCC/MinGW}+++{Code::Blocks IDE}+++{wxWidgets Cross-Platform Native UI Framework}+++
you can however create your own animations of sorts using compressed datafiles to store each frame of the animation as a bmp.
i think this is what you are looking for http://www.allegro.cc/depot/project.php?_id=648

ps what is the correct url tags
You're best option is to is to create or put a bunch of frames into a bitmap and cycle though the frames like this


if (++framecount>framedelay)
{
framecount = 0;
if (++currentframe>maxframe)
frame = 0;
}

where framedelay is a variable that determines how long it waites before it draws the next frame
You can download a GIF loader to read GIF images, but you should handle all your animation with code. The only real reason to even use GIF is if you want to load external data from the user.
I personally created my own file type that stored a series of bitmaps along with animation info (like offsets and keyframes).

Jesus saves ... the rest of you take 2d4 fire damage.

Quote:Original post by 23yrold3yrold
I personally created my own file type that stored a series of bitmaps along with animation info (like offsets and keyframes).
Whoa.... Welcome back, Chris. Where have you been?
Rob Loach [Website] [Projects] [Contact]
Never left. Just don't have much to contribute to SDL threads. [smile]

Jesus saves ... the rest of you take 2d4 fire damage.

This topic is closed to new replies.

Advertisement