1.1 --- a/extensions/sdktools/extension.h Fri Jul 11 06:51:21 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,124 +0,0 @@
1.4 -/**
1.5 - * vim: set ts=4 :
1.6 - * =============================================================================
1.7 - * SourceMod SDKTools Extension
1.8 - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
1.9 - * =============================================================================
1.10 - *
1.11 - * This program is free software; you can redistribute it and/or modify it under
1.12 - * the terms of the GNU General Public License, version 3.0, as published by the
1.13 - * Free Software Foundation.
1.14 - *
1.15 - * This program is distributed in the hope that it will be useful, but WITHOUT
1.16 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.17 - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.18 - * details.
1.19 - *
1.20 - * You should have received a copy of the GNU General Public License along with
1.21 - * this program. If not, see <http://www.gnu.org/licenses/>.
1.22 - *
1.23 - * As a special exception, AlliedModders LLC gives you permission to link the
1.24 - * code of this program (as well as its derivative works) to "Half-Life 2," the
1.25 - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
1.26 - * by the Valve Corporation. You must obey the GNU General Public License in
1.27 - * all respects for all other code used. Additionally, AlliedModders LLC grants
1.28 - * this exception to all derivative works. AlliedModders LLC defines further
1.29 - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
1.30 - * or <http://www.sourcemod.net/license.php>.
1.31 - *
1.32 - * Version: $Id$
1.33 - */
1.34 -
1.35 -#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
1.36 -#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
1.37 -
1.38 -/**
1.39 - * @file extension.h
1.40 - * @brief SDK Tools extension code header.
1.41 - */
1.42 -
1.43 -#include "smsdk_ext.h"
1.44 -#include <IBinTools.h>
1.45 -#include <IPlayerHelpers.h>
1.46 -#include <IGameHelpers.h>
1.47 -#include <IEngineTrace.h>
1.48 -#include <IEngineSound.h>
1.49 -#include <ivoiceserver.h>
1.50 -#include <iplayerinfo.h>
1.51 -#include <server_class.h>
1.52 -#include <datamap.h>
1.53 -#include <convar.h>
1.54 -#include <iserver.h>
1.55 -#include <cdll_int.h>
1.56 -#include <compat_wrappers.h>
1.57 -
1.58 -/**
1.59 - * @brief Implementation of the SDK Tools extension.
1.60 - * Note: Uncomment one of the pre-defined virtual functions in order to use it.
1.61 - */
1.62 -class SDKTools :
1.63 - public SDKExtension,
1.64 - public IHandleTypeDispatch,
1.65 - public IConCommandBaseAccessor,
1.66 - public IClientListener,
1.67 - public ICommandTargetProcessor
1.68 -{
1.69 -public: //public IHandleTypeDispatch
1.70 - void OnHandleDestroy(HandleType_t type, void *object);
1.71 -public: //public SDKExtension
1.72 - virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
1.73 - virtual void SDK_OnUnload();
1.74 - virtual void SDK_OnAllLoaded();
1.75 - //virtual void SDK_OnPauseChange(bool paused);
1.76 - virtual bool QueryRunning(char *error, size_t maxlength);
1.77 - virtual bool QueryInterfaceDrop(SMInterface *pInterface);
1.78 - virtual void NotifyInterfaceDrop(SMInterface *pInterface);
1.79 - virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
1.80 -public:
1.81 -#if defined SMEXT_CONF_METAMOD
1.82 - virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
1.83 - //virtual bool SDK_OnMetamodUnload(char *error, size_t maxlen);
1.84 - //virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlen);
1.85 -#endif
1.86 -public: //IConCommandBaseAccessor
1.87 - bool RegisterConCommandBase(ConCommandBase *pVar);
1.88 -public: //IClientListner
1.89 - void OnClientDisconnecting(int client);
1.90 -public: // IVoiceServer
1.91 - bool OnSetClientListening(int iReceiver, int iSender, bool bListen);
1.92 - void VoiceInit();
1.93 -public: //ICommandTargetProcessor
1.94 - bool ProcessCommandTarget(cmd_target_info_t *info);
1.95 -public:
1.96 - bool LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background);
1.97 - void OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
1.98 -};
1.99 -
1.100 -extern SDKTools g_SdkTools;
1.101 -/* Interfaces from engine or gamedll */
1.102 -extern IServerGameEnts *gameents;
1.103 -extern IEngineTrace *enginetrace;
1.104 -extern IEngineSound *engsound;
1.105 -extern INetworkStringTableContainer *netstringtables;
1.106 -extern IServerPluginHelpers *pluginhelpers;
1.107 -extern IServerGameClients *serverClients;
1.108 -extern IVoiceServer *voiceserver;
1.109 -extern IPlayerInfoManager *playerinfomngr;
1.110 -extern ICvar *icvar;
1.111 -extern IServer *iserver;
1.112 -/* Interfaces from SourceMod */
1.113 -extern IBinTools *g_pBinTools;
1.114 -extern IGameConfig *g_pGameConf;
1.115 -extern IGameHelpers *g_pGameHelpers;
1.116 -/* Handle types */
1.117 -extern HandleType_t g_CallHandle;
1.118 -extern HandleType_t g_TraceHandle;
1.119 -/* Call Wrappers */
1.120 -extern ICallWrapper *g_pAcceptInput;
1.121 -/* Call classes */
1.122 -extern SourceHook::CallClass<IVEngineServer> *enginePatch;
1.123 -extern SourceHook::CallClass<IEngineSound> *enginesoundPatch;
1.124 -
1.125 -#define ENGINE_CALL(func) SH_CALL(enginePatch, &IVEngineServer::func)
1.126 -
1.127 -#endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_