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