home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / STK100.ZIP / STKSRC.COM / SPR_ANIP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-20  |  2.4 KB  |  59 lines

  1. /**********************************************************************
  2. * spr_aniP.h
  3. * Private data structure for automatic sprite animation and movement
  4. **********************************************************************
  5.                     This file is part of
  6.  
  7.           STK -- The sprite toolkit -- version 1.0
  8.  
  9.               Copyright (C) Jari Karjala 1990
  10.  
  11. The sprite toolkit (STK) is a FreeWare toolkit for creating high
  12. resolution sprite graphics with PCompatible hardware. This toolkit 
  13. is provided as is without any warranty or such thing. See the file
  14. COPYING for further information.
  15.  
  16. **********************************************************************
  17. **********************************************************************/
  18.  
  19. #ifndef __SPR_ANIP_H_
  20. #define __SPR_ANIP_H_
  21.  
  22. #include "grtypes.h"
  23. #include "sprP.h"
  24.  
  25.  
  26. #define __ANIM_SPRITE_
  27. typedef struct _anim_sprite *ANIM_SPRITE;
  28.  
  29. /**********************************************************************
  30. * The maximum number of sprites in one animated sprite
  31. **********************************************************************/
  32. #define ANIM_SPRITE_MAX 20
  33.  
  34. /**********************************************************************
  35. * The control structure for the automatic sprite animation & movement.
  36. **********************************************************************/
  37. struct _anim_sprite {
  38.     int active;             /* >0 if active         */
  39.     int state;              /* NORMAL,DELETE,DESTROY*/
  40.     int x;                  /* current x coordinate */
  41.     int y;                  /* current y coordinate */
  42.     int dx;                 /* delta x              */
  43.     int dy;                 /* delta y              */
  44.     int top, bot;           /* vertical limits      */
  45.     int lef, rig;           /* horizontal limits    */
  46.     WORD fx_mode;           /* special fx flags     */
  47.     WORD (*fx_handler)(ANIM_SPRITE, WORD, SPRITE); /* fx handler    */
  48.     WORD frame_delay;       /* delay between animation frames */
  49.     WORD delay_count;       /* passes until frame change      */
  50.     WORD timeout_count;     /* current timeout value          */
  51.     WORD spr_count;         /* number of sprites              */
  52.     WORD spr_index;         /* current sprite                 */
  53.     SPRITE sprites[ANIM_SPRITE_MAX];        /* the sprites    */
  54.     struct _anim_sprite *next;    /* the next animated sprite */
  55. };
  56.  
  57. #endif
  58.