NAME ==== vg_sprite_add() - add a sprite-element to a sprite SYNOPSIS ======== int vg_sprite_add(int spt, const bitmap * bmp, int loop, const char * sound, int sndvol) DESCRIPTION =========== Adds a sprite-element (see Understanding sprites: "Format of a sprite-file") to a sprite, which can be created with vg_sprite_createnew() or loaded with vg_sprite_createfromfile(). spt is the sprite, to which the sprite-element is to be added. bmp is the bitmap to be added (which will be duplicated when added). loop indicates how many (game-)loops this sprite-element is active. sound is an optional sound-filename to be played when this sprite-element becomes active, or it is NULL=no sound. sndvol indicates the sound-volume-percent (0 to 200, where 100 is default), if a sound is given (not NULL). RETURN VALUE ============ If it succeeds, 0 is returned. If an error occurs, -1 is returned and an error message is printed to stderr. SEE ALSO ======== Index Understanding sprites vg_sprite_createnew() vg_sprite_createfromfile() vg_sprite_duplicate() vg_sprite_rotate() vg_sprite_zoom() vg_sprite_mirror() vg_sprite_getnext() vg_sprite_getcurrent() vg_sprite_reset() vg_sprite_free()