home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / v / vol1n7.zip / TARGET.H < prev    next >
Text File  |  1992-10-10  |  2KB  |  54 lines

  1. /* TARGET.H
  2.  
  3. Copyright (c) 1992 Timur Tabi
  4. Copyright (c) 1992 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. #include "hexes.h"
  13.  
  14. typedef struct {          // Data for the targetting mechanism
  15.    volatile BOOL fActive; // TRUE if we are drawing the targetting line
  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 dx;                // = ptlEnd.x - ptlStart.x
  23.    HPS hpsLine;           // The HPS for target-line drawing
  24.    HPS hpsHighlight;      // The HPS for origin hex highlighting
  25.    HPS hpsPath;
  26.    TID tid;               // Thread ID
  27. } TARGET;
  28.  
  29. #ifdef TARGET_C
  30. #define EXTERN
  31. #else
  32. #define EXTERN extern
  33. #endif
  34.  
  35. EXTERN TARGET target;                          // User-controlled targetting
  36. EXTERN HWND hwndInfoBox;                       // Info box shows angle, range, and visibility
  37.  
  38. #undef EXTERN
  39.  
  40. void TgtInitialize(HWND);
  41. // Initializes the targetting structure
  42.  
  43. void TgtShutdown(void);
  44. // Shuts the targetting mechanism down
  45.  
  46. void TgtStart(HEXINDEX);
  47. // Activates targetting
  48.  
  49. void TgtEnd(void);
  50. // Terminates targetting
  51.  
  52. void TgtMove(HEXINDEX);
  53. // Moves the targetting line
  54.