2007-05-13 08:37:38 +02:00
|
|
|
/**
|
|
|
|
* vim: set ts=4 :
|
|
|
|
* ===============================================================
|
|
|
|
* SourceMod SDK Tools Extension
|
|
|
|
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
|
|
|
* ===============================================================
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* Version: $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
|
|
#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file extension.h
|
|
|
|
* @brief SDK Tools extension code header.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "smsdk_ext.h"
|
|
|
|
#include <IBinTools.h>
|
|
|
|
#include <IPlayerHelpers.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Implementation of the SDK Tools extension.
|
|
|
|
* Note: Uncomment one of the pre-defined virtual functions in order to use it.
|
|
|
|
*/
|
2007-06-16 10:36:34 +02:00
|
|
|
class SDKTools : public SDKExtension, public IHandleTypeDispatch
|
2007-05-13 08:37:38 +02:00
|
|
|
{
|
|
|
|
public:
|
2007-06-16 10:36:34 +02:00
|
|
|
void OnHandleDestroy(HandleType_t type, void *object);
|
|
|
|
public:
|
2007-05-13 08:37:38 +02:00
|
|
|
virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
|
2007-06-16 10:36:34 +02:00
|
|
|
virtual void SDK_OnUnload();
|
2007-05-13 08:37:38 +02:00
|
|
|
virtual void SDK_OnAllLoaded();
|
|
|
|
//virtual void SDK_OnPauseChange(bool paused);
|
|
|
|
virtual bool QueryRunning(char *error, size_t maxlength);
|
2007-06-27 01:11:13 +02:00
|
|
|
virtual bool QueryInterfaceDrop(SMInterface *pInterface);
|
|
|
|
virtual void NotifyInterfaceDrop(SMInterface *pInterface);
|
2007-05-13 08:37:38 +02:00
|
|
|
public:
|
|
|
|
#if defined SMEXT_CONF_METAMOD
|
|
|
|
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
|
|
|
|
//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlen);
|
|
|
|
//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlen);
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
extern IServerGameEnts *gameents;
|
|
|
|
extern IBinTools *g_pBinTools;
|
2007-06-16 10:36:34 +02:00
|
|
|
extern IGameConfig *g_pGameConf;
|
|
|
|
extern HandleType_t g_CallHandle;
|
2007-05-13 08:37:38 +02:00
|
|
|
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|