Skip to content

Commit

Permalink
Recreated ddraw project with CRT and proper settings (will need it fo…
Browse files Browse the repository at this point in the history
…r patterns)
  • Loading branch information
CookiePLMonster committed Sep 18, 2017
1 parent fb672f0 commit a5380e3
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 36 deletions.
133 changes: 108 additions & 25 deletions DDraw/DDraw.vcxproj
Original file line number Diff line number Diff line change
@@ -1,79 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.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="Master|Win32">
<Configuration>Master</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B695EC1B-7258-426A-81CF-9323C016ACFB}</ProjectGuid>
<RootNamespace>ResSock</RootNamespace>
<ProjectName>DDraw</ProjectName>
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{537CF8A1-86B9-49C7-8408-C70657543AF7}</ProjectGuid>
<RootNamespace>DDraw</RootNamespace>
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="versionmeta.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="versionmeta.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="versionmeta.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'">
<TargetName>ddraw</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'">
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'">
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\SilentPatch;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto 3\ddraw.dll"
copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto Vice City\ddraw.dll"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<SDLCheck>true</SDLCheck>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\SilentPatch;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>..\SilentPatch;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto 3\ddraw.dll"
copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto Vice City\ddraw.dll"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\SilentPatch;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<EntryPointSymbol>DllMain@12</EntryPointSymbol>
<AdditionalDependencies>ntdllp.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>DDraw.def</ModuleDefinitionFile>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto Vice City\ddraw.dll"
copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto 3\ddraw.dll"</Command>
<Command>copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto 3\ddraw.dll"
copy /y "$(TargetPath)" "D:\Steam\steamapps\common\Grand Theft Auto Vice City\ddraw.dll"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\SilentPatch\MemoryMgr.h" />
<ResourceCompile Include="..\SilentPatch\SilentPatch.rc" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\SilentPatch\SilentPatch.rc" />
<ClInclude Include="..\SilentPatch\MemoryMgr.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
2 changes: 1 addition & 1 deletion DDraw/DDraw.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
Expand Down
3 changes: 2 additions & 1 deletion DDraw/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
#include <stdio.h>
#include <Shlwapi.h>
#include <ShlObj.h>
#define _MEMORY_NO_CRT
#include "MemoryMgr.h"

#pragma comment(lib, "shlwapi.lib")

extern "C" HRESULT WINAPI DirectDrawCreateEx(GUID FAR *lpGUID, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter)
{
static HRESULT (WINAPI *pDirectDrawCreateEx)(GUID FAR*, LPVOID*, REFIID, IUnknown FAR*);
Expand Down
Binary file removed DDraw/ntdllp.lib
Binary file not shown.
21 changes: 12 additions & 9 deletions SilentPatch.sln
Original file line number Diff line number Diff line change
@@ -1,47 +1,50 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
VisualStudioVersion = 15.0.26730.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DDraw", "DDraw\DDraw.vcxproj", "{B695EC1B-7258-426A-81CF-9323C016ACFB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SilentPatchIII", "SilentPatchIII\SilentPatchIII.vcxproj", "{652975D8-60B0-48E4-A973-4F10BA54FFCB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SilentPatchSA", "SilentPatchSA\SilentPatchSA.vcxproj", "{D3E18BC0-A120-451D-A16A-F77072625D66}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SilentPatchVC", "SilentPatchVC\SilentPatchVC.vcxproj", "{374D4CB4-548A-4DA0-AB68-8EA356424626}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DDraw", "DDraw\DDraw.vcxproj", "{537CF8A1-86B9-49C7-8408-C70657543AF7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Master|Win32 = Master|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B695EC1B-7258-426A-81CF-9323C016ACFB}.Debug|Win32.ActiveCfg = Master|Win32
{B695EC1B-7258-426A-81CF-9323C016ACFB}.Debug|Win32.Build.0 = Master|Win32
{B695EC1B-7258-426A-81CF-9323C016ACFB}.Master|Win32.ActiveCfg = Master|Win32
{B695EC1B-7258-426A-81CF-9323C016ACFB}.Master|Win32.Build.0 = Master|Win32
{B695EC1B-7258-426A-81CF-9323C016ACFB}.Release|Win32.ActiveCfg = Master|Win32
{B695EC1B-7258-426A-81CF-9323C016ACFB}.Release|Win32.Build.0 = Master|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Debug|Win32.ActiveCfg = Debug|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Debug|Win32.Build.0 = Debug|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Debug|Win32.Deploy.0 = Debug|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Master|Win32.ActiveCfg = Master|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Master|Win32.Build.0 = Master|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Release|Win32.ActiveCfg = Release|Win32
{652975D8-60B0-48E4-A973-4F10BA54FFCB}.Release|Win32.Build.0 = Release|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Debug|Win32.ActiveCfg = Debug|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Debug|Win32.Build.0 = Debug|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Debug|Win32.Deploy.0 = Debug|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Master|Win32.ActiveCfg = Master|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Master|Win32.Build.0 = Master|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Release|Win32.ActiveCfg = Release|Win32
{D3E18BC0-A120-451D-A16A-F77072625D66}.Release|Win32.Build.0 = Release|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Debug|Win32.ActiveCfg = Debug|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Debug|Win32.Build.0 = Debug|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Debug|Win32.Deploy.0 = Debug|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Master|Win32.ActiveCfg = Master|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Master|Win32.Build.0 = Master|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Release|Win32.ActiveCfg = Release|Win32
{374D4CB4-548A-4DA0-AB68-8EA356424626}.Release|Win32.Build.0 = Release|Win32
{537CF8A1-86B9-49C7-8408-C70657543AF7}.Debug|Win32.ActiveCfg = Debug|Win32
{537CF8A1-86B9-49C7-8408-C70657543AF7}.Debug|Win32.Build.0 = Debug|Win32
{537CF8A1-86B9-49C7-8408-C70657543AF7}.Master|Win32.ActiveCfg = Master|Win32
{537CF8A1-86B9-49C7-8408-C70657543AF7}.Master|Win32.Build.0 = Master|Win32
{537CF8A1-86B9-49C7-8408-C70657543AF7}.Release|Win32.ActiveCfg = Release|Win32
{537CF8A1-86B9-49C7-8408-C70657543AF7}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit a5380e3

Please sign in to comment.