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