extensions/sdktools/extension.h
author David Anderson <dvander@alliedmods.net>
Sat Jul 07 17:46:17 2007 +0000 (2007-07-07)
changeset 1047 46da3a82493b
parent 1031 d9cf44ddcd9c
child 1052 a2de25952811
permissions -rw-r--r--
added enginesound support
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod SDK Tools Extension
     5  * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
     6  * ===============================================================
     7  *
     8  * This program is free software; you can redistribute it and/or
     9  * modify it under the terms of the GNU General Public License
    10  * as published by the Free Software Foundation; either version 2
    11  * of the License, or (at your option) any later version.
    12  * This program is distributed in the hope that it will be useful,
    13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15  * GNU General Public License for more details.
    16  * 
    17  * You should have received a copy of the GNU General Public License
    18  * along with this program; if not, write to the Free Software
    19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    20  *
    21  * Version: $Id$
    22  */
    23 
    24 #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
    25 #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
    26 
    27 /**
    28  * @file extension.h
    29  * @brief SDK Tools extension code header.
    30  */
    31 
    32 #include "smsdk_ext.h"
    33 #include <IBinTools.h>
    34 #include <IPlayerHelpers.h>
    35 #include <IGameHelpers.h>
    36 #include <IEngineSound.h>
    37 
    38 /**
    39  * @brief Implementation of the SDK Tools extension.
    40  * Note: Uncomment one of the pre-defined virtual functions in order to use it.
    41  */
    42 class SDKTools : public SDKExtension, public IHandleTypeDispatch
    43 {
    44 public:
    45 	void OnHandleDestroy(HandleType_t type, void *object);
    46 public:
    47 	virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
    48 	virtual void SDK_OnUnload();
    49 	virtual void SDK_OnAllLoaded();
    50 	//virtual void SDK_OnPauseChange(bool paused);
    51 	virtual bool QueryRunning(char *error, size_t maxlength);
    52 	virtual bool QueryInterfaceDrop(SMInterface *pInterface);
    53 	virtual void NotifyInterfaceDrop(SMInterface *pInterface);
    54 public:
    55 #if defined SMEXT_CONF_METAMOD
    56 	virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
    57 	//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlen);
    58 	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlen);
    59 #endif
    60 };
    61 
    62 extern IServerGameEnts *gameents;
    63 extern IBinTools *g_pBinTools;
    64 extern IGameConfig *g_pGameConf;
    65 extern IGameHelpers *g_pGameHelpers;
    66 extern HandleType_t g_CallHandle;
    67 extern IEngineSound *engsound;
    68 
    69 #endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_