/* * Animated Sprites Lib Header file * * (C)Copyright 1998 J. Tann * All Rights Reserved */ #ifndef ANI_SPRITES_HDR #define ANI_SPRITES_HDR //---------------------------------------------------------------------- // Macros and defined values //---------------------------------------------------------------------- // Animation control values for AsControl() #define ANI_START 1 // Starts animation playback of the sprite #define ANI_STOP 2 // Stops the animation playback and sets the displayed frame as the first frame #define ANI_PAUSE 3 // Stops playback at the current frame // AsMove() values #define MOVE_ABSOLUTE 0 // Moves a sprite directly to a location on the screen #define MOVE_RELATIVE !MOVE_ABSOLUTE // Moves a sprite relative to it's current location // AsShow() values #define HIDE_SPRITE 0 // Hides a sprite #define SHOW_SPRITE !HIDE_SPRITE // Shows a sprite (These are basically FALSE and TRUE respectively!!) // AsAdd() loop values #define ANI_ONCE 1 // Play animation just once #define ANI_LOOP 2 // Loop the animation by going straight to the first frame when the last frame is reached #define ANI_BOUNCE 3 // Loop the animation by playing backwards when last frame reached. Then continue forwards when first reached! //---------------------------------------------------------------------- // Function templates //---------------------------------------------------------------------- extern int AsInit(int); // Initialise function extern void AsFree(void); // Free sprite memory extern int AsCreate(GsIMAGE, u_short, int, int, int, int, int, int, int); // Create a sprite extern void AsDelete(int); // Delete a sprite extern void AsMove(int, int, int, int); // Move a sprite extern void AsShow(int, int); // Shows or hides a sprite extern int AsControl(int, int); // Controls the animation 'playback' extern void AsUpdate(GsOT *); // Update all active sprites #endif