diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/client/TeamBitmapImage.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/client/TeamBitmapImage.h')
| -rw-r--r-- | mp/src/game/client/TeamBitmapImage.h | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/mp/src/game/client/TeamBitmapImage.h b/mp/src/game/client/TeamBitmapImage.h index ddc5322c..5039698d 100644 --- a/mp/src/game/client/TeamBitmapImage.h +++ b/mp/src/game/client/TeamBitmapImage.h @@ -1,80 +1,80 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: This is a panel which is rendered image on top of an entity
-//
-// $Revision: $
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef TEAMBITMAPIMAGE_H
-#define TEAMBITMAPIMAGE_H
-
-#ifdef _WIN32
-#pragma once
-#endif
-
-//#include "tf_shareddefs.h"
-
-#include <vgui/VGUI.h>
-
-namespace vgui
-{
- class Panel;
-}
-
-class BitmapImage;
-class C_BaseEntity;
-class KeyValues;
-
-//-----------------------------------------------------------------------------
-// A multiplexer bitmap that chooses a bitmap based on team
-//-----------------------------------------------------------------------------
-class CTeamBitmapImage
-{
-public:
- // construction, destruction
- CTeamBitmapImage();
- ~CTeamBitmapImage();
-
- // initialization
- bool Init( vgui::Panel *pParent, KeyValues* pInitData, C_BaseEntity* pEntity );
-
- // Alpha override...
- void SetAlpha( float alpha );
-
- // Paint the sucka. Paint it the size of the parent panel
- void Paint( float yaw = 0.0f );
-
-protected:
- // Wrapper so we can implement this with EHANDLES some day
- C_BaseEntity *GetEntity() { return m_pEntity; }
-
-private:
- enum
- {
- // NOTE: Was MAX_TF_TEAMS not 4, but I don't like the dependency here.
- BITMAP_COUNT = 4 + 1
- };
-
- BitmapImage *m_ppImage[ BITMAP_COUNT ];
- C_BaseEntity *m_pEntity;
- float m_Alpha;
- bool m_bRelativeTeams;
-};
-
-
-//-----------------------------------------------------------------------------
-// Helper method to initialize a team image from KeyValues data..
-// KeyValues contains the bitmap data. pSectionName, if it exists,
-// indicates which subsection of pInitData should be looked at to get at the
-// image data. The final argument is the bitmap image to initialize.
-// The function returns true if it succeeded.
-//
-// NOTE: This function looks for the key values 'material' and 'color'
-// and uses them to set up the material + modulation color of the image
-//-----------------------------------------------------------------------------
-bool InitializeTeamImage( KeyValues *pInitData, const char* pSectionName,
- vgui::Panel *pParent, C_BaseEntity *pEntity, CTeamBitmapImage* pBitmapImage );
-
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: This is a panel which is rendered image on top of an entity +// +// $Revision: $ +// $NoKeywords: $ +//=============================================================================// + +#ifndef TEAMBITMAPIMAGE_H +#define TEAMBITMAPIMAGE_H + +#ifdef _WIN32 +#pragma once +#endif + +//#include "tf_shareddefs.h" + +#include <vgui/VGUI.h> + +namespace vgui +{ + class Panel; +} + +class BitmapImage; +class C_BaseEntity; +class KeyValues; + +//----------------------------------------------------------------------------- +// A multiplexer bitmap that chooses a bitmap based on team +//----------------------------------------------------------------------------- +class CTeamBitmapImage +{ +public: + // construction, destruction + CTeamBitmapImage(); + ~CTeamBitmapImage(); + + // initialization + bool Init( vgui::Panel *pParent, KeyValues* pInitData, C_BaseEntity* pEntity ); + + // Alpha override... + void SetAlpha( float alpha ); + + // Paint the sucka. Paint it the size of the parent panel + void Paint( float yaw = 0.0f ); + +protected: + // Wrapper so we can implement this with EHANDLES some day + C_BaseEntity *GetEntity() { return m_pEntity; } + +private: + enum + { + // NOTE: Was MAX_TF_TEAMS not 4, but I don't like the dependency here. + BITMAP_COUNT = 4 + 1 + }; + + BitmapImage *m_ppImage[ BITMAP_COUNT ]; + C_BaseEntity *m_pEntity; + float m_Alpha; + bool m_bRelativeTeams; +}; + + +//----------------------------------------------------------------------------- +// Helper method to initialize a team image from KeyValues data.. +// KeyValues contains the bitmap data. pSectionName, if it exists, +// indicates which subsection of pInitData should be looked at to get at the +// image data. The final argument is the bitmap image to initialize. +// The function returns true if it succeeded. +// +// NOTE: This function looks for the key values 'material' and 'color' +// and uses them to set up the material + modulation color of the image +//----------------------------------------------------------------------------- +bool InitializeTeamImage( KeyValues *pInitData, const char* pSectionName, + vgui::Panel *pParent, C_BaseEntity *pEntity, CTeamBitmapImage* pBitmapImage ); + + #endif // TEAMBITMAPIMAGE_H
\ No newline at end of file |