home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- * spr_aniP.h
- *
- * Private data structure for automatic sprite animation and movement
- **********************************************************************
- This file is part of
-
- STK -- The sprite toolkit -- version 1.0
-
- Copyright (C) Jari Karjala 1990
-
- The sprite toolkit (STK) is a FreeWare toolkit for creating high
- resolution sprite graphics with PCompatible hardware. This toolkit
- is provided as is without any warranty or such thing. See the file
- COPYING for further information.
-
- **********************************************************************
- **********************************************************************/
-
- #ifndef __SPR_ANIP_H_
- #define __SPR_ANIP_H_
-
- #include "grtypes.h"
- #include "sprP.h"
-
-
- #define __ANIM_SPRITE_
- typedef struct _anim_sprite *ANIM_SPRITE;
-
- /**********************************************************************
- * The maximum number of sprites in one animated sprite
- **********************************************************************/
- #define ANIM_SPRITE_MAX 20
-
- /**********************************************************************
- * The control structure for the automatic sprite animation & movement.
- **********************************************************************/
- struct _anim_sprite {
- int active; /* >0 if active */
- int state; /* NORMAL,DELETE,DESTROY*/
- int x; /* current x coordinate */
- int y; /* current y coordinate */
- int dx; /* delta x */
- int dy; /* delta y */
- int top, bot; /* vertical limits */
- int lef, rig; /* horizontal limits */
- WORD fx_mode; /* special fx flags */
- WORD (*fx_handler)(ANIM_SPRITE, WORD, SPRITE); /* fx handler */
- WORD frame_delay; /* delay between animation frames */
- WORD delay_count; /* passes until frame change */
- WORD timeout_count; /* current timeout value */
- WORD spr_count; /* number of sprites */
- WORD spr_index; /* current sprite */
- SPRITE sprites[ANIM_SPRITE_MAX]; /* the sprites */
- struct _anim_sprite *next; /* the next animated sprite */
- };
-
- #endif
-