Mail Archives: djgpp/1999/07/19/18:14:47
BITMAP structures hold information about any type of image loaded by
Allegro into memory (or video RAM).
BMP, TGA and PCX are loaded as bitmaps with the function load_bitmap().
get_rle_sprite will convert that bitmap into a RLE sprite so they use less
memory in RAM (most of the time).
so your code would look like this:
PALETTE mypal;
BITMAP *mybitmap = load_bitmap("file.pcx", mypal);
RLE_SPRITE *myrle = get_rle_sprite(mybitmap);
Hope this helps clarify everything.
- GodOfWar
At 11:45 AM 7/19/99 -0700, you wrote:
>I'm a little uncertain on what I need to do to display the RLE sprites from
>a .pcx file. The function:
>
>RLE_SPRITE get_rle_sprite(BITMAP *bitmap);
>
>My question would actually be on the BITMAP struct. What I tried to do was
>to pass the FILE handle to the BITMAP->dat variable, thinking that that is
>supposed to be the handle to the image data. I could be doing this
>completely wrong.. well, I'm pretty certain I am because I keep getting
>that lovely error SIGSEGV..
>
>I guess I'm just hoping for some clarification on what needs to go into the
>BITMAP struct for passing it to this function. As I said earlier I'm trying
>to display .pcx files which are RLE encoded bitmaps.
>
> Matt
>
>
- Raw text -