gameTacMap.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef GAMETACMAP_H
  2. #define GAMETACMAP_H
  3. /*************************************************************************************************\
  4. gameTacMap.h : Interface for the gameTacMap component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef TACMAP_H
  10. #include "TacMap.h"
  11. #endif
  12. //*************************************************************************************************
  13. /**************************************************************************************************
  14. CLASS DESCRIPTION
  15. gameTacMap:
  16. **************************************************************************************************/
  17. class GameTacMap: public TacMap
  18. {
  19. public:
  20. GameTacMap();
  21. ~GameTacMap()
  22. {
  23. if (buildingPoints)
  24. {
  25. delete [] buildingPoints;
  26. buildingPoints = NULL;
  27. }
  28. }
  29. void init( unsigned char* bitmapData, int dataSize );
  30. void update(); // do not call these two functions from editor
  31. void render();
  32. bool animate (long objectiveId, long nFlashes);
  33. // if the world coords do not lie on the map, they will be changed.
  34. void worldToTacMap( Stuff::Vector3D& world, gos_VERTEX& tac );
  35. bool inRegion( int x, int y ){ return x > left && x < right && y > top && y < bottom; }
  36. void initBuildings( unsigned char* data, int size );
  37. void setPos( const GUI_RECT& newPos );
  38. protected:
  39. int top; // position
  40. int left;
  41. int right;
  42. int bottom;
  43. int bmpWidth;
  44. int bmpHeight;
  45. int buildingCount;
  46. gos_VERTEX* buildingPoints;
  47. unsigned long textureHandle;
  48. unsigned long viewRectHandle;
  49. unsigned long blipHandle;
  50. Stuff::Vector3D navMarkers[6];
  51. unsigned long navMarkerCount;
  52. unsigned long curNavMarker;
  53. void drawSensor( const Stuff::Vector3D& pos, float radius, long color);
  54. void drawBlip( const Stuff::Vector3D& pos, long color, int shape );
  55. const static float s_blinkLength;
  56. static float s_lastBlinkTime;
  57. //Tutorial
  58. long objectiveAnimationId;
  59. long objectiveNumFlashes;
  60. float objectiveFlashTime;
  61. };
  62. //*************************************************************************************************
  63. #endif // end of file ( gameTacMap.h )