41 lines
961 B
C++
41 lines
961 B
C++
#include "game.h"
|
|
|
|
IFileSystem *filesystem;
|
|
IRenderContext *g_pRenderContext;
|
|
IGameWindow *g_pMainWindow;
|
|
|
|
IHumanDeviceManager *g_pHumanDeviceManager;
|
|
|
|
INetworkBase *g_pServerBridge;
|
|
INetworkBase *g_pClientBridge;
|
|
INetworkBase *g_pServerConnection;
|
|
|
|
INetworkBase *g_pPublicConnection;
|
|
INetworkBase *g_pCurrentConnection;
|
|
|
|
|
|
static CEngineVars s_vars;
|
|
CEngineVars *g_pEngineVars = &s_vars;
|
|
EngineConsts_t *g_pEngineConstants;
|
|
|
|
IPhysics *g_pPhysics;
|
|
IPhysicsWorld *g_pPhysicsWorld;
|
|
|
|
CreateInterfaceFn GetEngineFactory()
|
|
{
|
|
return Sys_GetFactory("engine");
|
|
};
|
|
|
|
// we need it to run before everything else
|
|
static IConsole *s_pConsole =
|
|
(IConsole*)GetEngineFactory()(CONSOLE_INTERFACE_VERSION, NULL);
|
|
IConsole *g_pConsole = s_pConsole;
|
|
EXPOSE_INTERFACE_GLOBALVAR(IConsole, IConsole, CONSOLE_INTERFACE_VERSION, g_pConsole)
|
|
|
|
IConsole *Console()
|
|
{
|
|
static IConsole *s_pConsole =
|
|
(IConsole*)GetEngineFactory()(CONSOLE_INTERFACE_VERSION, NULL);
|
|
return s_pConsole;
|
|
}
|