Counter Strike : Global Offensive Source Code
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.

71 lines
1.9 KiB

  1. //--------------------------------------------------------------------------------------------------------
  2. // Copyright 2007 Turtle Rock Studios, Inc.
  3. #ifndef ENV_TONEMAP_CONTROLLER_H
  4. #define ENV_TONEMAP_CONTROLLER_H
  5. #include "triggers.h"
  6. //--------------------------------------------------------------------------------------------------------
  7. class CTonemapTrigger : public CBaseTrigger
  8. {
  9. public:
  10. DECLARE_CLASS( CTonemapTrigger, CBaseTrigger );
  11. DECLARE_DATADESC();
  12. virtual void Spawn( void );
  13. virtual void StartTouch( CBaseEntity *other );
  14. virtual void EndTouch( CBaseEntity *other );
  15. CBaseEntity *GetTonemapController( void ) const;
  16. private:
  17. string_t m_tonemapControllerName;
  18. EHANDLE m_hTonemapController;
  19. };
  20. //--------------------------------------------------------------------------------------------------------
  21. inline CBaseEntity *CTonemapTrigger::GetTonemapController( void ) const
  22. {
  23. return m_hTonemapController.Get();
  24. }
  25. //--------------------------------------------------------------------------------------------------------
  26. // Tonemap Controller System.
  27. class CTonemapSystem : public CAutoGameSystem
  28. {
  29. public:
  30. // Creation/Init.
  31. CTonemapSystem( char const *name ) : CAutoGameSystem( name )
  32. {
  33. m_hMasterController = NULL;
  34. }
  35. ~CTonemapSystem()
  36. {
  37. m_hMasterController = NULL;
  38. }
  39. virtual void LevelInitPreEntity();
  40. virtual void LevelInitPostEntity();
  41. CBaseEntity *GetMasterTonemapController( void ) const;
  42. private:
  43. EHANDLE m_hMasterController;
  44. };
  45. //--------------------------------------------------------------------------------------------------------
  46. inline CBaseEntity *CTonemapSystem::GetMasterTonemapController( void ) const
  47. {
  48. return m_hMasterController.Get();
  49. }
  50. //--------------------------------------------------------------------------------------------------------
  51. CTonemapSystem *TheTonemapSystem( void );
  52. #endif //ENV_TONEMAP_CONTROLLER_H