smsdk_config.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /**
  2. * vim: set ts=4 :
  3. * =============================================================================
  4. * SourceMod Extension Code for Metamod:Source
  5. * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
  6. * =============================================================================
  7. *
  8. * This program is free software; you can redistribute it and/or modify it under
  9. * the terms of the GNU General Public License, version 3.0, as published by the
  10. * Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but WITHOUT
  13. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  14. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  15. * details.
  16. *
  17. * You should have received a copy of the GNU General Public License along with
  18. * this program. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. * As a special exception, AlliedModders LLC gives you permission to link the
  21. * code of this program (as well as its derivative works) to "Half-Life 2," the
  22. * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
  23. * by the Valve Corporation. You must obey the GNU General Public License in
  24. * all respects for all other code used. Additionally, AlliedModders LLC grants
  25. * this exception to all derivative works. AlliedModders LLC defines further
  26. * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
  27. * or <http://www.sourcemod.net/license.php>.
  28. *
  29. * Version: $Id$
  30. */
  31. #ifndef _INCLUDE_SOURCEMOD_CONFIG_H_
  32. #define _INCLUDE_SOURCEMOD_CONFIG_H_
  33. #include <stdio.h>
  34. /**
  35. * @brief Acquires the interfaces enabled at the bottom of this header.
  36. *
  37. * @param error Buffer to store error message.
  38. * @param maxlength Maximum size of the error buffer.
  39. * @return True on success, false on failure.
  40. * On failure, a null-terminated string will be stored
  41. * in the error buffer, if the buffer is non-NULL and
  42. * greater than 0 bytes in size.
  43. */
  44. bool SM_AcquireInterfaces(char *error, size_t maxlength);
  45. /**
  46. * @brief Sets each acquired interface to NULL.
  47. */
  48. void SM_UnsetInterfaces();
  49. /**
  50. * Enable interfaces you want to use here by uncommenting lines.
  51. * These interfaces are all part of SourceMod's core.
  52. */
  53. //#define SMEXT_ENABLE_FORWARDSYS
  54. //#define SMEXT_ENABLE_HANDLESYS
  55. //#define SMEXT_ENABLE_PLAYERHELPERS
  56. //#define SMEXT_ENABLE_DBMANAGER
  57. //#define SMEXT_ENABLE_GAMECONF
  58. #define SMEXT_ENABLE_MEMUTILS
  59. //#define SMEXT_ENABLE_GAMEHELPERS
  60. //#define SMEXT_ENABLE_TIMERSYS
  61. //#define SMEXT_ENABLE_THREADER
  62. //#define SMEXT_ENABLE_LIBSYS
  63. //#define SMEXT_ENABLE_MENUS
  64. //#define SMEXT_ENABLE_ADTFACTORY
  65. //#define SMEXT_ENABLE_PLUGINSYS
  66. //#define SMEXT_ENABLE_ADMINSYS
  67. //#define SMEXT_ENABLE_TEXTPARSERS
  68. //#define SMEXT_ENABLE_TRANSLATOR
  69. /**
  70. * There is no need to edit below.
  71. */
  72. #include <IShareSys.h>
  73. #include <IExtensionSys.h>
  74. extern SourceMod::IExtension *myself;
  75. extern SourceMod::IExtensionManager *smexts;
  76. extern SourceMod::IShareSys *sharesys;
  77. #include <ISourceMod.h>
  78. extern SourceMod::ISourceMod *sm_main;
  79. #if defined SMEXT_ENABLE_FORWARDSYS
  80. #include <IForwardSys.h>
  81. extern SourceMod::IForwardManager *sm_forwards;
  82. #endif
  83. #if defined SMEXT_ENABLE_HANDLESYS
  84. #include <IHandleSys.h>
  85. extern SourceMod::IHandleSys *sm_handlesys;
  86. #endif
  87. #if defined SMEXT_ENABLE_PLAYERHELPERS
  88. #include <IPlayerHelpers.h>
  89. extern SourceMod::IPlayerManager *sm_players;
  90. #endif
  91. #if defined SMEXT_ENABLE_DBMANAGER
  92. #include <IDBDriver.h>
  93. extern SourceMod::IDBManager *sm_dbi;
  94. #endif
  95. #if defined SMEXT_ENABLE_GAMECONF
  96. #include <IGameConfigs.h>
  97. extern SourceMod::IGameConfigManager *sm_gameconfs;
  98. #endif
  99. #if defined SMEXT_ENABLE_MEMUTILS
  100. #include <IMemoryUtils.h>
  101. extern SourceMod::IMemoryUtils *sm_memutils;
  102. #endif
  103. #if defined SMEXT_ENABLE_GAMEHELPERS
  104. #include <IGameHelpers.h>
  105. extern SourceMod::IGameHelpers *sm_gamehelpers;
  106. #endif
  107. #if defined SMEXT_ENABLE_TIMERSYS
  108. #include <ITimerSystem.h>
  109. extern SourceMod::ITimerSystem *sm_timersys;
  110. #endif
  111. #if defined SMEXT_ENABLE_THREADER
  112. #include <IThreader.h>
  113. extern SourceMod::IThreader *sm_threader;
  114. #endif
  115. #if defined SMEXT_ENABLE_LIBSYS
  116. #include <ILibrarySys.h>
  117. extern SourceMod::ILibrarySys *sm_libsys;
  118. #endif
  119. #if defined SMEXT_ENABLE_PLUGINSYS
  120. #include <IPluginSys.h>
  121. extern SourceMod::IPluginManager *sm_plsys;
  122. #endif
  123. #if defined SMEXT_ENABLE_MENUS
  124. #include <IMenuManager.h>
  125. extern SourceMod::IMenuManager *sm_menus;
  126. #endif
  127. #if defined SMEXT_ENABLE_ADMINSYS
  128. #include <IAdminSystem.h>
  129. extern SourceMod::IAdminSystem *sm_adminsys;
  130. #endif
  131. #if defined SMEXT_ENABLE_TEXTPARSERS
  132. #include <ITextParsers.h>
  133. extern SourceMod::ITextParsers *sm_text;
  134. #endif
  135. #if defined SMEXT_ENABLE_TRANSLATOR
  136. #include <ITranslator.h>
  137. extern SourceMod::ITranslator *sm_translator;
  138. #endif
  139. #endif //_INCLUDE_SOURCEMOD_CONFIG_H_