home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Graphics⁄Sound / Star Stuff / star.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-03-14  |  1.2 KB  |  57 lines  |  [TEXT/????]

  1. /*  Include file for Stars program */
  2.  
  3. #define STARFILE "stars.cart"
  4. #define RESFILE "star.res"
  5.  
  6. /* ID's for the main and credits dialog box */
  7. #define DIDget 257
  8. #define DIDblame 258
  9.  
  10. /* Equates for dialog box */
  11. #define BUTok 1
  12. #define BUTcan 2
  13. #define BUTblame 3
  14. #define TErah 4
  15. #define TEram 5
  16. #define TEras 6
  17. #define TEdecd 7
  18. #define TEdecm 8
  19. #define TEdecs 9
  20. #define RBn 10
  21. #define RBs 11
  22. #define TEwid 12
  23. #define CBblack 13
  24. #define CBcross 14
  25. #define CBlabel 15
  26. #define TEmaglabel 16
  27.  
  28. /* Constants */
  29. #define PI 3.141592654
  30. #define PIo2 1.570796327
  31. #define DtoR 0.017453293
  32. #define HtoR 0.261799388
  33. #define RtoD 57.29577951
  34. #define RtoH 3.819718634
  35.  
  36. #define X 0
  37. #define Y 1
  38. #define Z 2
  39. #define DIST 32000        /* Distance from the observer to the firmament    */
  40. #define NSTARS 1573        /* The size of the catalog */
  41.  
  42. extern WindowPtr FrontWindow();
  43. extern DialogPtr GetNewDialog();
  44. long fread();
  45. extern char *lmalloc();
  46.  
  47. /* The datafile is in the form of 1573 records, each of which has the
  48.     following form:
  49. */
  50.  
  51. typedef struct {
  52.     char name[6];        /* Not null terminated */
  53.     int x, y, z;        /* Cartesian coordinates, assuming the star is at     */
  54.                         /* a distance of 32000 units.                        */
  55.     int mag, color;        /* Magnitude and B-V values times 100 */
  56. } star;
  57.