aboutsummaryrefslogtreecommitdiff
path: root/mp/src/utils/captioncompiler
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/utils/captioncompiler
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/utils/captioncompiler')
-rw-r--r--mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj261
-rw-r--r--mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj.filters110
-rw-r--r--mp/src/utils/captioncompiler/captioncompiler.cpp588
-rw-r--r--mp/src/utils/captioncompiler/cbase.h19
4 files changed, 978 insertions, 0 deletions
diff --git a/mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj b/mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj
new file mode 100644
index 00000000..47767523
--- /dev/null
+++ b/mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Captioncompiler</ProjectName>
+ <ProjectGuid>{E85D01E5-DA1B-00A2-5D72-A9B6DEA9A995}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <TargetName>captioncompiler</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <TargetName>captioncompiler</TargetName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\win32\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\win32\</IntDir>
+ <ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
+ <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
+ <PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreLinkEventUseInBuild>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
+ <PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PostBuildEventUseInBuild>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\win32\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\win32\</IntDir>
+ <ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
+ <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreBuildEventUseInBuild>
+ <PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreLinkEventUseInBuild>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PostBuildEventUseInBuild>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PreBuildEvent>
+ <Command>if EXIST ..\..\..\game\bin\$(TargetFileName) for /f &quot;delims=&quot; %%A in (&apos;attrib &quot;..\..\..\game\bin\$(TargetFileName)&quot;&apos;) do set valveTmpIsReadOnly=&quot;%%A&quot;&#x0D;&#x0A;set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%&#x0D;&#x0A;if &quot;%valveTmpIsReadOnlyLetter%&quot;==&quot;R&quot; del /q &quot;$(TargetDir)&quot;$(TargetFileName)&#x0D;&#x0A;if exist ..\..\devtools\bin\vpc.exe ..\..\devtools\bin\vpc.exe -crc2 captioncompiler.vcxproj&#x0D;&#x0A;if ERRORLEVEL 1 exit 1</Command>
+ </PreBuildEvent>
+ <ClCompile>
+ <AdditionalOptions> /MP</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\common;..\..\public;..\..\public\tier0;..\..\public\tier1;..\common;..\..\game\shared;.\</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_HAS_ITERATOR_DEBUGGING=0;WIN32;_WIN32;_DEBUG;DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;RAD_TELEMETRY_DISABLED;COMPILER_MSVC32;captioncompiler;VPCGAMECAPS=VALVE;PROJECTDIR=D:\dev\games\rel\hl2\src\utils\captioncompiler;_DLL_EXT=.dll;VPCGAME=valve</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+ <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <OpenMPSupport>false</OpenMPSupport>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <ExpandAttributedSource>false</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)/</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)/</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)/</ProgramDataBaseFileName>
+ <BrowseInformation>false</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <BrowseInformationFile>$(IntDir)/</BrowseInformationFile>
+ <ErrorReporting>Prompt</ErrorReporting>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE</PreprocessorDefinitions>
+ <Culture>1033</Culture>
+ </ResourceCompile>
+ <PreLinkEvent>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalOptions> /NXCOMPAT /ignore:4221</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <ShowProgress>NotSet</ShowProgress>
+ <OutputFile>$(OutDir)\captioncompiler.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreSpecificDefaultLibraries>libc;libcd;libcmt</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)/$(TargetName).pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>$(IntDir)/$(TargetName).map</MapFileName>
+ <SubSystem>Console</SubSystem>
+ <BaseAddress> </BaseAddress>
+ <TargetMachine>MachineX86</TargetMachine>
+ <LinkErrorReporting>PromptImmediately</LinkErrorReporting>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Manifest>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Manifest>
+ <Xdcmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Xdcmake>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(OutDir)/captioncompiler.bsc</OutputFile>
+ </Bscmake>
+ <PostBuildEvent>
+ <Message>Publishing to ..\..\..\game\bin</Message>
+ <Command>if not exist &quot;..\..\..\game\bin&quot; mkdir &quot;..\..\..\game\bin&quot;&#x0D;&#x0A;copy &quot;$(TargetDir)&quot;$(TargetFileName) ..\..\..\game\bin\$(TargetFileName)&#x0D;&#x0A;if ERRORLEVEL 1 goto BuildEventFailed&#x0D;&#x0A;if exist &quot;$(TargetDir)&quot;$(TargetName).map copy &quot;$(TargetDir)&quot;$(TargetName).map ..\..\..\game\bin\$(TargetName).map&#x0D;&#x0A;copy &quot;$(TargetDir)&quot;$(TargetName).pdb ..\..\..\game\bin\$(TargetName).pdb&#x0D;&#x0A;if ERRORLEVEL 1 goto BuildEventFailed&#x0D;&#x0A;goto BuildEventOK&#x0D;&#x0A;:BuildEventFailed&#x0D;&#x0A;echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***&#x0D;&#x0A;del /q &quot;$(TargetDir)&quot;$(TargetFileName)&#x0D;&#x0A;exit 1&#x0D;&#x0A;:BuildEventOK&#x0D;&#x0A;</Command>
+ </PostBuildEvent>
+ <CustomBuildStep>
+ </CustomBuildStep>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PreBuildEvent>
+ <Command>if EXIST ..\..\..\game\bin\$(TargetFileName) for /f &quot;delims=&quot; %%A in (&apos;attrib &quot;..\..\..\game\bin\$(TargetFileName)&quot;&apos;) do set valveTmpIsReadOnly=&quot;%%A&quot;&#x0D;&#x0A;set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%&#x0D;&#x0A;if &quot;%valveTmpIsReadOnlyLetter%&quot;==&quot;R&quot; del /q &quot;$(TargetDir)&quot;$(TargetFileName)&#x0D;&#x0A;if exist ..\..\devtools\bin\vpc.exe ..\..\devtools\bin\vpc.exe -crc2 captioncompiler.vcxproj&#x0D;&#x0A;if ERRORLEVEL 1 exit 1</Command>
+ </PreBuildEvent>
+ <ClCompile>
+ <AdditionalOptions> /MP /d2Zi+</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>..\..\common;..\..\public;..\..\public\tier0;..\..\public\tier1;..\common;..\..\game\shared;.\</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;RAD_TELEMETRY_DISABLED;COMPILER_MSVC32;captioncompiler;VPCGAMECAPS=VALVE;PROJECTDIR=D:\dev\games\rel\hl2\src\utils\captioncompiler;_DLL_EXT=.dll;VPCGAME=valve</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+ <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <OpenMPSupport>false</OpenMPSupport>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <ExpandAttributedSource>false</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)/</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)/</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)/</ProgramDataBaseFileName>
+ <BrowseInformation>false</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <BrowseInformationFile>$(IntDir)/</BrowseInformationFile>
+ <ErrorReporting>Prompt</ErrorReporting>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE</PreprocessorDefinitions>
+ <Culture>1033</Culture>
+ </ResourceCompile>
+ <PreLinkEvent>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalOptions> /DYNAMICBASE /NXCOMPAT /ignore:4221</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <ShowProgress>NotSet</ShowProgress>
+ <OutputFile>$(OutDir)\captioncompiler.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreSpecificDefaultLibraries>libc;libcd;libcmtd</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)/$(TargetName).pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>$(IntDir)/$(TargetName).map</MapFileName>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <BaseAddress> </BaseAddress>
+ <TargetMachine>MachineX86</TargetMachine>
+ <LinkErrorReporting>PromptImmediately</LinkErrorReporting>
+ </Link>
+ <Manifest>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Manifest>
+ <Xdcmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Xdcmake>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(OutDir)/captioncompiler.bsc</OutputFile>
+ </Bscmake>
+ <PostBuildEvent>
+ <Message>Publishing to ..\..\..\game\bin</Message>
+ <Command>if not exist &quot;..\..\..\game\bin&quot; mkdir &quot;..\..\..\game\bin&quot;&#x0D;&#x0A;copy &quot;$(TargetDir)&quot;$(TargetFileName) ..\..\..\game\bin\$(TargetFileName)&#x0D;&#x0A;if ERRORLEVEL 1 goto BuildEventFailed&#x0D;&#x0A;if exist &quot;$(TargetDir)&quot;$(TargetName).map copy &quot;$(TargetDir)&quot;$(TargetName).map ..\..\..\game\bin\$(TargetName).map&#x0D;&#x0A;copy &quot;$(TargetDir)&quot;$(TargetName).pdb ..\..\..\game\bin\$(TargetName).pdb&#x0D;&#x0A;if ERRORLEVEL 1 goto BuildEventFailed&#x0D;&#x0A;goto BuildEventOK&#x0D;&#x0A;:BuildEventFailed&#x0D;&#x0A;echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***&#x0D;&#x0A;del /q &quot;$(TargetDir)&quot;$(TargetFileName)&#x0D;&#x0A;exit 1&#x0D;&#x0A;:BuildEventOK&#x0D;&#x0A;</Command>
+ </PostBuildEvent>
+ <CustomBuildStep>
+ </CustomBuildStep>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Library Include="..\..\lib\public\appframework.lib" />
+ <Library Include="..\..\lib\public\mathlib.lib" />
+ <Library Include="..\..\lib\public\tier0.lib" />
+ <Library Include="..\..\lib\public\tier1.lib" />
+ <Library Include="..\..\lib\public\tier2.lib" />
+ <Library Include="..\..\lib\public\tier3.lib" />
+ <Library Include="..\..\lib\public\vstdlib.lib" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="cbase.h" />
+ <ClInclude Include="..\common\filesystem_tools.h" />
+ <ClInclude Include="..\common\cmdlib.h" />
+ <ClInclude Include="..\..\public\filesystem_helpers.h" />
+ <ClInclude Include="..\..\public\filesystem_init.h" />
+ <ClInclude Include="..\..\public\mathlib\mathlib.h" />
+ <ClInclude Include="..\common\pacifier.h" />
+ <ClInclude Include="..\common\scriplib.h" />
+ <ClInclude Include="..\..\public\stringregistry.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\common\cmdlib.cpp" />
+ <ClCompile Include="..\..\public\filesystem_helpers.cpp" />
+ <ClCompile Include="..\..\public\filesystem_init.cpp" />
+ <ClCompile Include="..\common\pacifier.cpp" />
+ <ClCompile Include="..\common\scriplib.cpp" />
+ <ClCompile Include="..\..\public\stringregistry.cpp" />
+ <ClCompile Include="captioncompiler.cpp" />
+ <ClCompile Include="..\..\common\compiledcaptionswap.cpp" />
+ <ClCompile Include="..\common\filesystem_tools.cpp" />
+ <ClCompile Include="..\..\public\tier0\memoverride.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\public\tier0\pointeroverride.asm">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling pointeroverride.asm</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">&quot;$(VCInstallDir)bin\ml.exe&quot; /c /Cp /Zi /Fo&quot;$(IntDir)\%(Filename).obj&quot; &quot;%(FullPath)&quot;</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)\%(Filename).obj</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling pointeroverride.asm</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">&quot;$(VCInstallDir)bin\ml.exe&quot; /c /Cp /Zi /Fo&quot;$(IntDir)\%(Filename).obj&quot; &quot;%(FullPath)&quot;</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)\%(Filename).obj</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj.filters b/mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj.filters
new file mode 100644
index 00000000..3e16f2b4
--- /dev/null
+++ b/mp/src/utils/captioncompiler/captioncompiler-2010.vcxproj.filters
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{1680C80B-FF1E-EA4D-9817-CC12254F2E40}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Link Libraries">
+ <UniqueIdentifier>{C5D73B3A-C648-896C-B7CE-F174808E5BA5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Shared Code">
+ <UniqueIdentifier>{C0A65B3F-3B05-094C-44FA-B1624BAD7BAC}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{BA03E055-4FA2-FCE3-8A1C-D348547D379C}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <Library Include="..\..\lib\public\appframework.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ <Library Include="..\..\lib\public\mathlib.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ <Library Include="..\..\lib\public\tier0.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ <Library Include="..\..\lib\public\tier1.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ <Library Include="..\..\lib\public\tier2.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ <Library Include="..\..\lib\public\tier3.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ <Library Include="..\..\lib\public\vstdlib.lib">
+ <Filter>Link Libraries</Filter>
+ </Library>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="cbase.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\common\filesystem_tools.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\common\cmdlib.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\public\filesystem_helpers.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\public\filesystem_init.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\public\mathlib\mathlib.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ <ClInclude Include="..\common\pacifier.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ <ClInclude Include="..\common\scriplib.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\public\stringregistry.h">
+ <Filter>Shared Code</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\common\cmdlib.cpp">
+ <Filter>Shared Code</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\public\filesystem_helpers.cpp">
+ <Filter>Shared Code</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\public\filesystem_init.cpp">
+ <Filter>Shared Code</Filter>
+ </ClCompile>
+ <ClCompile Include="..\common\pacifier.cpp">
+ <Filter>Shared Code</Filter>
+ </ClCompile>
+ <ClCompile Include="..\common\scriplib.cpp">
+ <Filter>Shared Code</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\public\stringregistry.cpp">
+ <Filter>Shared Code</Filter>
+ </ClCompile>
+ <ClCompile Include="captioncompiler.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\common\compiledcaptionswap.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\common\filesystem_tools.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\public\tier0\memoverride.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\public\tier0\pointeroverride.asm">
+ <Filter>Source Files</Filter>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+</Project>
diff --git a/mp/src/utils/captioncompiler/captioncompiler.cpp b/mp/src/utils/captioncompiler/captioncompiler.cpp
new file mode 100644
index 00000000..44e1578f
--- /dev/null
+++ b/mp/src/utils/captioncompiler/captioncompiler.cpp
@@ -0,0 +1,588 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: vcd_sound_check.cpp : Defines the entry point for the console application.
+//
+//===========================================================================//
+#include <stdio.h>
+#include <windows.h>
+#include "tier0/dbg.h"
+#include "tier1/utldict.h"
+#include "filesystem.h"
+#include "cmdlib.h"
+#include "scriplib.h"
+#include "vstdlib/random.h"
+#include "tier1/UtlBuffer.h"
+#include "pacifier.h"
+#include "appframework/tier3app.h"
+#include "tier0/icommandline.h"
+#include "vgui/IVGui.h"
+#include "vgui_controls/controls.h"
+#include "vgui/ILocalize.h"
+#include "tier1/checksum_crc.h"
+#include "tier1/UtlSortVector.h"
+#include "tier1/utlmap.h"
+#include "captioncompiler.h"
+
+#include "tier0/fasttimer.h"
+
+using namespace vgui;
+
+// #define TESTING 1
+
+
+bool uselogfile = false;
+bool bX360 = false;
+
+struct AnalysisData
+{
+ CUtlSymbolTable symbols;
+};
+
+static AnalysisData g_Analysis;
+
+IBaseFileSystem *filesystem = NULL;
+
+static bool spewed = false;
+
+SpewRetval_t SpewFunc( SpewType_t type, char const *pMsg )
+{
+ spewed = true;
+
+ printf( "%s", pMsg );
+ OutputDebugString( pMsg );
+
+ if ( type == SPEW_ERROR )
+ {
+ printf( "\n" );
+ OutputDebugString( "\n" );
+ }
+
+ return SPEW_CONTINUE;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : depth -
+// *fmt -
+// ... -
+//-----------------------------------------------------------------------------
+void vprint( int depth, const char *fmt, ... )
+{
+ char string[ 8192 ];
+ va_list va;
+ va_start( va, fmt );
+ vsprintf( string, fmt, va );
+ va_end( va );
+
+ FILE *fp = NULL;
+
+ if ( uselogfile )
+ {
+ fp = fopen( "log.txt", "ab" );
+ }
+
+ while ( depth-- > 0 )
+ {
+ printf( " " );
+ OutputDebugString( " " );
+ if ( fp )
+ {
+ fprintf( fp, " " );
+ }
+ }
+
+ ::printf( string );
+ OutputDebugString( string );
+
+ if ( fp )
+ {
+ char *p = string;
+ while ( *p )
+ {
+ if ( *p == '\n' )
+ {
+ fputc( '\r', fp );
+ }
+ fputc( *p, fp );
+ p++;
+ }
+ fclose( fp );
+ }
+}
+
+void logprint( char const *logfile, const char *fmt, ... )
+{
+ char string[ 8192 ];
+ va_list va;
+ va_start( va, fmt );
+ vsprintf( string, fmt, va );
+ va_end( va );
+
+ FILE *fp = NULL;
+ static bool first = true;
+ if ( first )
+ {
+ first = false;
+ fp = fopen( logfile, "wb" );
+ }
+ else
+ {
+ fp = fopen( logfile, "ab" );
+ }
+ if ( fp )
+ {
+ char *p = string;
+ while ( *p )
+ {
+ if ( *p == '\n' )
+ {
+ fputc( '\r', fp );
+ }
+ fputc( *p, fp );
+ p++;
+ }
+ fclose( fp );
+ }
+}
+
+
+void Con_Printf( const char *fmt, ... )
+{
+ va_list args;
+ static char output[1024];
+
+ va_start( args, fmt );
+ vprintf( fmt, args );
+ vsprintf( output, fmt, args );
+
+ vprint( 0, output );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void printusage( void )
+{
+ vprint( 0, "usage: captioncompiler closecaptionfile.txt\n\
+ \t-v = verbose output\n\
+ \t-l = log to file log.txt\n\
+ \ne.g.: kvc -l u:/xbox/game/hl2x/resource/closecaption_english.txt" );
+
+ // Exit app
+ exit( 1 );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void CheckLogFile( void )
+{
+ if ( uselogfile )
+ {
+ _unlink( "log.txt" );
+ vprint( 0, " Outputting to log.txt\n" );
+ }
+}
+
+void PrintHeader()
+{
+ vprint( 0, "Valve Software - captioncompiler.exe (%s)\n", __DATE__ );
+ vprint( 0, "--- Close Caption File compiler ---\n" );
+}
+
+//-----------------------------------------------------------------------------
+// The application object
+//-----------------------------------------------------------------------------
+class CCompileCaptionsApp : public CTier3SteamApp
+{
+ typedef CTier3SteamApp BaseClass;
+
+public:
+ // Methods of IApplication
+ virtual bool Create();
+ virtual bool PreInit();
+ virtual int Main();
+ virtual void PostShutdown();
+ virtual void Destroy();
+
+private:
+ // Sets up the search paths
+ bool SetupSearchPaths();
+
+ void CompileCaptionFile( char const *infile, char const *outfile );
+ void DescribeCaptions( char const *file );
+};
+
+
+bool CCompileCaptionsApp::Create()
+{
+ SpewOutputFunc( SpewFunc );
+ SpewActivate( "kvc", 2 );
+
+ AppSystemInfo_t appSystems[] =
+ {
+ { "vgui2.dll", VGUI_IVGUI_INTERFACE_VERSION },
+ { "", "" } // Required to terminate the list
+ };
+
+ return AddSystems( appSystems );
+}
+
+void CCompileCaptionsApp::Destroy()
+{
+}
+
+
+//-----------------------------------------------------------------------------
+// Sets up the game path
+//-----------------------------------------------------------------------------
+bool CCompileCaptionsApp::SetupSearchPaths()
+{
+ if ( !BaseClass::SetupSearchPaths( NULL, false, true ) )
+ return false;
+
+ // Set gamedir.
+ Q_MakeAbsolutePath( gamedir, sizeof( gamedir ), GetGameInfoPath() );
+ Q_AppendSlash( gamedir, sizeof( gamedir ) );
+
+ return true;
+}
+
+
+//-----------------------------------------------------------------------------
+// Init, shutdown
+//-----------------------------------------------------------------------------
+bool CCompileCaptionsApp::PreInit( )
+{
+ if ( !BaseClass::PreInit() )
+ return false;
+
+ g_pFileSystem = g_pFullFileSystem;
+ if ( !g_pFileSystem || !g_pVGui || !g_pVGuiLocalize )
+ {
+ Error( "Unable to load required library interface!\n" );
+ return false;
+ }
+
+// MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f, false, false, false, false );
+ g_pFullFileSystem->SetWarningFunc( Warning );
+
+ // Add paths...
+ if ( !SetupSearchPaths() )
+ return false;
+
+ return true;
+}
+
+void CCompileCaptionsApp::PostShutdown()
+{
+ g_pFileSystem = NULL;
+ BaseClass::PostShutdown();
+}
+
+void CCompileCaptionsApp::CompileCaptionFile( char const *infile, char const *outfile )
+{
+ StringIndex_t maxindex = (StringIndex_t)-1;
+ int maxunicodesize = 0;
+ int totalsize = 0;
+
+ int c = 0;
+
+ int curblock = 0;
+ int usedBytes = 0;
+ int blockSize = MAX_BLOCK_SIZE;
+
+ int freeSpace = 0;
+
+ CUtlVector< CaptionLookup_t > directory;
+ CUtlBuffer data;
+
+ CUtlRBTree< unsigned int > hashcollision( 0, 0, DefLessFunc( unsigned int ) );
+
+ for ( StringIndex_t i = g_pVGuiLocalize->GetFirstStringIndex(); i != INVALID_LOCALIZE_STRING_INDEX; i = g_pVGuiLocalize->GetNextStringIndex( i ), ++c )
+ {
+ char const *entryName = g_pVGuiLocalize->GetNameByIndex( i );
+ CaptionLookup_t entry;
+ entry.SetHash( entryName );
+
+ // vprint( 0, "%d / %d: %s == %u\n", c, i, g_pVGuiLocalize->GetNameByIndex( i ), entry.hash );
+
+ if ( hashcollision.Find( entry.hash ) != hashcollision.InvalidIndex() )
+ {
+ Error( "Hash name collision on %s!!!\n", g_pVGuiLocalize->GetNameByIndex( i ) );
+ }
+
+ hashcollision.Insert( entry.hash );
+
+ const wchar_t *text = g_pVGuiLocalize->GetValueByIndex( i );
+ if ( verbose )
+ {
+ vprint( 0, "Processing: '%30.30s' = '%S'\n", entryName, text );
+ }
+ int len = text ? ( wcslen( text ) + 1 ) * sizeof( short ) : 0;
+ if ( len > maxunicodesize )
+ {
+ maxindex = i;
+ maxunicodesize = len;
+ }
+
+ if ( len > blockSize )
+ {
+ Error( "Caption text file '%s' contains a single caption '%s' of %d bytes (%d is max), change MAX_BLOCK_SIZE in captioncompiler.h to fix!!!\n", g_pVGuiLocalize->GetNameByIndex( i ),
+ entryName, len, blockSize );
+ }
+ totalsize += len;
+
+ if ( usedBytes + len >= blockSize )
+ {
+ ++curblock;
+
+ int leftover = ( blockSize - usedBytes );
+
+ totalsize += leftover;
+
+ freeSpace += leftover;
+
+ while ( --leftover >= 0 )
+ {
+ data.PutChar( 0 );
+ }
+
+ usedBytes = len;
+ entry.offset = 0;
+
+ data.Put( (const void *)text, len );
+ }
+ else
+ {
+ entry.offset = usedBytes;
+ usedBytes += len;
+ data.Put( (const void *)text, len );
+ }
+
+ entry.length = len;
+ entry.blockNum = curblock;
+
+ directory.AddToTail( entry );
+ }
+
+ int leftover = ( blockSize - usedBytes );
+ totalsize += leftover;
+ freeSpace += leftover;
+ while ( --leftover >= 0 )
+ {
+ data.PutChar( 0 );
+ }
+
+ vprint( 0, "Found %i strings in '%s'\n", c, infile );
+
+ if ( maxindex != INVALID_LOCALIZE_STRING_INDEX )
+ {
+ vprint( 0, "Longest string '%s' = (%i) bytes average(%.3f)\n%",
+ g_pVGuiLocalize->GetNameByIndex( maxindex ), maxunicodesize, (float)totalsize/(float)c );
+ }
+
+ vprint( 0, "%d blocks (%d bytes each), %d bytes wasted (%.3f per block average), total bytes %d\n",
+ curblock + 1, blockSize, freeSpace, (float)freeSpace/(float)( curblock + 1 ), totalsize );
+
+ vprint( 0, "directory size %d entries, %d bytes, data size %d bytes\n",
+ directory.Count(), directory.Count() * sizeof( CaptionLookup_t ), data.TellPut() );
+
+ CompiledCaptionHeader_t header;
+ header.magic = COMPILED_CAPTION_FILEID;
+ header.version = COMPILED_CAPTION_VERSION;
+ header.numblocks = curblock + 1;
+ header.blocksize = blockSize;
+ header.directorysize = directory.Count();
+ header.dataoffset = 0;
+
+ // Now write the outfile
+ CUtlBuffer out;
+ out.Put( &header, sizeof( header ) );
+ out.Put( directory.Base(), directory.Count() * sizeof( CaptionLookup_t ) );
+ int curOffset = out.TellPut();
+ // Round it up to the next 512 byte boundary
+ int nBytesDestBuffer = AlignValue( curOffset, 512 ); // align to HD sector
+ int nPadding = nBytesDestBuffer - curOffset;
+ while ( --nPadding >= 0 )
+ {
+ out.PutChar( 0 );
+ }
+ out.Put( data.Base(), data.TellPut() );
+
+ // Write out a corrected header
+ header.dataoffset = nBytesDestBuffer;
+ int savePos = out.TellPut();
+ out.SeekPut( CUtlBuffer::SEEK_HEAD, 0 );
+ out.Put( &header, sizeof( header ) );
+ out.SeekPut( CUtlBuffer::SEEK_HEAD, savePos );
+
+ g_pFullFileSystem->WriteFile( outfile, NULL, out );
+
+ // Jeep: this function no longer exisits
+ /*if ( bX360 )
+ {
+ UpdateOrCreateCaptionFile_X360( g_pFullFileSystem, outfile, NULL, true );
+ }*/
+}
+
+void CCompileCaptionsApp::DescribeCaptions( char const *file )
+{
+ CUtlBuffer buf;
+ if ( !g_pFullFileSystem->ReadFile( file, NULL, buf ) )
+ {
+ Error( "Unable to read '%s' into buffer\n", file );
+ }
+
+ CompiledCaptionHeader_t header;
+ buf.Get( &header, sizeof( header ) );
+ if ( header.magic != COMPILED_CAPTION_FILEID )
+ Error( "Invalid file id for %s\n", file );
+ if ( header.version != COMPILED_CAPTION_VERSION )
+ Error( "Invalid file version for %s\n", file );
+
+ // Read the directory
+ CUtlSortVector< CaptionLookup_t, CCaptionLookupLess > directory;
+ directory.EnsureCapacity( header.directorysize );
+ directory.CopyArray( (const CaptionLookup_t *)buf.PeekGet(), header.directorysize );
+ directory.RedoSort( true );
+ buf.SeekGet( CUtlBuffer::SEEK_HEAD, header.dataoffset );
+
+ int i;
+ CUtlVector< CaptionBlock_t > blocks;
+ for ( i = 0; i < header.numblocks; ++i )
+ {
+ CaptionBlock_t& newBlock = blocks[ blocks.AddToTail() ];
+ Q_memset( newBlock.data, 0, sizeof( newBlock.data ) );
+ buf.Get( newBlock.data, header.blocksize );
+ }
+
+ CUtlMap< unsigned int, StringIndex_t > inverseMap( 0, 0, DefLessFunc( unsigned int ) );
+ for ( StringIndex_t idx = g_pVGuiLocalize->GetFirstStringIndex(); idx != INVALID_LOCALIZE_STRING_INDEX; idx = g_pVGuiLocalize->GetNextStringIndex( idx ) )
+ {
+ const char *name = g_pVGuiLocalize->GetNameByIndex( idx );
+ CaptionLookup_t dummy;
+ dummy.SetHash( name );
+
+ inverseMap.Insert( dummy.hash, idx );
+ }
+
+ // Now print everything out...
+ for ( i = 0; i < header.directorysize; ++i )
+ {
+ const CaptionLookup_t& entry = directory[ i ];
+ char const *name = g_pVGuiLocalize->GetNameByIndex( inverseMap.Element( inverseMap.Find( entry.hash ) ) );
+ const CaptionBlock_t& block = blocks[ entry.blockNum ];
+ const wchar_t *data = (const wchar_t *)&block.data[ entry.offset ];
+ wchar_t *temp = ( wchar_t * )_alloca( entry.length * sizeof( short ) );
+ wcsncpy( temp, data, ( entry.length / sizeof( short ) ) - 1 );
+
+ vprint( 0, "%3.3d: (%40.40s) hash(%15.15u), block(%4.4d), offset(%4.4d), len(%4.4d) %S\n",
+ i, name, entry.hash, entry.blockNum, entry.offset, entry.length, temp );
+ }
+}
+
+//-----------------------------------------------------------------------------
+// main application
+//-----------------------------------------------------------------------------
+int CCompileCaptionsApp::Main()
+{
+ CUtlVector< CUtlSymbol > worklist;
+
+ int i = 1;
+ for ( i ; i<CommandLine()->ParmCount() ; i++)
+ {
+ if ( CommandLine()->GetParm( i )[ 0 ] == '-' )
+ {
+ switch( CommandLine()->GetParm( i )[ 1 ] )
+ {
+ case 'l':
+ uselogfile = true;
+ break;
+ case 'v':
+ verbose = true;
+ break;
+ case 'x':
+ bX360 = true;
+ break;
+ case 'g': // -game
+ ++i;
+ break;
+ default:
+ printusage();
+ break;
+ }
+ }
+ else if ( i != 0 )
+ {
+ char fn[ 512 ];
+ Q_strncpy( fn, CommandLine()->GetParm( i ), sizeof( fn ) );
+ Q_FixSlashes( fn );
+ Q_strlower( fn );
+
+ CUtlSymbol sym;
+ sym = fn;
+ worklist.AddToTail( sym );
+ }
+ }
+
+ if ( CommandLine()->ParmCount() < 2 || ( i != CommandLine()->ParmCount() ) || worklist.Count() != 1 )
+ {
+ PrintHeader();
+ printusage();
+ }
+
+ CheckLogFile();
+
+ PrintHeader();
+
+ char binaries[MAX_PATH];
+ Q_strncpy( binaries, gamedir, MAX_PATH );
+ Q_StripTrailingSlash( binaries );
+ Q_strncat( binaries, "/../bin", MAX_PATH, MAX_PATH );
+
+ char outfile[ 512 ];
+ if ( Q_stristr( worklist[ worklist.Count() - 1 ].String(), gamedir ) )
+ {
+ Q_strncpy( outfile, &worklist[ worklist.Count() - 1 ].String()[ Q_strlen( gamedir ) ] , sizeof( outfile ) );
+ }
+ else
+ {
+ Q_snprintf( outfile, sizeof( outfile ), "resource\\%s", worklist[ worklist.Count() - 1 ].String() );
+ }
+
+ char infile[ 512 ];
+ Q_strncpy( infile, outfile, sizeof( infile ) );
+
+ Q_SetExtension( outfile, ".dat", sizeof( outfile ) );
+
+ vprint( 0, "gamedir[ %s ]\n", gamedir );
+ vprint( 0, "infile[ %s ]\n", infile );
+ vprint( 0, "outfile[ %s ]\n", outfile );
+
+ g_pFullFileSystem->AddSearchPath( binaries, "EXECUTABLE_PATH" );
+
+ if ( !g_pVGuiLocalize->AddFile( infile, "MOD", false ) )
+ {
+ Error( "Unable to add localization file '%s'\n", infile );
+ }
+
+ vprint( 0, " Compiling Captions for '%s'...\n", infile );
+
+ CompileCaptionFile( infile, outfile );
+
+ if ( verbose )
+ {
+ DescribeCaptions( outfile );
+ }
+
+ g_pVGuiLocalize->RemoveAll();
+
+ return 0;
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Main entry point
+//-----------------------------------------------------------------------------
+DEFINE_CONSOLE_STEAM_APPLICATION_OBJECT( CCompileCaptionsApp )
diff --git a/mp/src/utils/captioncompiler/cbase.h b/mp/src/utils/captioncompiler/cbase.h
new file mode 100644
index 00000000..378d503f
--- /dev/null
+++ b/mp/src/utils/captioncompiler/cbase.h
@@ -0,0 +1,19 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef CBASE_H
+#define CBASE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "basetypes.h"
+
+// This is just a dummy file to make this tool compile
+#include "ai_activity.h"
+#include "utlvector.h"
+
+#endif // CBASE_H