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.

108 lines
2.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Expose functions from sys_dll.cpp.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef SYS_DLL_H
  8. #define SYS_DLL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "interface.h"
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. class IHammer;
  17. class IDataCache;
  18. class IPhysics;
  19. class IMDLCache;
  20. class IMatSystemSurface;
  21. class IAvi;
  22. class IBik;
  23. class IInputSystem;
  24. class IDedicatedExports;
  25. class ISoundEmitterSystemBase;
  26. typedef unsigned short AVIHandle_t;
  27. //-----------------------------------------------------------------------------
  28. // Class factories
  29. //-----------------------------------------------------------------------------
  30. // This factory gets to many of the major app-single systems,
  31. // including the material system, vgui, vgui surface, the file system.
  32. extern CreateInterfaceFn g_AppSystemFactory;
  33. // this factory connect the AppSystemFactory + client.dll + gameui.dll
  34. extern CreateInterfaceFn g_GameSystemFactory;
  35. //-----------------------------------------------------------------------------
  36. // Singleton interfaces
  37. //-----------------------------------------------------------------------------
  38. extern IHammer *g_pHammer;
  39. extern IPhysics *g_pPhysics;
  40. extern IAvi *avi;
  41. extern IBik *bik;
  42. #ifdef _PS3
  43. extern class IPS3SaveRestoreToUI *ps3saveuiapi;
  44. #endif
  45. extern IDedicatedExports *dedicated;
  46. //-----------------------------------------------------------------------------
  47. // Other singletons
  48. //-----------------------------------------------------------------------------
  49. extern AVIHandle_t g_hCurrentAVI;
  50. inline bool InEditMode()
  51. {
  52. return g_pHammer != NULL;
  53. }
  54. struct modinfo_t
  55. {
  56. char szInfo[ 256 ];
  57. char szDL [ 256 ];
  58. char szHLVersion[ 32 ];
  59. int version;
  60. int size;
  61. bool svonly;
  62. bool cldll;
  63. };
  64. extern modinfo_t gmodinfo;
  65. void LoadEntityDLLs( const char *szBaseDir, bool bServerOnly );
  66. void UnloadEntityDLLs( void );
  67. // This returns true if someone called Error() or Sys_Error() and we're exiting.
  68. // Since we call exit() from inside those, some destructors need to be safe and not crash.
  69. bool IsInErrorExit();
  70. // error message
  71. bool Sys_MessageBox(const char *title, const char *info, bool bShowOkAndCancel);
  72. bool ServerDLL_Load( bool bServerOnly );
  73. void ServerDLL_Unload();
  74. extern CreateInterfaceFn g_ServerFactory;
  75. const char *Sys_GetVersionString();
  76. const char *Sys_GetProductString();
  77. // SysDlls 3 loading and unloading entry points
  78. bool SysDll3_Load();
  79. void SysDll3_Unload();
  80. DECLARE_LOGGING_CHANNEL( LOG_SERVER_LOG );
  81. #endif