GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
get_compiled_sprite(3) Allegro manual get_compiled_sprite(3)

get_compiled_sprite - Creates a compiled sprite using a bitmap as source. Allegro game programming library.

#include <allegro.h>

COMPILED_SPRITE *get_compiled_sprite(BITMAP *bitmap, int planar);

Creates a compiled sprite based on the specified bitmap (which must be a memory bitmap). Compiled sprites are device-dependent, so you have to specify whether to compile it into a linear or planar format. Pass FALSE as the second parameter if you are going to be drawing it onto memory bitmaps or mode 13h and SVGA screen bitmaps, and pass TRUE if you are going to draw it onto mode-X or Xtended mode screen bitmaps. Example:

   COMPILED_SPRITE *cspr;
   BITMAP *bmp;
   ...
   /* Create compiled sprite from an existent bitmap. */
   cspr = get_compiled_sprite(bmp, 0);
   if (!cspr)
      abort_on_error("Couldn't create compiled sprite!");
   
   /* We don't need the bitmap any more.*/
   destroy_bitmap(bmp);
   
   /* Use the compiled sprite. */
   ...
   /* Destroy it when we don't need it any more. */
   destroy_compiled_sprite(cspr);
   
Returns a pointer to the created compiled sprite, or NULL if the compiled sprite could not be created. Remember to free this compiled sprite later to avoid memory leaks.

draw_compiled_sprite(3), destroy_compiled_sprite(3)
version 4.4.3 Allegro

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.