/*
 * resspr.h
 *
 * [Generated from resspr, 25 September 1996]
 */

#if !defined(__CC_NORCROFT) || !defined(__arm)
  #error You must use the Norcroft ARM Compiler for Sapphire programs
#endif

#pragma include_only_once
#pragma force_top_level

#ifndef __resspr_h
#define __resspr_h

#ifndef __sapphire_h
  #include "sapphire.h"
#endif

/*----- Overview ----------------------------------------------------------*
 *
 * Functions provided:
 *
 *  resspr_load
 *  resspr_area
 *  resspr_init
 */

/* --- resspr_load --- *
 *
 * On entry:	R0 == pointer to filename
 *
 * On exit:	May return an error
 *
 * Use:		Loads a sprite file into memory and allows it to be
 *		referenced through resspr_area.  Note that Straylight's
 *		Sprinkle module must be loaded if more than one sprite file
 *		is to be used for resources.
 */

extern routine resspr_load;

/* --- resspr_area --- *
 *
 * On entry:	--
 *
 * On exit:	R0 == pointer to application's sprite area
 *
 * Use:		Locates the application's `Sprites' resource in memory and
 *		returns a pointer to it.  If the resource has not been
 *		loaded, 1 is returned, to indicate to use the WIMP area.
 *		If multiple sprite files have been loaded, this call returns
 *		the address of the first: they will have been linked together
 *		so that Sprinkle will treat them as one big area.
 */

extern routine resspr_area;

/* --- resspr_init --- *
 *
 * On entry:	R0 == pointer to application name
 *
 * On exit:	--
 *
 * Use:		Initalises resspr, loading the Sprites resource.
 */

extern routine resspr_init;

/*----- That's all, folks -------------------------------------------------*/

#endif
