mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
ConnectInterfaces() actually works now.
This commit is contained in:
parent
bf0a12e642
commit
5744b3b0ee
@ -74,60 +74,60 @@ struct ConnectionRegistration_t
|
||||
|
||||
static const InterfaceGlobals_t g_pInterfaceGlobals[] =
|
||||
{
|
||||
{ CVAR_INTERFACE_VERSION, cvar },
|
||||
{ CVAR_INTERFACE_VERSION, g_pCVar },
|
||||
{ EVENTSYSTEM_INTERFACE_VERSION, g_pEventSystem },
|
||||
{ PROCESS_UTILS_INTERFACE_VERSION, g_pProcessUtils },
|
||||
{ VPHYSICS2_INTERFACE_VERSION, g_pPhysics2 },
|
||||
{ VPHYSICS2_ACTOR_MGR_INTERFACE_VERSION, g_pPhysics2ActorManager },
|
||||
{ VPHYSICS2_RESOURCE_MGR_INTERFACE_VERSION, g_pPhysics2ResourceManager },
|
||||
{ FILESYSTEM_INTERFACE_VERSION, g_pFullFileSystem },
|
||||
{ ASYNCFILESYSTEM_INTERFACE_VERSION, g_pAsyncFileSystem },
|
||||
{ RESOURCESYSTEM_INTERFACE_VERSION, g_pResourceSystem },
|
||||
{ MATERIAL_SYSTEM_INTERFACE_VERSION, materials },
|
||||
{ MATERIAL_SYSTEM_INTERFACE_VERSION, g_pMaterialSystem },
|
||||
{ MATERIAL_SYSTEM2_INTERFACE_VERSION, g_pMaterialSystem2 },
|
||||
{ INPUTSYSTEM_INTERFACE_VERSION, g_pInputSystem },
|
||||
{ INPUTSTACKSYSTEM_INTERFACE_VERSION, g_pInputStackSystem },
|
||||
{ NETWORKSYSTEM_INTERFACE_VERSION, g_pNetworkSystem },
|
||||
{ RENDER_DEVICE_MGR_INTERFACE_VERSION, g_pRenderDeviceMgr },
|
||||
{ MATERIALSYSTEM_HARDWARECONFIG_INTERFACE_VERSION, g_pMaterialSystemHardwareConfig },
|
||||
{ SOUNDSYSTEM_INTERFACE_VERSION, g_pSoundSystem },
|
||||
{ DEBUG_TEXTURE_INFO_VERSION, g_pMaterialSystemDebugTextureInfo },
|
||||
{ VB_ALLOC_TRACKER_INTERFACE_VERSION, g_VBAllocTracker },
|
||||
{ COLORCORRECTION_INTERFACE_VERSION, colorcorrection },
|
||||
{ P4_INTERFACE_VERSION, p4 },
|
||||
{ MDLLIB_INTERFACE_VERSION, mdllib },
|
||||
{ QUEUEDLOADER_INTERFACE_VERSION, g_pQueuedLoader },
|
||||
{ RESOURCE_ACCESS_CONTROL_INTERFACE_VERSION, g_pResourceAccessControl },
|
||||
{ PRECACHE_SYSTEM_INTERFACE_VERSION, g_pPrecacheSystem },
|
||||
{ STUDIO_RENDER_INTERFACE_VERSION, g_pStudioRender },
|
||||
{ STUDIO_RENDER_INTERFACE_VERSION, studiorender },
|
||||
{ VGUI_IVGUI_INTERFACE_VERSION, g_pVGui },
|
||||
{ VGUI_INPUT_INTERFACE_VERSION, g_pVGuiInput },
|
||||
{ VGUI_PANEL_INTERFACE_VERSION, g_pVGuiPanel },
|
||||
{ VGUI_SURFACE_INTERFACE_VERSION, g_pVGuiSurface },
|
||||
{ VGUI_SCHEME_INTERFACE_VERSION, g_pVGuiSchemeManager },
|
||||
{ VGUI_SYSTEM_INTERFACE_VERSION, g_pVGuiSystem },
|
||||
{ LOCALIZE_INTERFACE_VERSION, g_pLocalize },
|
||||
{ LOCALIZE_INTERFACE_VERSION, g_pVGuiLocalize },
|
||||
{ MAT_SYSTEM_SURFACE_INTERFACE_VERSION, g_pMatSystemSurface },
|
||||
{ DATACACHE_INTERFACE_VERSION, g_pDataCache },
|
||||
{ MDLCACHE_INTERFACE_VERSION, g_pMDLCache },
|
||||
{ MDLCACHE_INTERFACE_VERSION, mdlcache },
|
||||
{ AVI_INTERFACE_VERSION, g_pAVI },
|
||||
{ BIK_INTERFACE_VERSION, g_pBIK },
|
||||
{ DMEMAKEFILE_UTILS_INTERFACE_VERSION, g_pDmeMakefileUtils },
|
||||
{ VPHYSICS_COLLISION_INTERFACE_VERSION, g_pPhysicsCollision },
|
||||
{ SOUNDEMITTERSYSTEM_INTERFACE_VERSION, g_pSoundEmitterSystem },
|
||||
{ MESHSYSTEM_INTERFACE_VERSION, g_pMeshSystem },
|
||||
{ RENDER_DEVICE_INTERFACE_VERSION, g_pRenderDevice },
|
||||
{ RENDER_HARDWARECONFIG_INTERFACE_VERSION, g_pRenderHardwareConfig },
|
||||
{ SCENESYSTEM_INTERFACE_VERSION, g_pSceneSystem },
|
||||
{ WORLD_RENDERER_MGR_INTERFACE_VERSION, g_pWorldRendererMgr },
|
||||
{ RENDER_SYSTEM_SURFACE_INTERFACE_VERSION, g_pVGuiRenderSurface },
|
||||
{ MATCHFRAMEWORK_INTERFACE_VERSION, g_pMatchFramework },
|
||||
{ GAMEUISYSTEMMGR_INTERFACE_VERSION, g_pGameUISystemMgr }
|
||||
{ CVAR_INTERFACE_VERSION, &cvar },
|
||||
{ CVAR_INTERFACE_VERSION, &g_pCVar },
|
||||
{ EVENTSYSTEM_INTERFACE_VERSION, &g_pEventSystem },
|
||||
{ PROCESS_UTILS_INTERFACE_VERSION, &g_pProcessUtils },
|
||||
{ VPHYSICS2_INTERFACE_VERSION, &g_pPhysics2 },
|
||||
{ VPHYSICS2_ACTOR_MGR_INTERFACE_VERSION, &g_pPhysics2ActorManager },
|
||||
{ VPHYSICS2_RESOURCE_MGR_INTERFACE_VERSION, &g_pPhysics2ResourceManager },
|
||||
{ FILESYSTEM_INTERFACE_VERSION, &g_pFullFileSystem },
|
||||
{ ASYNCFILESYSTEM_INTERFACE_VERSION, &g_pAsyncFileSystem },
|
||||
{ RESOURCESYSTEM_INTERFACE_VERSION, &g_pResourceSystem },
|
||||
{ MATERIAL_SYSTEM_INTERFACE_VERSION, &materials },
|
||||
{ MATERIAL_SYSTEM_INTERFACE_VERSION, &g_pMaterialSystem },
|
||||
{ MATERIAL_SYSTEM2_INTERFACE_VERSION, &g_pMaterialSystem2 },
|
||||
{ INPUTSYSTEM_INTERFACE_VERSION, &g_pInputSystem },
|
||||
{ INPUTSTACKSYSTEM_INTERFACE_VERSION, &g_pInputStackSystem },
|
||||
{ NETWORKSYSTEM_INTERFACE_VERSION, &g_pNetworkSystem },
|
||||
{ RENDER_DEVICE_MGR_INTERFACE_VERSION, &g_pRenderDeviceMgr },
|
||||
{ MATERIALSYSTEM_HARDWARECONFIG_INTERFACE_VERSION, &g_pMaterialSystemHardwareConfig },
|
||||
{ SOUNDSYSTEM_INTERFACE_VERSION, &g_pSoundSystem },
|
||||
{ DEBUG_TEXTURE_INFO_VERSION, &g_pMaterialSystemDebugTextureInfo },
|
||||
{ VB_ALLOC_TRACKER_INTERFACE_VERSION, &g_VBAllocTracker },
|
||||
{ COLORCORRECTION_INTERFACE_VERSION, &colorcorrection },
|
||||
{ P4_INTERFACE_VERSION, &p4 },
|
||||
{ MDLLIB_INTERFACE_VERSION, &mdllib },
|
||||
{ QUEUEDLOADER_INTERFACE_VERSION, &g_pQueuedLoader },
|
||||
{ RESOURCE_ACCESS_CONTROL_INTERFACE_VERSION, &g_pResourceAccessControl },
|
||||
{ PRECACHE_SYSTEM_INTERFACE_VERSION, &g_pPrecacheSystem },
|
||||
{ STUDIO_RENDER_INTERFACE_VERSION, &g_pStudioRender },
|
||||
{ STUDIO_RENDER_INTERFACE_VERSION, &studiorender },
|
||||
{ VGUI_IVGUI_INTERFACE_VERSION, &g_pVGui },
|
||||
{ VGUI_INPUT_INTERFACE_VERSION, &g_pVGuiInput },
|
||||
{ VGUI_PANEL_INTERFACE_VERSION, &g_pVGuiPanel },
|
||||
{ VGUI_SURFACE_INTERFACE_VERSION, &g_pVGuiSurface },
|
||||
{ VGUI_SCHEME_INTERFACE_VERSION, &g_pVGuiSchemeManager },
|
||||
{ VGUI_SYSTEM_INTERFACE_VERSION, &g_pVGuiSystem },
|
||||
{ LOCALIZE_INTERFACE_VERSION, &g_pLocalize },
|
||||
{ LOCALIZE_INTERFACE_VERSION, &g_pVGuiLocalize },
|
||||
{ MAT_SYSTEM_SURFACE_INTERFACE_VERSION, &g_pMatSystemSurface },
|
||||
{ DATACACHE_INTERFACE_VERSION, &g_pDataCache },
|
||||
{ MDLCACHE_INTERFACE_VERSION, &g_pMDLCache },
|
||||
{ MDLCACHE_INTERFACE_VERSION, &mdlcache },
|
||||
{ AVI_INTERFACE_VERSION, &g_pAVI },
|
||||
{ BIK_INTERFACE_VERSION, &g_pBIK },
|
||||
{ DMEMAKEFILE_UTILS_INTERFACE_VERSION, &g_pDmeMakefileUtils },
|
||||
{ VPHYSICS_COLLISION_INTERFACE_VERSION, &g_pPhysicsCollision },
|
||||
{ SOUNDEMITTERSYSTEM_INTERFACE_VERSION, &g_pSoundEmitterSystem },
|
||||
{ MESHSYSTEM_INTERFACE_VERSION, &g_pMeshSystem },
|
||||
{ RENDER_DEVICE_INTERFACE_VERSION, &g_pRenderDevice },
|
||||
{ RENDER_HARDWARECONFIG_INTERFACE_VERSION, &g_pRenderHardwareConfig },
|
||||
{ SCENESYSTEM_INTERFACE_VERSION, &g_pSceneSystem },
|
||||
{ WORLD_RENDERER_MGR_INTERFACE_VERSION, &g_pWorldRendererMgr },
|
||||
{ RENDER_SYSTEM_SURFACE_INTERFACE_VERSION, &g_pVGuiRenderSurface },
|
||||
{ MATCHFRAMEWORK_INTERFACE_VERSION, &g_pMatchFramework },
|
||||
{ GAMEUISYSTEMMGR_INTERFACE_VERSION, &g_pGameUISystemMgr }
|
||||
};
|
||||
|
||||
static const int NUM_INTERFACES = sizeof(g_pInterfaceGlobals) / sizeof(InterfaceGlobals_t);
|
||||
@ -137,7 +137,7 @@ static int s_nRegistrationCount;
|
||||
|
||||
static ConnectionRegistration_t s_pConnectionRegistration[NUM_INTERFACES + 1];
|
||||
|
||||
void ReconnectInterface(CreateInterfaceFn factory, char const *pInterfaceName, void **w);
|
||||
void ReconnectInterface(CreateInterfaceFn factory, char const *pInterfaceName, void **ppGlobal);
|
||||
|
||||
void ConnectInterfaces(CreateInterfaceFn *pFactoryList, int nFactoryCount)
|
||||
{
|
||||
@ -207,7 +207,10 @@ void ReconnectInterface(CreateInterfaceFn factory, char const *pInterfaceName, v
|
||||
for (int i = 0; i < s_nRegistrationCount; i++)
|
||||
{
|
||||
if (s_pConnectionRegistration[i].m_ppGlobalStorage == ppGlobal)
|
||||
{
|
||||
got = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((s_nRegistrationCount <= 0 || !got) && *ppGlobal)
|
||||
|
@ -35,13 +35,7 @@
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\lib\public\</OutDir>
|
||||
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
|
||||
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreLinkEventUseInBuild>
|
||||
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PostBuildEventUseInBuild>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\lib\public\</OutDir>
|
||||
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreBuildEventUseInBuild>
|
||||
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreLinkEventUseInBuild>
|
||||
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PostBuildEventUseInBuild>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
@ -57,7 +51,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\public;..\public\tier0;..\public\tier1;..\public\interfaces;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;COMPILER_MSVC;COMPILER_MSVC32;_DEBUG;DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;TIER1_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;COMPILER_MSVC;COMPILER_MSVC32;_DEBUG;DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ExceptionHandling>
|
||||
@ -66,25 +60,12 @@
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ExpandAttributedSource>false</ExpandAttributedSource>
|
||||
<AssemblerOutput>
|
||||
</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||
<BrowseInformation>
|
||||
</BrowseInformation>
|
||||
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<ErrorReporting>Prompt</ErrorReporting>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<PreLinkEvent>
|
||||
@ -92,17 +73,12 @@
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Lib>
|
||||
<UseUnicodeResponseFiles>false</UseUnicodeResponseFiles>
|
||||
<AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<Xdcmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Xdcmake>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(OutDir)tier1.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Bscmake />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
@ -110,56 +86,38 @@
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\public;..\public\tier0;..\public\tier1;..\public\interfaces;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;COMPILER_MSVC;COMPILER_MSVC32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;TIER1_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;COMPILER_MSVC;COMPILER_MSVC32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ExpandAttributedSource>false</ExpandAttributedSource>
|
||||
<AssemblerOutput>
|
||||
</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||
<BrowseInformation>
|
||||
</BrowseInformation>
|
||||
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<ErrorReporting>Prompt</ErrorReporting>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<PreLinkEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreLinkEvent>
|
||||
<Lib>
|
||||
<UseUnicodeResponseFiles>false</UseUnicodeResponseFiles>
|
||||
<AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalDependencies>
|
||||
</AdditionalDependencies>
|
||||
</Lib>
|
||||
<Xdcmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Xdcmake>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(OutDir)tier1.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Bscmake />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\public\tier1\bitbuf.h" />
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user