From f56bb35301836e56582a575a75864392a0177875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 2 Dec 2013 19:31:46 -0800 Subject: Fix line endings. WHAMMY. --- .../game/client/hl2mp/clientmode_hl2mpnormal.cpp | 256 ++++++++++----------- 1 file changed, 128 insertions(+), 128 deletions(-) (limited to 'mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp') diff --git a/mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp b/mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp index 6c784781..35bfd1c1 100644 --- a/mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp +++ b/mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp @@ -1,128 +1,128 @@ -//========= Copyright Valve Corporation, All rights reserved. ============// -// -// Purpose: Draws the normal TF2 or HL2 HUD. -// -// $Workfile: $ -// $Date: $ -// $NoKeywords: $ -//=============================================================================// -#include "cbase.h" -#include "clientmode_hl2mpnormal.h" -#include "vgui_int.h" -#include "hud.h" -#include -#include -#include -#include -#include "iinput.h" -#include "hl2mpclientscoreboard.h" -#include "hl2mptextwindow.h" -#include "ienginevgui.h" - -// memdbgon must be the last include file in a .cpp file!!! -#include "tier0/memdbgon.h" -//----------------------------------------------------------------------------- -// Globals -//----------------------------------------------------------------------------- -vgui::HScheme g_hVGuiCombineScheme = 0; - - -// Instance the singleton and expose the interface to it. -IClientMode *GetClientModeNormal() -{ - static ClientModeHL2MPNormal g_ClientModeNormal; - return &g_ClientModeNormal; -} - -ClientModeHL2MPNormal* GetClientModeHL2MPNormal() -{ - Assert( dynamic_cast< ClientModeHL2MPNormal* >( GetClientModeNormal() ) ); - - return static_cast< ClientModeHL2MPNormal* >( GetClientModeNormal() ); -} - -//----------------------------------------------------------------------------- -// Purpose: this is the viewport that contains all the hud elements -//----------------------------------------------------------------------------- -class CHudViewport : public CBaseViewport -{ -private: - DECLARE_CLASS_SIMPLE( CHudViewport, CBaseViewport ); - -protected: - virtual void ApplySchemeSettings( vgui::IScheme *pScheme ) - { - BaseClass::ApplySchemeSettings( pScheme ); - - gHUD.InitColors( pScheme ); - - SetPaintBackgroundEnabled( false ); - } - - virtual IViewPortPanel *CreatePanelByName( const char *szPanelName ); -}; - -int ClientModeHL2MPNormal::GetDeathMessageStartHeight( void ) -{ - return m_pViewport->GetDeathMessageStartHeight(); -} - -IViewPortPanel* CHudViewport::CreatePanelByName( const char *szPanelName ) -{ - IViewPortPanel* newpanel = NULL; - - if ( Q_strcmp( PANEL_SCOREBOARD, szPanelName) == 0 ) - { - newpanel = new CHL2MPClientScoreBoardDialog( this ); - return newpanel; - } - else if ( Q_strcmp(PANEL_INFO, szPanelName) == 0 ) - { - newpanel = new CHL2MPTextWindow( this ); - return newpanel; - } - else if ( Q_strcmp(PANEL_SPECGUI, szPanelName) == 0 ) - { - newpanel = new CHL2MPSpectatorGUI( this ); - return newpanel; - } - - - return BaseClass::CreatePanelByName( szPanelName ); -} - -//----------------------------------------------------------------------------- -// ClientModeHLNormal implementation -//----------------------------------------------------------------------------- -ClientModeHL2MPNormal::ClientModeHL2MPNormal() -{ - m_pViewport = new CHudViewport(); - m_pViewport->Start( gameuifuncs, gameeventmanager ); -} - - -//----------------------------------------------------------------------------- -// Purpose: -//----------------------------------------------------------------------------- -ClientModeHL2MPNormal::~ClientModeHL2MPNormal() -{ -} - - -//----------------------------------------------------------------------------- -// Purpose: -//----------------------------------------------------------------------------- -void ClientModeHL2MPNormal::Init() -{ - BaseClass::Init(); - - // Load up the combine control panel scheme - g_hVGuiCombineScheme = vgui::scheme()->LoadSchemeFromFileEx( enginevgui->GetPanel( PANEL_CLIENTDLL ), "resource/CombinePanelScheme.res", "CombineScheme" ); - if (!g_hVGuiCombineScheme) - { - Warning( "Couldn't load combine panel scheme!\n" ); - } -} - - - +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Draws the normal TF2 or HL2 HUD. +// +// $Workfile: $ +// $Date: $ +// $NoKeywords: $ +//=============================================================================// +#include "cbase.h" +#include "clientmode_hl2mpnormal.h" +#include "vgui_int.h" +#include "hud.h" +#include +#include +#include +#include +#include "iinput.h" +#include "hl2mpclientscoreboard.h" +#include "hl2mptextwindow.h" +#include "ienginevgui.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" +//----------------------------------------------------------------------------- +// Globals +//----------------------------------------------------------------------------- +vgui::HScheme g_hVGuiCombineScheme = 0; + + +// Instance the singleton and expose the interface to it. +IClientMode *GetClientModeNormal() +{ + static ClientModeHL2MPNormal g_ClientModeNormal; + return &g_ClientModeNormal; +} + +ClientModeHL2MPNormal* GetClientModeHL2MPNormal() +{ + Assert( dynamic_cast< ClientModeHL2MPNormal* >( GetClientModeNormal() ) ); + + return static_cast< ClientModeHL2MPNormal* >( GetClientModeNormal() ); +} + +//----------------------------------------------------------------------------- +// Purpose: this is the viewport that contains all the hud elements +//----------------------------------------------------------------------------- +class CHudViewport : public CBaseViewport +{ +private: + DECLARE_CLASS_SIMPLE( CHudViewport, CBaseViewport ); + +protected: + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ) + { + BaseClass::ApplySchemeSettings( pScheme ); + + gHUD.InitColors( pScheme ); + + SetPaintBackgroundEnabled( false ); + } + + virtual IViewPortPanel *CreatePanelByName( const char *szPanelName ); +}; + +int ClientModeHL2MPNormal::GetDeathMessageStartHeight( void ) +{ + return m_pViewport->GetDeathMessageStartHeight(); +} + +IViewPortPanel* CHudViewport::CreatePanelByName( const char *szPanelName ) +{ + IViewPortPanel* newpanel = NULL; + + if ( Q_strcmp( PANEL_SCOREBOARD, szPanelName) == 0 ) + { + newpanel = new CHL2MPClientScoreBoardDialog( this ); + return newpanel; + } + else if ( Q_strcmp(PANEL_INFO, szPanelName) == 0 ) + { + newpanel = new CHL2MPTextWindow( this ); + return newpanel; + } + else if ( Q_strcmp(PANEL_SPECGUI, szPanelName) == 0 ) + { + newpanel = new CHL2MPSpectatorGUI( this ); + return newpanel; + } + + + return BaseClass::CreatePanelByName( szPanelName ); +} + +//----------------------------------------------------------------------------- +// ClientModeHLNormal implementation +//----------------------------------------------------------------------------- +ClientModeHL2MPNormal::ClientModeHL2MPNormal() +{ + m_pViewport = new CHudViewport(); + m_pViewport->Start( gameuifuncs, gameeventmanager ); +} + + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +ClientModeHL2MPNormal::~ClientModeHL2MPNormal() +{ +} + + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void ClientModeHL2MPNormal::Init() +{ + BaseClass::Init(); + + // Load up the combine control panel scheme + g_hVGuiCombineScheme = vgui::scheme()->LoadSchemeFromFileEx( enginevgui->GetPanel( PANEL_CLIENTDLL ), "resource/CombinePanelScheme.res", "CombineScheme" ); + if (!g_hVGuiCombineScheme) + { + Warning( "Couldn't load combine panel scheme!\n" ); + } +} + + + -- cgit v1.2.3