home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d762 / plotmap.lha / PlotMap / source.lha / PlotMap.h < prev   
C/C++ Source or Header  |  1992-10-09  |  3KB  |  113 lines

  1. /* Definitionen für PlotMap */
  2.  
  3. #include <stdio.h>
  4. #include <mffp.h>
  5.  
  6. #define VERSION "0.85"
  7. #define DATE "23.7.92"
  8.  
  9. //#define REXXPORTNAME "plotmap_rexx"
  10.  
  11. extern struct ExecBase *SysBase;
  12. //extern struct RxsLib *RexxSysBase;
  13. extern struct IntuitionBase *IntuitionBase;
  14. extern struct GfxBase *GfxBase;
  15. extern struct Library *GadToolsLibrary;
  16.  
  17. extern UBYTE *screen_title;
  18. extern struct Window *main_wd;
  19. extern UWORD chip mouse_wait_data[], chip mouse_cross_data[];
  20.  
  21. #define RE     6378.165                /* radius of Earth (kilometers) */
  22. #define PI     3.141592653589793       /* define constants */
  23. #define PI2    (PI/2.0)
  24. #define TWOPI  (2.0*PI)
  25. #define RAD    (PI/180.0)
  26.  
  27.  
  28. #define MOUSE_NORMAL ClearPointer(main_wd)
  29. #define MOUSE_WAIT SetPointer(main_wd, mouse_wait_data, 16, 16, -6, 0)
  30. #define MOUSE_CROSS SetPointer(main_wd, mouse_cross_data, 13, 13, -7, -6)
  31.  
  32. #define TITLE_NORMAL SetWindowTitles(main_wd, (UBYTE *)-1, screen_title)
  33. #define TITLE_MSG(s) SetWindowTitles(main_wd, (UBYTE *)-1, s)
  34. #define TITLE_ERROR(s) { SetWindowTitles(main_wd, (UBYTE *)-1, s); DisplayBeep(NULL); }
  35.  
  36. #define IDCMP(f) ModifyIDCMP(main_wd, f);
  37. #define NORMAL_IDCMP (IDCMP_MENUPICK | IDCMP_INTUITICKS)
  38.  
  39. #define RMBTRAP_ON main_wd->Flags |= WFLG_RMBTRAP
  40. #define RMBTRAP_OFF main_wd->Flags &= ~WFLG_RMBTRAP
  41. #define REPORTMOUSE_ON main_wd->Flags |= WFLG_REPORTMOUSE
  42. #define REPORTMOUSE_OFF main_wd->Flags &= ~WFLG_REPORTMOUSE
  43.  
  44. #define Line(rp, x1,y1, x2,y2) {Move(rp, x1,y1); Draw(rp, x2,y2);}
  45. #define LineTo(rp, x,y) Draw(rp, x,y)
  46.  
  47. #define DL_HIGH         1              /* defs for detail level */
  48. #define DL_MEDIUMHIGH   2
  49. #define DL_MEDIUM       3
  50. #define DL_MEDIUMLOW    4
  51. #define DL_LOW          5
  52. #define DL_AUTO_HIGH    7              /* 7 because of NM_BARLABEL */
  53. #define DL_AUTO_MEDIUM  8
  54. #define DL_AUTO_LOW     9
  55.  
  56. #define MAX_DETAIL_LEVEL 5
  57.  
  58. #define MAP_PLANE (1<<8)
  59. #define MAP_BOX (1<<9)
  60. #define MAP_SPHERE (1<<10)
  61. #define MAP_MASK 0x00ff
  62. #define MAP_FLAT 1
  63. #define MAP_MERCATOR 2
  64. #define MAP_GLOBE 3
  65. #define MAP_ORBITAL 4
  66.  
  67.  
  68. struct point
  69. {                                      /* format for each point */
  70.    WORD code;
  71.    WORD lat, lam;
  72. };
  73.  
  74. struct arc
  75. {                                      /* format for limits in */
  76.    WORD lat_min, lat_max;              /* each segment */
  77.    WORD lam_min, lam_max;
  78.    ULONG first, last;
  79. };
  80.  
  81. struct mapinfo
  82. {                                      /* format for general map info   */
  83.    char *mapname;                      /* map file name                 */
  84.    ULONG numpts;                       /* number of points in map       */
  85.    UWORD nsegs;                        /* number of segments in map     */
  86.    UWORD first_seg;                    /* location in big segment array */
  87.    struct point *pt;                   /* address of points buffer      */
  88.    struct arc *seg;                    /* address of segment buffer     */
  89. };
  90.  
  91. #define NUM_MAPS 6
  92. #define NSEGS (208+301+111+344+103+196)   /* number of segments */
  93.  
  94. struct config
  95. {
  96.    WORD scr_depth;
  97.    BOOL superhires, interlace, overscan;
  98.    WORD mode;
  99.    UBYTE fontname[30];
  100.    UWORD fontsize;
  101.    UWORD colormap[16];
  102.    BOOL cls_before_draw, flood_fill;
  103.    BOOL coord_window, coord_mousexy, coord_degree;
  104.    WORD coord_wdx, coord_wdy;
  105.    double vfac;
  106.    WORD detail_level;
  107.    BOOL loadmap[NUM_MAPS], plotmap[NUM_MAPS];
  108.    UBYTE bg_color, ocean_color, mapcolor[NUM_MAPS];
  109.    UBYTE grid_color, gridhigh_color, shadow_color;
  110.    UBYTE line_color, box_color, text_color, flood_color;
  111. };
  112.  
  113.