logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

get_rle_sprite - Creates an RLE sprite using a bitmap as source. Allegro game programming library.

Description

       Creates  an  RLE  sprite  based on the specified bitmap (which must be a memory bitmap). Remember to free
       this RLE sprite later to avoid memory leaks. Example:

          RLE_SPRITE *rle;
          BITMAP *bmp;
          ...
          /* Create RLE sprite from an existent bitmap. */
          rle = get_rle_sprite(bmp);
          if (!rle)
             abort_on_error("Couldn't create RLE sprite!");

          /* We don't need the bitmap any more.*/
          destroy_bitmap(bmp);

          /* Use the RLE sprite. */
          ...
          /* Destroy it when we don't need it any more. */
          destroy_rle_sprite(rle);

Name

       get_rle_sprite - Creates an RLE sprite using a bitmap as source. Allegro game programming library.

Return Value

       Returns a pointer to the created RLE sprite, or NULL if the RLE sprite could not be created. Remember  to
       free this RLE sprite later to avoid memory leaks.

See Also

draw_rle_sprite(3alleg4), destroy_rle_sprite(3alleg4)

Allegro                                           version 4.4.3                          get_rle_sprite(3alleg4)

Synopsis

#include<allegro.h>RLE_SPRITE*get_rle_sprite(BITMAP*bitmap);

See Also