/* > arspr.h

 * SJ Middleton, 1992

 */

#ifndef __arspr_h
# define __arspr_h

#ifndef __sprite_h
# include "sprite.h"
#endif

#ifndef __memalloc_h
# include "memalloc.h"
#endif

/* ----------------------- armovie_defaultsprite ------------------------------
 *
 * Description: load the default sprite from an ARMovie into a sprite area
 * Parameters:  const char *filename -- the movie file
 *              sprite_area **spritearea_anchor -- address of variable to use
 *                  as anchor for sprite area.
 *              This should be a valid ptr or NULL.
 * Returns:     TRUE if area allocated and sprite loaded.
 */

extern BOOL armovie_defaultsprite(const char *filename, sprite_area **spritearea_anchor);

/* ----------------------- armovie_defaultspritefromfile ----------------------
 *
 * Description: load the default sprite from an open file into a sprite area
 * Parameters:  int filehandle -- filehandle of the movie file
 *              int sprite_offset -- start of sprite from armovie_hdr
 *              int sprite_size -- size of sprite from armovie_hdr
 *              sprite_area **spritearea_anchor -- address of variable to use
 *                  as anchor for sprite area.
 *              This should be a valid ptr or NULL.
 * Returns:     TRUE if area allocated and sprite loaded.
 */

extern BOOL armovie_defaultspritefromfile(unsigned int filehandle, int sprite_offset, int sprite_size, sprite_area **area_anchor);

/*
 * Description: register memory functions to use when allocating sprite space.
 */

extern void arspr_registermemfns(mem_allocfn alloc, mem_freefn free);

#endif

/* eof arspr.h */
