#include <interface.h>
#include <sourcehook/sourcehook.h>
#include "ISmmAPI.h"
Go to the source code of this file.
Classes | |
| class | ISmmPlugin |
| class | IMetamodListener |
| Added in 1.1 so plugins could listen to specific events. More... | |
Defines | |
| #define | PLAPI_VERSION 10 |
| #define | PLAPI_NAME "ISmmPlugin" |
| #define | PL_EXPOSURE CreateInterface |
| #define | PL_EXPOSURE_C "CreateInterface" |
| #define | PLUGIN_EXPOSE(name, var) |
| #define | PLUGIN_GLOBALVARS() |
| #define | PLUGIN_SAVEVARS() |
| #define | META_LOG g_SMAPI->LogMsg |
| #define | META_REGCMD(name) g_SMAPI->RegisterConCmdBase(g_PLAPI, name##_command) |
| #define | META_REGCVAR(var) g_SMAPI->RegisterConCmdBase(g_PLAPI, var) |
| #define | META_UNREGCMD(name) g_SMAPI->UnregisterConCmdBase(g_PLAPI, name##_command) |
| #define | META_UNREGCVAR(var) g_SMAPI->UnregisterConCmdBase(g_PLAPI, var) |
| #define | META_CONPRINT g_SMAPI->ConPrint |
| #define | META_CONPRINTF g_SMAPI->ConPrintf |
| #define | CONCMD_VARNAME(name) name##_command |
| #define | GET_V_IFACE_CURRENT(v_factory, v_var, v_type, v_name) |
| defined SMM_API | |
| #define | GET_V_IFACE_ANY(v_factory, v_var, v_type, v_name) |
| Same as GET_V_IFACE, except searches for any. | |
Definition in file ISmmPlugin.h.
| #define CONCMD_VARNAME | ( | name | ) | name##_command |
Definition at line 357 of file ISmmPlugin.h.
| #define GET_V_IFACE_ANY | ( | v_factory, | |||
| v_var, | |||||
| v_type, | |||||
| v_name | ) |
Value:
v_var = (v_type *)ismm->VInterfaceMatch(ismm->v_factory(), v_name, 0); \
if (!v_var) \
{ \
if (error && maxlen) \
{ \
snprintf(error, maxlen, "Could not find interface: %s", v_name); \
} \
return false; \
}
| v_factory | Factory method to use from ISmmAPI (such as engineFactory). | |
| v_var | Variable name to store into. | |
| v_type | Interface type (do not include the pointer/asterisk). | |
| v_name | Interface name. |
Definition at line 398 of file ISmmPlugin.h.
| #define GET_V_IFACE_CURRENT | ( | v_factory, | |||
| v_var, | |||||
| v_type, | |||||
| v_name | ) |
Value:
v_var = (v_type *)ismm->VInterfaceMatch(ismm->v_factory(), v_name); \
if (!v_var) \
{ \
if (error && maxlen) \
{ \
snprintf(error, maxlen, "Could not find interface: %s", v_name); \
} \
return false; \
}
| v_factory | Factory method to use from ISmmAPI (such as engineFactory). | |
| v_var | Variable name to store into. | |
| v_type | Interface type (do not include the pointer/asterisk). | |
| v_name | Interface name. |
Definition at line 379 of file ISmmPlugin.h.
| #define META_CONPRINT g_SMAPI->ConPrint |
Definition at line 353 of file ISmmPlugin.h.
| #define META_CONPRINTF g_SMAPI->ConPrintf |
Definition at line 354 of file ISmmPlugin.h.
| #define META_LOG g_SMAPI->LogMsg |
Definition at line 348 of file ISmmPlugin.h.
| #define META_REGCMD | ( | name | ) | g_SMAPI->RegisterConCmdBase(g_PLAPI, name##_command) |
Definition at line 349 of file ISmmPlugin.h.
| #define META_REGCVAR | ( | var | ) | g_SMAPI->RegisterConCmdBase(g_PLAPI, var) |
Definition at line 350 of file ISmmPlugin.h.
| #define META_UNREGCMD | ( | name | ) | g_SMAPI->UnregisterConCmdBase(g_PLAPI, name##_command) |
Definition at line 351 of file ISmmPlugin.h.
| #define META_UNREGCVAR | ( | var | ) | g_SMAPI->UnregisterConCmdBase(g_PLAPI, var) |
Definition at line 352 of file ISmmPlugin.h.
| #define PL_EXPOSURE CreateInterface |
Definition at line 321 of file ISmmPlugin.h.
| #define PL_EXPOSURE_C "CreateInterface" |
Definition at line 322 of file ISmmPlugin.h.
| #define PLAPI_NAME "ISmmPlugin" |
Definition at line 24 of file ISmmPlugin.h.
| #define PLAPI_VERSION 10 |
Definition at line 23 of file ISmmPlugin.h.
| #define PLUGIN_EXPOSE | ( | name, | |||
| var | ) |
Value:
ISmmAPI *g_SMAPI = NULL; \ ISmmPlugin *g_PLAPI = NULL; \ PluginId g_PLID = (PluginId)0; \ SourceHook::ISourceHook *g_SHPtr = NULL; \ SMM_API void *PL_EXPOSURE(const char *name, int *code) { \ if (name && !strcmp(name, PLAPI_NAME)) { \ return static_cast<void *>(&var); \ } \ return NULL; \ }
Definition at line 324 of file ISmmPlugin.h.
| #define PLUGIN_GLOBALVARS | ( | ) |
Value:
extern SourceHook::ISourceHook *g_SHPtr; \ extern ISmmAPI *g_SMAPI; \ extern ISmmPlugin *g_PLAPI; \ extern PluginId g_PLID;
Definition at line 336 of file ISmmPlugin.h.
| #define PLUGIN_SAVEVARS | ( | ) |
Value:
g_SMAPI = ismm; \
g_SHPtr = static_cast<SourceHook::ISourceHook *>(ismm->MetaFactory(MMIFACE_SOURCEHOOK, NULL, NULL)); \
g_PLAPI = static_cast<ISmmPlugin *>(this); \
g_PLID = id;
Definition at line 342 of file ISmmPlugin.h.
1.5.5