home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mnth0109.zip / Timur / target.h < prev    next >
Text File  |  1993-06-07  |  2KB  |  52 lines

  1. /* TARGET.H
  2.  
  3. Copyright (c) 1992-1993 Timur Tabi
  4. Copyright (c) 1992-1993 Fasa Corporation
  5.  
  6. The following trademarks are the property of Fasa Corporation:
  7. BattleTech, CityTech, AeroTech, MechWarrior, BattleMech, and 'Mech.
  8. The use of these trademarks should not be construed as a challenge to these marks.
  9.  
  10. */
  11.  
  12. typedef struct {                    // Data for the targetting mechanism
  13.    volatile BOOL fActive;           // TRUE if we are drawing the targetting line
  14.    HPS hpsLine;                     // The HPS for target-line drawing
  15.    HPS hpsPath;
  16.    HEXINDEX hiStart;                // The index of the starting hex
  17.    HEXINDEX hiEnd;                  // The index of the ending hex
  18.    POINTL ptlStart;                 // The X,Y coordinate of the line's origin
  19.    POINTL ptlEnd;                   // The X,Y coordinate of the line's end
  20.    float m;                         // The slope of the targetting line
  21.    float b;                         // The intercept of the targetting line
  22.    int range;                       // The range, in hexagons, from start to end
  23.    int angle;                       // The angle, in degrees, where 0 is to the right
  24.    int iVis;                        // Visibility
  25.    int dx;                          // = ptlEnd.x - ptlStart.x
  26. } TARGET;
  27.  
  28. extern TARGET target;               // This in initialed in TARGET.c
  29.  
  30. #ifdef TARGET_C
  31. #define EXTERN
  32. #else
  33. #define EXTERN extern
  34. #endif
  35.  
  36. EXTERN long lNumColors;                        // The number of colors, for Highlight()
  37. EXTERN HWND hwndInfoBox;
  38.  
  39. #undef EXTERN
  40.  
  41. void TgtInit(void);
  42. // Initializes the targetting structure
  43.  
  44. void TgtStart(HEXINDEX);
  45. // Activates targetting
  46.  
  47. void TgtEnd(void);
  48. // Terminates targetting
  49.  
  50. void TgtMove(HEXINDEX);
  51. // Moves the targetting line
  52.