Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

void caca_free_sprite ( struct caca_sprite *  sprite  ) 

Free the memory associated with a sprite.

Parameters:
sprite The sprite to be freed.
Returns:
void

Definition at line 312 of file sprite.c.

{
    int i;

    if(sprite == NULL)
        return;

    for(i = sprite->nf; i--;)
    {
        struct caca_frame *frame = &sprite->frames[i];
        free(frame->chars);
        free(frame->color);
    }

    free(sprite->frames);
    free(sprite);
}


Generated by  Doxygen 1.6.0   Back to index