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/train.cpp | |
| 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/train.cpp')
| -rw-r--r-- | mp/src/game/client/train.cpp | 226 |
1 files changed, 113 insertions, 113 deletions
diff --git a/mp/src/game/client/train.cpp b/mp/src/game/client/train.cpp index cae29a01..9e928e84 100644 --- a/mp/src/game/client/train.cpp +++ b/mp/src/game/client/train.cpp @@ -1,113 +1,113 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-//
-// Train.cpp
-//
-// implementation of CHudAmmo class
-//
-#include "cbase.h"
-#include "hudelement.h"
-#include "hud_macros.h"
-#include "iclientmode.h"
-#include <vgui_controls/Controls.h>
-#include <vgui_controls/Panel.h>
-#include <vgui/ISurface.h>
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-using namespace vgui;
-
-class CHudTrain: public CHudElement, public vgui::Panel
-{
- DECLARE_CLASS_SIMPLE( CHudTrain, vgui::Panel );
-public:
- CHudTrain( const char *pElementName );
- void Init( void );
- void VidInit( void );
- bool ShouldDraw( void );
- virtual void ApplySchemeSettings( vgui::IScheme *scheme );
- virtual void Paint( void );
- void MsgFunc_Train(bf_read &msg);
-
-private:
- int m_iPos;
-
-};
-
-//
-//-----------------------------------------------------
-//
-
-DECLARE_HUDELEMENT( CHudTrain );
-DECLARE_HUD_MESSAGE( CHudTrain, Train )
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-CHudTrain::CHudTrain( const char *pElementName ) :
- CHudElement( pElementName ), BaseClass( NULL, "HudTrain" )
-{
- vgui::Panel *pParent = g_pClientMode->GetViewport();
- SetParent( pParent );
-
- SetHiddenBits( HIDEHUD_MISCSTATUS );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-// Input : *scheme -
-//-----------------------------------------------------------------------------
-void CHudTrain::ApplySchemeSettings( IScheme *scheme )
-{
- BaseClass::ApplySchemeSettings( scheme );
-
- SetPaintBackgroundEnabled( false );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void CHudTrain::Init(void)
-{
- HOOK_HUD_MESSAGE( CHudTrain, Train );
-
- m_iPos = 0;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void CHudTrain::VidInit(void)
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-bool CHudTrain::ShouldDraw( void )
-{
- return ( CHudElement::ShouldDraw() && m_iPos );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void CHudTrain::Paint()
-{
- // FIXME: Rewrite using vgui materials if we still do this type of train UI!!!
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void CHudTrain::MsgFunc_Train( bf_read &msg )
-{
- // update Train data
- m_iPos = msg.ReadByte();
-}
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// +// Train.cpp +// +// implementation of CHudAmmo class +// +#include "cbase.h" +#include "hudelement.h" +#include "hud_macros.h" +#include "iclientmode.h" +#include <vgui_controls/Controls.h> +#include <vgui_controls/Panel.h> +#include <vgui/ISurface.h> + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +using namespace vgui; + +class CHudTrain: public CHudElement, public vgui::Panel +{ + DECLARE_CLASS_SIMPLE( CHudTrain, vgui::Panel ); +public: + CHudTrain( const char *pElementName ); + void Init( void ); + void VidInit( void ); + bool ShouldDraw( void ); + virtual void ApplySchemeSettings( vgui::IScheme *scheme ); + virtual void Paint( void ); + void MsgFunc_Train(bf_read &msg); + +private: + int m_iPos; + +}; + +// +//----------------------------------------------------- +// + +DECLARE_HUDELEMENT( CHudTrain ); +DECLARE_HUD_MESSAGE( CHudTrain, Train ) + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +CHudTrain::CHudTrain( const char *pElementName ) : + CHudElement( pElementName ), BaseClass( NULL, "HudTrain" ) +{ + vgui::Panel *pParent = g_pClientMode->GetViewport(); + SetParent( pParent ); + + SetHiddenBits( HIDEHUD_MISCSTATUS ); +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *scheme - +//----------------------------------------------------------------------------- +void CHudTrain::ApplySchemeSettings( IScheme *scheme ) +{ + BaseClass::ApplySchemeSettings( scheme ); + + SetPaintBackgroundEnabled( false ); +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CHudTrain::Init(void) +{ + HOOK_HUD_MESSAGE( CHudTrain, Train ); + + m_iPos = 0; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CHudTrain::VidInit(void) +{ +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +bool CHudTrain::ShouldDraw( void ) +{ + return ( CHudElement::ShouldDraw() && m_iPos ); +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CHudTrain::Paint() +{ + // FIXME: Rewrite using vgui materials if we still do this type of train UI!!! +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CHudTrain::MsgFunc_Train( bf_read &msg ) +{ + // update Train data + m_iPos = msg.ReadByte(); +} |