public/mms_sample_ext/sm_sdk_config.h
author Asher Baker <asherkin@gmail.com>
Tue Aug 07 18:04:10 2012 +0100 (2012-08-07)
changeset 3600 8b38b6996600
parent 2042 4a2faafca477
permissions -rw-r--r--
Changed TFWeaponSlot enum description (r=me).
     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 
    32 #ifndef _INCLUDE_SOURCEMOD_CONFIG_H_
    33 #define _INCLUDE_SOURCEMOD_CONFIG_H_
    34 
    35 #include <stdio.h>
    36 
    37 /**
    38  * @brief Acquires the interfaces enabled at the bottom of this header.
    39  *
    40  * @param error			Buffer to store error message.
    41  * @param maxlength		Maximum size of the error buffer.
    42  * @return				True on success, false on failure.
    43  * 						On failure, a null-terminated string will be stored 
    44  * 						in the error buffer, if the buffer is non-NULL and 
    45  * 						greater than 0 bytes in size.
    46  */
    47 bool SM_AcquireInterfaces(char *error, size_t maxlength);
    48 
    49 /**
    50  * @brief Sets each acquired interface to NULL.
    51  */
    52 void SM_UnsetInterfaces();
    53 
    54 /** 
    55  * Enable interfaces you want to use here by uncommenting lines.
    56  * These interfaces are all part of SourceMod's core.
    57  */
    58 //#define SMEXT_ENABLE_FORWARDSYS
    59 //#define SMEXT_ENABLE_HANDLESYS
    60 //#define SMEXT_ENABLE_PLAYERHELPERS
    61 //#define SMEXT_ENABLE_DBMANAGER
    62 //#define SMEXT_ENABLE_GAMECONF
    63 //#define SMEXT_ENABLE_MEMUTILS
    64 //#define SMEXT_ENABLE_GAMEHELPERS
    65 //#define SMEXT_ENABLE_TIMERSYS
    66 //#define SMEXT_ENABLE_THREADER
    67 //#define SMEXT_ENABLE_LIBSYS
    68 //#define SMEXT_ENABLE_MENUS
    69 //#define SMEXT_ENABLE_ADTFACTORY
    70 //#define SMEXT_ENABLE_PLUGINSYS
    71 //#define SMEXT_ENABLE_ADMINSYS
    72 //#define SMEXT_ENABLE_TEXTPARSERS
    73 //#define SMEXT_ENABLE_TRANSLATOR
    74 
    75 
    76 /**
    77  * There is no need to edit below.
    78  */
    79 
    80 #include <IShareSys.h>
    81 #include <IExtensionSys.h>
    82 extern SourceMod::IExtension *myself;
    83 extern SourceMod::IExtensionManager *smexts;
    84 extern SourceMod::IShareSys *sharesys;
    85 
    86 #include <ISourceMod.h>
    87 extern SourceMod::ISourceMod *sm_main;
    88 
    89 #if defined SMEXT_ENABLE_FORWARDSYS
    90 #include <IForwardSys.h>
    91 extern SourceMod::IForwardManager *sm_forwards;
    92 #endif
    93 
    94 #if defined SMEXT_ENABLE_HANDLESYS
    95 #include <IHandleSys.h>
    96 extern SourceMod::IHandleSys *sm_handlesys;
    97 #endif
    98 
    99 #if defined SMEXT_ENABLE_PLAYERHELPERS
   100 #include <IPlayerHelpers.h>
   101 extern SourceMod::IPlayerManager *sm_players;
   102 #endif
   103 
   104 #if defined SMEXT_ENABLE_DBMANAGER
   105 #include <IDBDriver.h>
   106 extern SourceMod::IDBManager *sm_dbi;
   107 #endif 
   108 
   109 #if defined SMEXT_ENABLE_GAMECONF
   110 #include <IGameConfigs.h>
   111 extern SourceMod::IGameConfigManager *sm_gameconfs;
   112 #endif
   113 
   114 #if defined SMEXT_ENABLE_MEMUTILS
   115 #include <IMemoryUtils.h>
   116 extern SourceMod::IMemoryUtils *sm_memutils;
   117 #endif
   118 
   119 #if defined SMEXT_ENABLE_GAMEHELPERS
   120 #include <IGameHelpers.h>
   121 extern SourceMod::IGameHelpers *sm_gamehelpers;
   122 #endif
   123 
   124 #if defined SMEXT_ENABLE_TIMERSYS
   125 #include <ITimerSystem.h>
   126 extern SourceMod::ITimerSystem *sm_timersys;
   127 #endif
   128 
   129 #if defined SMEXT_ENABLE_THREADER
   130 #include <IThreader.h>
   131 extern SourceMod::IThreader *sm_threader;
   132 #endif
   133 
   134 #if defined SMEXT_ENABLE_LIBSYS
   135 #include <ILibrarySys.h>
   136 extern SourceMod::ILibrarySys *sm_libsys;
   137 #endif
   138 
   139 #if defined SMEXT_ENABLE_PLUGINSYS
   140 #include <IPluginSys.h>
   141 extern SourceMod::IPluginManager *sm_plsys;
   142 #endif 
   143 
   144 #if defined SMEXT_ENABLE_MENUS
   145 #include <IMenuManager.h>
   146 extern SourceMod::IMenuManager *sm_menus;
   147 #endif
   148 
   149 #if defined SMEXT_ENABLE_ADMINSYS
   150 #include <IAdminSystem.h>
   151 extern SourceMod::IAdminSystem *sm_adminsys;
   152 #endif
   153 
   154 #if defined SMEXT_ENABLE_TEXTPARSERS
   155 #include <ITextParsers.h>
   156 extern SourceMod::ITextParsers *sm_text;
   157 #endif
   158 
   159 #if defined SMEXT_ENABLE_TRANSLATOR
   160 #include <ITranslator.h>
   161 extern SourceMod::ITranslator *sm_translator;
   162 #endif
   163 
   164 #endif //_INCLUDE_SOURCEMOD_CONFIG_H_
   165