1 /* ======== SourceMM ========
2 * Copyright (C) 2004-2005 Metamod:Source Development Team
3 * No warranties of any kind
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
11 #ifndef _INCLUDE_CSMM_API_H
12 #define _INCLUDE_CSMM_API_H
15 * @brief Header for CSmmAPI implementation
21 typedef void (*CONPRINTF_FUNC)(const char *, ...);
25 class CSmmAPI : public ISmmAPI
30 ISmmPluginManager *PluginManager();
31 SourceHook::ISourceHook *SourceHook();
32 void LogMsg(ISmmPlugin *pl, const char *msg, ...);
34 CreateInterfaceFn engineFactory(bool syn=true);
35 CreateInterfaceFn physicsFactory(bool syn=true);
36 CreateInterfaceFn fileSystemFactory(bool syn=true);
37 CreateInterfaceFn serverFactory(bool syn=true);
38 CGlobalVars *pGlobals();
39 void SetLastMetaReturn(META_RES res);
40 META_RES GetLastMetaReturn();
41 IConCommandBaseAccessor *GetCvarBaseAccessor();
42 bool RegisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand);
43 void UnregisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand);
44 void ConPrint(const char *fmt);
45 void ConPrintf(const char *fmt, ...);
46 bool CacheSuccessful();
51 CONPRINTF_FUNC m_ConPrintf;
56 extern SourceMM::CSmmAPI g_SmmAPI;
58 #define CONMSG g_SmmAPI.ConPrintf
60 #endif //_INCLUDE_CSMM_API_H