summaryrefslogtreecommitdiff
path: root/game/client/dod/dod_headiconmanager.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/dod/dod_headiconmanager.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/dod/dod_headiconmanager.h')
-rw-r--r--game/client/dod/dod_headiconmanager.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/game/client/dod/dod_headiconmanager.h b/game/client/dod/dod_headiconmanager.h
new file mode 100644
index 0000000..629ad33
--- /dev/null
+++ b/game/client/dod/dod_headiconmanager.h
@@ -0,0 +1,45 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//===========================================================================//
+
+#ifndef DOD_HEADICONMANAGER_H
+#define DOD_HEADICONMANAGER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "bitvec.h"
+
+class IMaterial;
+
+class CHeadIconManager : CAutoGameSystem
+{
+public:
+ CHeadIconManager();
+ ~CHeadIconManager();
+
+ virtual bool Init();
+ virtual void Shutdown();
+
+public:
+ // Call from the HUD_CreateEntities function so it can add sprites above player heads.
+ void DrawHeadIcons();
+
+ // Call from player render calls to indicate a head icon should be drawn for this player this frame
+ void PlayerDrawn( C_BasePlayer *pPlayer );
+
+private:
+ IMaterial *m_pAlliesIconMaterial; // For labels above players' heads.
+ IMaterial *m_pAxisIconMaterial; // For labels above players' heads.
+ CBitVec<MAX_PLAYERS> m_PlayerDrawn; // Was the player drawn this frame?
+};
+
+
+// Get the (global) head icon manager.
+CHeadIconManager* HeadIconManager();
+
+
+#endif // DOD_HEADICONMANAGER_H