/*========================================================================== Star.h - This is a header file used for adding all the necessary includes, some definition of structure types and some definitions of constants and macros, for the StarChart program. Credits for Star Chart: Robert L. Hill of the Orange County, CA. Amiga Friends User Group wrote the original version of StarChart in AmigaBasic The star data and many of the main functions of this version are derived from that program. Ray R. Larson wrote the c version 1.0 of StarChart, 'intuitionizing' and enhancing the speed and functions of the original. Copyright (c) 1986 by Ray R. Larson This program may be freely distributed and copied, but may not be sold without the permission of the author. If you modify or enhance it, please include the above credits (and please send me a copy!). Ray R. Larson 6425 Central Ave. #304 El Cerrito, CA 94530 BitNet LARSON@UCBCMSA Well rrl CServe 70446,766 =========================================================================*/ /* The usual lump of Amiga header files */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Mask bits */ #define INTUITION 0x00000001 #define GRAPHICS 0x00000002 #define WINDOW 0x00000004 #define MENU 0x00000008 #define SCREEN 0x00000010 #define MATHLIB 0x00000020 #define MATHTRANS 0x00000040 #define TIMEPORT 0x00000080 #define TIMEMSG 0x00000100 #define COLORMAP 0x00000200 #define ICONLIB 0x00000400 /* constants - MAX cons leave a little extra space for temp values */ /* in arrays and search tables */ #define MAXSTARS 610 #define MAXGREEK 30 #define MAXCONS 65 #define NumStars 598 #define NumCons 60 #define NumGreek 24 /* dimensions/coordinates of display area */ #define CHARTLEFT 40L #define CHARTTOP 10L #define CHARTRIGHT 598L #define CHARTBOT 170L /*macros*/ #define INRANGE(n,nl,nh) ((n >= nl) && (n <= nh) ? 1:0) #define INBOX(x,y,xl,xr,yt,yb) ((INRANGE(x,xl,xr)) && (INRANGE(y,yt,yb)) ? 1:0) #define ONCHART(x,y) (INBOX(x,y,CHARTLEFT,CHARTRIGHT,CHARTTOP,CHARTBOT) ? 1:0) struct star_rec { char *StarName; /* Name of star or object */ FLOAT Ra,Dc,Mag,Dist; /* Right Ascension, Declination, Magnitude */ /* and distance in light years */ SHORT ConsNum, GreekNum; /* Constellation number, and Greek name */ /* These are indexes into the Constel & */ /* Greek arrays */ char *Comment; /* color - comments or common names of the stars */ }; /* structure for holding constellation info */ struct cons_rec { char *ConsName; /* name of constellation */ char *ConsAbrv; /* abbreviation for constellation */ char *ConsMean; /* meaning of constellation name */ }; /* structure to hold date, time and location parameters */ struct ParamStruct { SHORT LongitudeDeg, LongitudeMin, Latitude, Month, Day, Year; FLOAT Lst, Gst; SHORT Hr, Mn, Hour, Minute, Horizon; }; /* coord structure to hold coordinates of star display positions on screen */ struct Coord { LONG x,y; };