core/sourcemm_api.h
author Scott Ehlert <ds@alliedmods.net>
Thu Mar 22 21:50:20 2007 +0000 (2007-03-22)
changeset 653 ef60870067ff
parent 644 2a90d4324fc0
child 654 e00dd6df311e
permissions -rw-r--r--
More consistency of some sort...

Oh god, what has possessed me to do this?
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  * This file is not open source and may not be copied without explicit
     8  * written permission of AlliedModders LLC.  This file may not be redistributed 
     9  * in whole or significant part.
    10  * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    11  *
    12  * Version: $Id$
    13  */
    14 
    15 #ifndef _INCLUDE_SOURCEMOD_MM_API_H_
    16 #define _INCLUDE_SOURCEMOD_MM_API_H_
    17 
    18 #include "convar_sm.h"
    19 #include <ISmmPlugin.h>
    20 #include <eiface.h>
    21 #include <igameevents.h>
    22 #include <iplayerinfo.h>
    23 #include <random.h>
    24 
    25 /**
    26  * @file Contains wrappers around required Metamod:Source API exports
    27  */
    28 
    29 class SourceMod_Core : public ISmmPlugin
    30 {
    31 public:
    32 	bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
    33 	bool Unload(char *error, size_t maxlen);
    34 	bool Pause(char *error, size_t maxlen);
    35 	bool Unpause(char *error, size_t maxlen);
    36 	void AllPluginsLoaded();
    37 public:
    38 	const char *GetAuthor();
    39 	const char *GetName();
    40 	const char *GetDescription();
    41 	const char *GetURL();
    42 	const char *GetLicense();
    43 	const char *GetVersion();
    44 	const char *GetDate();
    45 	const char *GetLogTag();
    46 };
    47 
    48 extern SourceMod_Core g_SourceMod_Core;
    49 extern IVEngineServer *engine;
    50 extern IServerGameDLL *gamedll;
    51 extern IServerGameClients *serverClients;
    52 extern ICvar *icvar;
    53 extern ISmmPluginManager *g_pMMPlugins;
    54 extern CGlobalVars *gpGlobals;
    55 extern IGameEventManager2 *gameevents;
    56 extern SourceHook::CallClass<IVEngineServer> *enginePatch;
    57 extern SourceHook::CallClass<IServerGameDLL> *gamedllPatch;
    58 extern IUniformRandomStream *engrandom;
    59 extern IPlayerInfoManager *playerinfo;
    60 
    61 #define ENGINE_CALL(func)		SH_CALL(enginePatch, &IVEngineServer::func)
    62 #define SERVER_CALL(func)		SH_CALL(gamedllPatch, &IServerGameDLL::func)
    63 
    64 PLUGIN_GLOBALVARS();
    65 
    66 #endif //_INCLUDE_SOURCEMOD_MM_API_H_