Skip to content

Commit

Permalink
Update to VS2017 (with fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePLMonster committed Mar 8, 2017
1 parent 8f04b40 commit 2e82d00
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ _Chutzpah*

# Visual C++ cache files
ipch/
.vs/
*.aps
*.ncb
*.opensdf
Expand Down
6 changes: 4 additions & 2 deletions SilentPatch.sln
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down
5 changes: 3 additions & 2 deletions SilentPatchIII/SilentPatchIII.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
9 changes: 5 additions & 4 deletions SilentPatchSA/ModelInfoSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) )
Expand All @@ -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 )
Expand All @@ -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 )
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions SilentPatchSA/SilentPatchSA.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
5 changes: 3 additions & 2 deletions SilentPatchVC/SilentPatchVC.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 2e82d00

Please sign in to comment.