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

View File

@@ -9,6 +9,7 @@
#include "cl_dll.h"
#include "inetworkserver.h"
#include "inetworkclient.h"
#include "ihumandevice.h"
#ifdef STEAM
#include "steam/steam_api.h"
@@ -22,6 +23,14 @@ IGameWindowManager *g_pWindowManager;
CServerGameDLL *g_pServerGame;
CClientGameDLL *g_pClientGame;
static void CallKeyEvent( EInputDeviceType eDevice, EInputButton eButton, bool bIsPressed )
{
if (bIsPressed)
g_pHumanDeviceManager->SetButtonPressed(eButton);
else
g_pHumanDeviceManager->SetButtonUnpressed(eButton);
}
extern "C" void __cdecl SteamAPIDebug( ESteamNetworkingSocketsDebugOutputType nType, const char *pszMsg )
{
V_printf("STEAM: %s\n", pszMsg);
@@ -67,6 +76,7 @@ extern "C" void FunnyMain( int argc, char **argv )
pWindow = g_pWindowManager->CreateWindow();
pWindow->Init();
pWindow->SetKeyCallback(CallKeyEvent);
g_pRenderContext = (IRenderContext*)pRenderSystemFactory(RENDER_CONTEXT_INTERFACE_VERSION, NULL);
g_pRenderContext->SetMainWindowManager(g_pWindowManager);
@@ -98,6 +108,7 @@ extern "C" void FunnyMain( int argc, char **argv )
double fDelta = fCurrent-fPrevious;
fPrevious = fCurrent;
g_pHumanDeviceManager->Frame();
g_pServerGame->m_pBridge->Frame(fDelta);
if (!stConstants.m_bIsDedicated)