2007-01-25 23:36:38 +01:00
|
|
|
/**
|
2007-03-22 22:50:20 +01:00
|
|
|
* vim: set ts=4 :
|
2007-01-25 23:36:38 +01:00
|
|
|
* ===============================================================
|
|
|
|
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
|
|
|
* ===============================================================
|
|
|
|
*
|
|
|
|
* This file is not open source and may not be copied without explicit
|
|
|
|
* written permission of AlliedModders LLC. This file may not be redistributed
|
|
|
|
* in whole or significant part.
|
|
|
|
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
|
|
|
|
*
|
|
|
|
* Version: $Id$
|
|
|
|
*/
|
|
|
|
|
2006-11-04 20:27:20 +01:00
|
|
|
#ifndef _INCLUDE_SOURCEMOD_MM_API_H_
|
|
|
|
#define _INCLUDE_SOURCEMOD_MM_API_H_
|
|
|
|
|
2007-02-08 22:41:28 +01:00
|
|
|
#include "convar_sm.h"
|
2006-11-04 20:27:20 +01:00
|
|
|
#include <ISmmPlugin.h>
|
2006-12-13 12:16:20 +01:00
|
|
|
#include <eiface.h>
|
2007-02-08 02:11:45 +01:00
|
|
|
#include <igameevents.h>
|
2007-03-18 00:03:44 +01:00
|
|
|
#include <iplayerinfo.h>
|
2007-02-26 05:24:06 +01:00
|
|
|
#include <random.h>
|
2007-03-25 22:20:43 +02:00
|
|
|
#include <filesystem.h>
|
2007-03-26 00:25:45 +02:00
|
|
|
#include <IEngineSound.h>
|
2006-11-04 20:27:20 +01:00
|
|
|
|
2006-11-08 08:44:26 +01:00
|
|
|
/**
|
|
|
|
* @file Contains wrappers around required Metamod:Source API exports
|
|
|
|
*/
|
|
|
|
|
2007-04-08 20:19:06 +02:00
|
|
|
class SourceMod_Core :
|
|
|
|
public ISmmPlugin,
|
|
|
|
public IMetamodListener
|
2006-11-04 20:27:20 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
|
|
|
|
bool Unload(char *error, size_t maxlen);
|
|
|
|
bool Pause(char *error, size_t maxlen);
|
|
|
|
bool Unpause(char *error, size_t maxlen);
|
|
|
|
void AllPluginsLoaded();
|
|
|
|
public:
|
|
|
|
const char *GetAuthor();
|
|
|
|
const char *GetName();
|
|
|
|
const char *GetDescription();
|
|
|
|
const char *GetURL();
|
|
|
|
const char *GetLicense();
|
|
|
|
const char *GetVersion();
|
|
|
|
const char *GetDate();
|
|
|
|
const char *GetLogTag();
|
2007-04-08 20:19:06 +02:00
|
|
|
public:
|
|
|
|
void OnVSPListening(IServerPluginCallbacks *iface);
|
2006-11-04 20:27:20 +01:00
|
|
|
};
|
|
|
|
|
2006-11-08 08:32:44 +01:00
|
|
|
extern SourceMod_Core g_SourceMod_Core;
|
2006-12-13 12:16:20 +01:00
|
|
|
extern IVEngineServer *engine;
|
|
|
|
extern IServerGameDLL *gamedll;
|
2006-12-28 01:48:09 +01:00
|
|
|
extern IServerGameClients *serverClients;
|
2007-02-08 22:41:28 +01:00
|
|
|
extern ICvar *icvar;
|
2007-01-17 04:01:38 +01:00
|
|
|
extern ISmmPluginManager *g_pMMPlugins;
|
2007-02-07 09:44:48 +01:00
|
|
|
extern CGlobalVars *gpGlobals;
|
2007-02-08 02:11:45 +01:00
|
|
|
extern IGameEventManager2 *gameevents;
|
2007-02-15 21:35:17 +01:00
|
|
|
extern SourceHook::CallClass<IVEngineServer> *enginePatch;
|
2007-02-26 06:26:54 +01:00
|
|
|
extern SourceHook::CallClass<IServerGameDLL> *gamedllPatch;
|
2007-02-26 05:24:06 +01:00
|
|
|
extern IUniformRandomStream *engrandom;
|
2007-03-18 00:03:44 +01:00
|
|
|
extern IPlayerInfoManager *playerinfo;
|
2007-03-25 22:20:43 +02:00
|
|
|
extern IBaseFileSystem *basefilesystem;
|
2007-03-26 00:25:45 +02:00
|
|
|
extern IEngineSound *enginesound;
|
2007-03-29 21:48:54 +02:00
|
|
|
extern IServerPluginHelpers *serverpluginhelpers;
|
2007-02-15 21:35:17 +01:00
|
|
|
|
|
|
|
#define ENGINE_CALL(func) SH_CALL(enginePatch, &IVEngineServer::func)
|
2007-02-26 06:26:54 +01:00
|
|
|
#define SERVER_CALL(func) SH_CALL(gamedllPatch, &IServerGameDLL::func)
|
2006-11-04 20:27:20 +01:00
|
|
|
|
|
|
|
PLUGIN_GLOBALVARS();
|
|
|
|
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_MM_API_H_
|