Update to VS2017 (with fixes)

This commit is contained in:
Silent 2017-03-08 16:34:00 +01:00
parent 8f04b40ca2
commit 2e82d001e1
6 changed files with 19 additions and 13 deletions

1
.gitignore vendored
View file

@ -60,6 +60,7 @@ _Chutzpah*
# Visual C++ cache files
ipch/
.vs/
*.aps
*.ncb
*.opensdf

View file

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2015
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 14.0.25420.1
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}"

View file

@ -33,20 +33,21 @@
<ProjectGuid>{652975D8-60B0-48E4-A973-4F10BA54FFCB}</ProjectGuid>
<RootNamespace>IIIFix</RootNamespace>
<ProjectName>SilentPatchIII</ProjectName>
<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>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -70,6 +70,7 @@ RpMaterial* CVehicleModelInfo::GetEditableMaterialListCB(RpMaterial* pMaterial,
}
// TODO: FIX IT
typedef std::tuple<RpMaterial**, RpMaterial**, int, int> PlateDataTuple;
static RpMaterial* PollPlateData(RpMaterial* pMaterial, void* pData)
{
if ( RwTexture* pTexture = RpMaterialGetTexture(pMaterial) )
@ -79,7 +80,7 @@ static RpMaterial* PollPlateData(RpMaterial* pMaterial, void* pData)
{
if ( !_strnicmp(pTexName, "carplate", 8) )
{
auto& pCallbackData = *static_cast<std::tuple<RpMaterial**,RpMaterial**,unsigned char,unsigned char>*>(pData);
auto& pCallbackData = *static_cast<PlateDataTuple*>(pData);
assert(std::get<2>(pCallbackData) < NUM_MAX_PLATES);
if ( std::get<2>(pCallbackData) < NUM_MAX_PLATES )
@ -99,7 +100,7 @@ static RpMaterial* PollPlateData(RpMaterial* pMaterial, void* pData)
}
else if ( !_strnicmp(pTexName, "carpback", 8) )
{
auto& pCallbackData = *static_cast<std::tuple<RpMaterial**,RpMaterial**,unsigned char,unsigned char>*>(pData);
auto& pCallbackData = *static_cast<PlateDataTuple*>(pData);
assert(std::get<3>(pCallbackData) < NUM_MAX_PLATES);
if ( std::get<3>(pCallbackData) < NUM_MAX_PLATES )
@ -164,7 +165,7 @@ static RpAtomic* SetPlateData(RpAtomic* pAtomic, void* pData)
void CCustomCarPlateMgr::SetupClump(RpClump* pClump, RpMaterial** pMatsArray)
{
// Split pMatsArray
std::tuple<RpMaterial**,RpMaterial**,unsigned char,unsigned char> CallbackData = std::make_tuple(pMatsArray, pMatsArray+NUM_MAX_PLATES, 0, 0);
PlateDataTuple CallbackData = std::make_tuple(pMatsArray, pMatsArray+NUM_MAX_PLATES, 0, 0);
RpClumpForAllAtomics(pClump, PollPlateData, &CallbackData);
}
@ -175,7 +176,7 @@ void CCustomCarPlateMgr::SetupClumpAfterVehicleUpgrade(RpClump* pClump, RpMateri
if ( pMatsArray )
{
// Split pMatsArray
std::tuple<RpMaterial**,RpMaterial**,unsigned char,unsigned char> CallbackData = std::make_tuple(pMatsArray, pMatsArray+NUM_MAX_PLATES, 0, 0);
PlateDataTuple CallbackData = std::make_tuple(pMatsArray, pMatsArray+NUM_MAX_PLATES, 0, 0);
RpClumpForAllAtomics(pClump, PollPlateData, &CallbackData);
}

View file

@ -14,21 +14,21 @@
<ProjectGuid>{D3E18BC0-A120-451D-A16A-F77072625D66}</ProjectGuid>
<RootNamespace>SAFix</RootNamespace>
<ProjectName>SilentPatchSA</ProjectName>
<WindowsTargetPlatformVersion>0x0502</WindowsTargetPlatformVersion>
<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>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -14,20 +14,21 @@
<ProjectGuid>{374D4CB4-548A-4DA0-AB68-8EA356424626}</ProjectGuid>
<RootNamespace>VCFix</RootNamespace>
<ProjectName>SilentPatchVC</ProjectName>
<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>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">