Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TF_OVERVIEW_H
  8. #define TF_OVERVIEW_H
  9. #include <mapoverview.h>
  10. #include "tf_shareddefs.h"
  11. class CTFMapOverview : public CMapOverview
  12. {
  13. DECLARE_CLASS_SIMPLE( CTFMapOverview, CMapOverview );
  14. CTFMapOverview( const char *pElementName );
  15. int m_CameraIcons[MAX_TEAMS];
  16. int m_CapturePoints[MAX_CONTROL_POINTS];
  17. void ShowLargeMap( void );
  18. void HideLargeMap( void );
  19. void ToggleZoom( void );
  20. void PlayerChat( int index );
  21. void DrawQuad( Vector pos, int scale, float angle, int textureID, int alpha );
  22. void DrawHorizontalSwipe( Vector pos, int scale, int textureID, float flCapPercentage, bool bSwipeLeft );
  23. bool DrawCapturePoint( int iCP, MapObject_t *obj );
  24. void SetDisabled( bool disabled ){ m_bDisabled = disabled; }
  25. bool IsDisabled( void ){ return m_bDisabled; }
  26. virtual void Paint();
  27. virtual bool ShouldDraw( void );
  28. virtual void VidInit( void );
  29. virtual void SetMap( const char * map );
  30. protected:
  31. virtual void SetMode(int mode);
  32. virtual void InitTeamColorsAndIcons();
  33. virtual void FireGameEvent( IGameEvent *event );
  34. virtual void DrawCamera();
  35. virtual void DrawMapPlayers();
  36. virtual void Update();
  37. virtual void UpdateSizeAndPosition();
  38. virtual void UpdateMapOverlayTexture();
  39. virtual void DrawMapOverlayTexture();
  40. // rules that define if you can see a player on the overview or not
  41. virtual bool CanPlayerBeSeen( MapPlayer_t *player );
  42. void DrawVoiceIconForPlayer( int playerIndex );
  43. virtual bool DrawIcon( MapObject_t *obj );
  44. protected:
  45. void UpdateCapturePoints();
  46. private:
  47. int m_iLastMode;
  48. int m_iVoiceIcon;
  49. int m_iChatIcon;
  50. bool m_bDisabled;
  51. float m_flPlayerChatTime[MAX_PLAYERS];
  52. int m_nMapTextureOverlayID; // texture id for current overlay image (shown over the current overview image)
  53. #define TF_MAP_ZOOM_LEVELS 2
  54. };
  55. extern CTFMapOverview *GetTFOverview( void );
  56. #endif // TF_OVERVIEW_H