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.

180 lines
6.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef CDLL_CLIENT_INT_H
  8. #define CDLL_CLIENT_INT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "iclientnetworkable.h"
  13. #include "utllinkedlist.h"
  14. #include "cdll_int.h"
  15. #include "eiface.h"
  16. class IVModelRender;
  17. class IVEngineClient;
  18. class IVModelRender;
  19. class IVEfx;
  20. class IVRenderView;
  21. class IVDebugOverlay;
  22. class IMaterialSystem;
  23. class IMaterialSystemStub;
  24. class IDataCache;
  25. class IMDLCache;
  26. class IVModelInfoClient;
  27. class IEngineVGui;
  28. class ISpatialPartition;
  29. class IBaseClientDLL;
  30. class ISpatialPartition;
  31. class IFileSystem;
  32. class IStaticPropMgrClient;
  33. class IShadowMgr;
  34. class IEngineSound;
  35. class IMatSystemSurface;
  36. class IMaterialSystemHardwareConfig;
  37. class ISharedGameRules;
  38. class IEngineTrace;
  39. class IGameUIFuncs;
  40. class IGameEventManager2;
  41. class IPhysicsGameTrace;
  42. class CGlobalVarsBase;
  43. class IClientTools;
  44. class C_BaseAnimating;
  45. class IColorCorrectionSystem;
  46. class IInputSystem;
  47. class ISceneFileCache;
  48. class IXboxSystem; // Xbox 360 only
  49. class IMatchmaking;
  50. class IVideoServices;
  51. class CSteamAPIContext;
  52. class IClientReplayContext;
  53. class IReplayManager;
  54. class IEngineReplay;
  55. class IEngineClientReplay;
  56. class IReplayScreenshotManager;
  57. class CSteamID;
  58. //=============================================================================
  59. // HPE_BEGIN
  60. // [dwenger] Necessary for stats display
  61. //=============================================================================
  62. class AchievementsAndStatsInterface;
  63. //=============================================================================
  64. // HPE_END
  65. //=============================================================================
  66. extern IVModelRender *modelrender;
  67. extern IVEngineClient *engine;
  68. extern IVModelRender *modelrender;
  69. extern IVEfx *effects;
  70. extern IVRenderView *render;
  71. extern IVDebugOverlay *debugoverlay;
  72. extern IMaterialSystem *materials;
  73. extern IMaterialSystemStub *materials_stub;
  74. extern IMaterialSystemHardwareConfig *g_pMaterialSystemHardwareConfig;
  75. extern IDataCache *datacache;
  76. extern IMDLCache *mdlcache;
  77. extern IVModelInfoClient *modelinfo;
  78. extern IEngineVGui *enginevgui;
  79. extern ISpatialPartition* partition;
  80. extern IBaseClientDLL *clientdll;
  81. extern IFileSystem *filesystem;
  82. extern IStaticPropMgrClient *staticpropmgr;
  83. extern IShadowMgr *shadowmgr;
  84. extern IEngineSound *enginesound;
  85. extern IMatSystemSurface *g_pMatSystemSurface;
  86. extern IEngineTrace *enginetrace;
  87. extern IGameUIFuncs *gameuifuncs;
  88. extern IGameEventManager2 *gameeventmanager;
  89. extern IPhysicsGameTrace *physgametrace;
  90. extern CGlobalVarsBase *gpGlobals;
  91. extern IClientTools *clienttools;
  92. extern IInputSystem *inputsystem;
  93. extern ISceneFileCache *scenefilecache;
  94. extern IXboxSystem *xboxsystem; // Xbox 360 only
  95. extern IMatchmaking *matchmaking;
  96. extern IVideoServices *g_pVideo;
  97. extern IUploadGameStats *gamestatsuploader;
  98. extern CSteamAPIContext *steamapicontext;
  99. extern IReplaySystem *g_pReplay;
  100. extern IClientReplayContext *g_pClientReplayContext;
  101. extern IReplayManager *g_pReplayManager;
  102. extern IReplayScreenshotManager *g_pReplayScreenshotManager;
  103. extern IEngineReplay *g_pEngineReplay;
  104. extern IEngineClientReplay *g_pEngineClientReplay;
  105. //=============================================================================
  106. // HPE_BEGIN
  107. // [dwenger] Necessary for stats display
  108. //=============================================================================
  109. extern AchievementsAndStatsInterface* g_pAchievementsAndStatsInterface;
  110. //=============================================================================
  111. // HPE_END
  112. //=============================================================================
  113. // Set to true between LevelInit and LevelShutdown.
  114. extern bool g_bLevelInitialized;
  115. extern bool g_bTextMode;
  116. // Kyle says: this is here to obsfucate our accessing of the g_bTextMode variable and for no other purpose.
  117. // See the mess of TF_ANTI_IDLEBOT_VERIFICATION code. If that code doesn't exist anymore, this
  118. // probably also doesn't need to exist anymore.
  119. //
  120. // On a suggestion from Joe, we also point it to an incomplete type.
  121. extern class IClientPurchaseInterfaceV2 *g_pClientPurchaseInterface;
  122. // Returns true if a new OnDataChanged event is registered for this frame.
  123. bool AddDataChangeEvent( IClientNetworkable *ent, DataUpdateType_t updateType, int *pStoredEvent );
  124. void ClearDataChangedEvent( int iStoredEvent );
  125. //-----------------------------------------------------------------------------
  126. // Precaches a material
  127. //-----------------------------------------------------------------------------
  128. void PrecacheMaterial( const char *pMaterialName );
  129. //-----------------------------------------------------------------------------
  130. // Converts a previously precached material into an index
  131. //-----------------------------------------------------------------------------
  132. int GetMaterialIndex( const char *pMaterialName );
  133. //-----------------------------------------------------------------------------
  134. // Converts precached material indices into strings
  135. //-----------------------------------------------------------------------------
  136. const char *GetMaterialNameFromIndex( int nIndex );
  137. //-----------------------------------------------------------------------------
  138. // Precache-related methods for particle systems
  139. //-----------------------------------------------------------------------------
  140. void PrecacheParticleSystem( const char *pParticleSystemName );
  141. int GetParticleSystemIndex( const char *pParticleSystemName );
  142. const char *GetParticleSystemNameFromIndex( int nIndex );
  143. //-----------------------------------------------------------------------------
  144. // Called during bone setup to test perf
  145. //-----------------------------------------------------------------------------
  146. void TrackBoneSetupEnt( C_BaseAnimating *pEnt );
  147. bool IsEngineThreaded();
  148. #ifndef NO_STEAM
  149. /// Returns Steam ID, given player index. Returns an invalid SteamID upon
  150. /// failure
  151. extern CSteamID GetSteamIDForPlayerIndex( int iPlayerIndex );
  152. #endif
  153. #endif // CDLL_CLIENT_INT_H