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.

45 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef DOD_HEADICONMANAGER_H
  8. #define DOD_HEADICONMANAGER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "bitvec.h"
  13. class IMaterial;
  14. class CHeadIconManager : CAutoGameSystem
  15. {
  16. public:
  17. CHeadIconManager();
  18. ~CHeadIconManager();
  19. virtual bool Init();
  20. virtual void Shutdown();
  21. public:
  22. // Call from the HUD_CreateEntities function so it can add sprites above player heads.
  23. void DrawHeadIcons();
  24. // Call from player render calls to indicate a head icon should be drawn for this player this frame
  25. void PlayerDrawn( C_BasePlayer *pPlayer );
  26. private:
  27. IMaterial *m_pAlliesIconMaterial; // For labels above players' heads.
  28. IMaterial *m_pAxisIconMaterial; // For labels above players' heads.
  29. CBitVec<MAX_PLAYERS> m_PlayerDrawn; // Was the player drawn this frame?
  30. };
  31. // Get the (global) head icon manager.
  32. CHeadIconManager* HeadIconManager();
  33. #endif // DOD_HEADICONMANAGER_H