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.

77 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #include "cbase.h"
  9. #include "ivmodemanager.h"
  10. #include "clientmode_hlnormal.h"
  11. #include "panelmetaclassmgr.h"
  12. // memdbgon must be the last include file in a .cpp file!!!
  13. #include "tier0/memdbgon.h"
  14. // default FOV for HL2
  15. ConVar default_fov( "default_fov", "75", FCVAR_CHEAT );
  16. // The current client mode. Always ClientModeNormal in HL.
  17. IClientMode *g_pClientMode = NULL;
  18. #define SCREEN_FILE "scripts/vgui_screens.txt"
  19. class CHLModeManager : public IVModeManager
  20. {
  21. public:
  22. CHLModeManager( void );
  23. virtual ~CHLModeManager( void );
  24. virtual void Init( void );
  25. virtual void SwitchMode( bool commander, bool force );
  26. virtual void OverrideView( CViewSetup *pSetup );
  27. virtual void CreateMove( float flInputSampleTime, CUserCmd *cmd );
  28. virtual void LevelInit( const char *newmap );
  29. virtual void LevelShutdown( void );
  30. };
  31. CHLModeManager::CHLModeManager( void )
  32. {
  33. }
  34. CHLModeManager::~CHLModeManager( void )
  35. {
  36. }
  37. void CHLModeManager::Init( void )
  38. {
  39. g_pClientMode = GetClientModeNormal();
  40. PanelMetaClassMgr()->LoadMetaClassDefinitionFile( SCREEN_FILE );
  41. }
  42. void CHLModeManager::SwitchMode( bool commander, bool force )
  43. {
  44. }
  45. void CHLModeManager::OverrideView( CViewSetup *pSetup )
  46. {
  47. }
  48. void CHLModeManager::CreateMove( float flInputSampleTime, CUserCmd *cmd )
  49. {
  50. }
  51. void CHLModeManager::LevelInit( const char *newmap )
  52. {
  53. g_pClientMode->LevelInit( newmap );
  54. }
  55. void CHLModeManager::LevelShutdown( void )
  56. {
  57. g_pClientMode->LevelShutdown();
  58. }
  59. static CHLModeManager g_HLModeManager;
  60. IVModeManager *modemanager = &g_HLModeManager;