home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Shareware Plus / Developers / Flame / flame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-20  |  1.3 KB  |  49 lines  |  [TEXT/CWIE]

  1. /*flame 0.9
  2. **by Kyle Ellrott
  3. **garage@wave.net
  4. **11/20/96
  5. **
  6. **Some times the beast takes on a life of it's own...
  7. ** - What do you want to do to the world?
  8. ** - Burn it.  Burn it all.
  9. */
  10.  
  11. #define noSpeedUp    1
  12. #define lowRes2        2
  13. #define lowRes4        3
  14.  
  15. typedef struct IndexNum{
  16. unsigned char    ctabNum;
  17. }IndexNum;
  18.  
  19. typedef IndexNum    IndexArray[1];
  20.  
  21. typedef struct Flame{
  22. Ptr                    baseAddr;            //The work area
  23. Rect                bounds;                //The size
  24. char                speedUp;            //How big are the pixels
  25. short                topLine;            //The highest point of the flame
  26. long                rowBytes;            //The number of bytes per row
  27. unsigned char        fColSize;            //How many spots are in the next array
  28. IndexArray            flameColors;        //How do these colors look in the pixmap
  29. }Flame;
  30.  
  31. typedef Flame *FlamePtr;
  32.  
  33.  
  34. OSErr SetUpFlames(CTabHandle flamePalette, CTabHandle destPalette,
  35.                     Rect *bounds, char speed, FlamePtr *theFlame);
  36.                     
  37. void KillFlames(FlamePtr *theFlame);
  38.  
  39. void ChuckInFire(short x, short y, PixMapPtr victim, FlamePtr theFlame);
  40.  
  41. void Spark(short x, short y, unsigned char heat, FlamePtr theFlame);
  42.  
  43. void SetUpBurn(unsigned char odds, unsigned char max, unsigned char min, FlamePtr theFlame);
  44.  
  45. void Burn (FlamePtr theFlame, unsigned char takeOff, Boolean fuzz);
  46.  
  47. void CopyFlame(short x, short y, FlamePtr theFlame, PixMapPtr dest);
  48.  
  49. void MaskFlame(short x, short y, FlamePtr theFlame, PixMapPtr dest);