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;
60 /** @brief Stores information about the HL2 Engine pointers */
63 CreateInterfaceFn engineFactory;
64 CreateInterfaceFn physicsFactory;
65 CreateInterfaceFn fileSystemFactory;
66 CGlobalVars *pGlobals;
68 IVEngineServer *engine;
71 /** @brief Global variable for GameDLL info */
72 extern GameDllInfo g_GameDll;
74 /** @brief Global variable for Engine info */
75 extern EngineInfo g_Engine;
77 /** @brief Global singleton for SourceHook */
78 extern SourceHook::CSourceHookImpl g_SourceHook;
80 /** @brief Mod path (important!)*/
81 extern String g_ModPath;
83 /** @brief Path to server binary */
84 extern String g_BinPath;
86 /** @brief Global variable for SourceHook macros */
87 extern SourceHook::ISourceHook *g_SHPtr;
89 /** @brief We have our own internal plugin id... */
90 extern PluginId g_PLID;
92 /** @brief Hook for LevelShutdown */
93 void LevelShutdown_handler(void);
95 #endif //_INCLUDE_SOURCEMM_H