home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacWT 0.9 / wt Source / graphfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-10  |  1.4 KB  |  42 lines  |  [TEXT/CWIE]

  1. /*
  2. **  MacWT -- a 3d game engine for the Macintosh
  3. **  © 1995, Bill Hayden and Nikol Software
  4. **  Free for non-commercial use - address questions to the e-mail address below
  5. **
  6. **  Mail:           afn28988@freenet.ufl.edu (Bill Hayden)
  7. **    MacWT FTP site: ftp.circa.ufl.edu/pub/software/ufmug/mirrors/LocalSW/Hayden/
  8. **  WWW Page:       http://grove.ufl.edu:80/~nikolsw
  9. **
  10. **    All of the above addresses are due to changes sometime in 1996, so stay tuned
  11. **
  12. **  based on wt, by Chris Laurel
  13. **
  14. **  This program is distributed in the hope that it will be useful,
  15. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. */
  18.  
  19.  
  20. typedef enum { formatGIF87, formatGIF89, formatPPM, formatPICTR, formatUnknown } 
  21.    Graphic_file_format;
  22.  
  23. typedef enum { gfTrueColor, gfPaletted } Graphic_file_type;
  24.  
  25. typedef struct {
  26.      Graphic_file_type type;
  27.      short height, width;
  28.      long palette_entries;
  29.      long transparent_entry;
  30.      RGBcolor *palette;
  31.      unsigned char *bitmap;
  32. } Graphic_file;
  33.  
  34.  
  35. extern Graphic_file *new_graphic_file(void);
  36. extern void free_graphic_file(Graphic_file *gfile);
  37. extern Boolean graphic_file_pixel(Graphic_file *gfile, short x, short y, RGBcolor *rgb);
  38. extern Graphic_file *read_graphic_file(char *filename);
  39.  
  40. Graphic_file *LoadPPM(FILE *fp, char *filename);
  41. Graphic_file *LoadGIF(FILE *fp, char *fname );
  42. Graphic_file *LoadPICTR(FILE *fp, char *fname );