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.

67 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #if !defined( IEFX_H )
  9. #define IEFX_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "interface.h"
  14. #include "mathlib/vector.h"
  15. struct model_t;
  16. struct dlight_t;
  17. class IMaterial;
  18. #define MAX_DLIGHTS 32
  19. //-----------------------------------------------------------------------------
  20. // Purpose: Exposes effects api to client .dll
  21. //-----------------------------------------------------------------------------
  22. abstract_class IVEfx
  23. {
  24. public:
  25. // Retrieve decal texture index from decal by name
  26. virtual int Draw_DecalIndexFromName ( char *name ) = 0;
  27. // Apply decal
  28. virtual void DecalShoot ( int textureIndex, int entity,
  29. const model_t *model, const Vector& model_origin, const QAngle& model_angles,
  30. const Vector& position, const Vector *saxis, int flags ) = 0;
  31. // Apply colored decal
  32. virtual void DecalColorShoot ( int textureIndex, int entity,
  33. const model_t *model, const Vector& model_origin, const QAngle& model_angles,
  34. const Vector& position, const Vector *saxis, int flags, const color32 &rgbaColor ) = 0;
  35. virtual void PlayerDecalShoot( IMaterial *material, void *userdata, int entity, const model_t *model,
  36. const Vector& model_origin, const QAngle& model_angles,
  37. const Vector& position, const Vector *saxis, int flags, const color32 &rgbaColor ) = 0;
  38. // Allocate a dynamic world light ( key is the entity to whom it is associated )
  39. virtual dlight_t *CL_AllocDlight ( int key ) = 0;
  40. // Allocate a dynamic entity light ( key is the entity to whom it is associated )
  41. virtual dlight_t *CL_AllocElight ( int key ) = 0;
  42. // Get a list of the currently-active dynamic lights.
  43. virtual int CL_GetActiveDLights( dlight_t *pList[MAX_DLIGHTS] ) = 0;
  44. // Retrieve decal texture name from decal by index
  45. virtual const char *Draw_DecalNameFromIndex( int nIndex ) = 0;
  46. // Given an elight key, find it. Does not search ordinary dlights. May return NULL.
  47. virtual dlight_t *GetElightByKey( int key ) = 0;
  48. };
  49. #define VENGINE_EFFECTS_INTERFACE_VERSION "VEngineEffects001"
  50. extern IVEfx *effects;
  51. #endif // IEFX_H