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_SOURCEMM_H
12 #define _INCLUDE_SOURCEMM_H
15 * @brief SourceMM main functionality for GameDLL interception
20 #include <interface.h>
22 #include <sourcehook/sourcehook_impl.h>
23 #include <sourcehook/sourcehook.h>
29 #define SOURCEMM_VERSION "1.00"
30 #define SOURCEMM_DATE __DATE__
33 * @brief Entry point for HL2 Engine
35 SMM_API void *CreateInterface(const char *name, int *code);
37 /** @brief Wrapper to catch GameDLL calls */
38 void *EngineFactory(const char *name, int *code);
40 /** @brief Wrapper to catch GameDLL calls */
41 void *PhysicsFactory(const char *name, int *code);
43 /** @brief Wrapper to catch GameDLL calls */
44 void *FileSystemFactory(const char *name, int *code);
46 /** @brief Loads all plugins found in a file */
47 int LoadPluginsFromFile(const char *file);
49 /** @brief Logs a message to the standard log file */
50 void LogMessage(const char *msg, ...);
52 /** @brief Stores information about the GameDLL */
57 CreateInterfaceFn factory;
58 IServerGameDLL *serverGameDLL_CC;
61 /** @brief Stores information about the HL2 Engine pointers */
64 CreateInterfaceFn engineFactory;
65 CreateInterfaceFn physicsFactory;
66 CreateInterfaceFn fileSystemFactory;
67 CGlobalVars *pGlobals;
69 IVEngineServer *engine;
72 /** @brief Global variable for GameDLL info */
73 extern GameDllInfo g_GameDll;
75 /** @brief Global variable for Engine info */
76 extern EngineInfo g_Engine;
78 /** @brief Global singleton for SourceHook */
79 extern SourceHook::CSourceHookImpl g_SourceHook;
81 /** @brief Mod path (important!)*/
82 extern std::string g_ModPath;
84 /** @brief Path to server binary */
85 extern std::string g_BinPath;
87 /** @brief Global variable for SourceHook macros */
88 extern SourceHook::ISourceHook *g_SHPtr;
90 /** @brief We have our own internal plugin id... */
91 extern PluginId g_PLID;
93 #endif //_INCLUDE_SOURCEMM_H