some stuff

This commit is contained in:
2026-03-05 21:25:59 +02:00
parent 2da75ebdd8
commit 99f68e655f
41 changed files with 706 additions and 324 deletions

40
game/shared/game.cpp Normal file
View File

@@ -0,0 +1,40 @@
#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;
}