no engine anymore

This commit is contained in:
2025-07-30 23:53:26 +03:00
parent 8a29e6b86f
commit 395ced9e28
159 changed files with 2767 additions and 9484 deletions

29
tier1/interface.cpp Normal file
View File

@@ -0,0 +1,29 @@
#include "tier1/interface.h"
#include "tier1/utlvector.h"
CInterfaceRegistry *g_pInterfaceRegistries = NULL;
CInterfaceRegistry::CInterfaceRegistry( InstantiateInterfaceFn fn, const char *szName )
: m_szName(szName)
{
m_CreateFn = fn;
m_pNext = g_pInterfaceRegistries;
g_pInterfaceRegistries = this;
};
void *CreateInterface( const char *szName, int *pReturnCode )
{
CInterfaceRegistry *pRegistry = g_pInterfaceRegistries;
while (pRegistry)
{
if (!V_strcmp(szName, pRegistry->m_szName))
{
if (pReturnCode)
*pReturnCode = 0;
return pRegistry->m_CreateFn();
}
pRegistry = pRegistry->m_pNext;
}
if (pReturnCode)
*pReturnCode = 1;
return 0;
}