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.

100 lines
3.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef TOOLFRAMEWORK_CLIENT_H
  7. #define TOOLFRAMEWORK_CLIENT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "toolframework/itoolentity.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. class KeyValues;
  16. struct AudioState_t;
  17. //-----------------------------------------------------------------------------
  18. // Posts a message to all tools
  19. //-----------------------------------------------------------------------------
  20. void ToolFramework_PostToolMessage( HTOOLHANDLE hEntity, KeyValues *msg );
  21. //-----------------------------------------------------------------------------
  22. // Should we render with a 3rd person camera?
  23. //-----------------------------------------------------------------------------
  24. bool ToolFramework_IsThirdPersonCamera( );
  25. //-----------------------------------------------------------------------------
  26. // Are tools enabled?
  27. //-----------------------------------------------------------------------------
  28. #ifndef NO_TOOLFRAMEWORK
  29. bool ToolsEnabled();
  30. #else
  31. #define ToolsEnabled() 0
  32. #endif
  33. //-----------------------------------------------------------------------------
  34. // View manipulation
  35. //-----------------------------------------------------------------------------
  36. void ToolFramework_AdjustEngineViewport( int& x, int& y, int& width, int& height );
  37. bool ToolFramework_SetupEngineView( Vector &origin, QAngle &angles, float &fov );
  38. bool ToolFramework_SetupAudioState( AudioState_t &audioState );
  39. //-----------------------------------------------------------------------------
  40. // material recording - primarily for proxy materials
  41. //-----------------------------------------------------------------------------
  42. void ToolFramework_RecordMaterialParams( IMaterial *pMaterial );
  43. //-----------------------------------------------------------------------------
  44. // Recorded temp entity structures
  45. //-----------------------------------------------------------------------------
  46. enum TERecordingType_t
  47. {
  48. TE_DYNAMIC_LIGHT = 0,
  49. TE_WORLD_DECAL,
  50. TE_DISPATCH_EFFECT,
  51. TE_MUZZLE_FLASH,
  52. TE_ARMOR_RICOCHET,
  53. TE_METAL_SPARKS,
  54. TE_SMOKE,
  55. TE_SPARKS,
  56. TE_BLOOD_SPRITE,
  57. TE_BREAK_MODEL,
  58. TE_GLOW_SPRITE,
  59. TE_PHYSICS_PROP,
  60. TE_SPRITE_SINGLE,
  61. TE_SPRITE_SPRAY,
  62. TE_CONCUSSIVE_EXPLOSION,
  63. TE_BLOOD_STREAM,
  64. TE_SHATTER_SURFACE,
  65. TE_DECAL,
  66. TE_PROJECT_DECAL,
  67. TE_EXPLOSION,
  68. TE_RECORDING_TYPE_COUNT,
  69. };
  70. //-----------------------------------------------------------------------------
  71. // Helper class to indicate ownership of effects
  72. //-----------------------------------------------------------------------------
  73. class CRecordEffectOwner
  74. {
  75. public:
  76. CRecordEffectOwner( C_BaseEntity *pEntity, bool bIsViewModel = false );
  77. ~CRecordEffectOwner();
  78. private:
  79. bool m_bToolsEnabled;
  80. };
  81. #endif // TOOLFRAMEWORK_CLIENT_H