Skip to content

Commit 5975b4f

Browse files
committed
Compilation fixes
Speedup xrGameSpy compilation.
1 parent 6ca6df8 commit 5975b4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+294
-272
lines changed

Externals/cximage/cximage.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@
191191
<ProjectReference Include="$(SolutionDir)xrCore\xrCore.vcxproj">
192192
<Project>{a0f7d1fb-59a7-4717-a7e4-96f37e91998e}</Project>
193193
</ProjectReference>
194+
<ProjectReference Include="..\jpeg\libjpeg.vcxproj">
195+
<Project>{938c5808-85a1-4b5a-8cb4-d2d9d7851cb8}</Project>
196+
</ProjectReference>
194197
</ItemGroup>
195198
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
196199
<ImportGroup Label="ExtensionTargets">

Externals/cximage/ximacfg.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@ extern "C" void* cxrealloc(void* ptr, size_t size);
77

88
#ifdef CXIMAGE_AS_SHARED_LIBRARY //must be defined in Release_Shared configuration
99

10+
// XXX: dirty hack.
11+
#undef max
12+
#undef min
1013
#include "xrCore/xrCore.h"
1114

12-
#ifdef _MSC_VER // TODO: Remove this and instead depend on VS project "References"?
13-
#pragma comment(lib,"libjpeg.lib")
14-
#pragma comment(lib,"xrCore.lib")
15-
#endif
16-
1715
#ifdef CXIMAGE_BUILD
18-
# define CXIMAGE_API __declspec(dllexport)
16+
#define CXIMAGE_API XR_EXPORT
1917
#else
20-
# define CXIMAGE_API __declspec(dllimport)
18+
#define CXIMAGE_API XR_IMPORT
2119
#endif //#ifdef CXIMAGE_BUILD
2220
#else //if CXIMAGE_AS_SHARED_LIBRARY linking as static library ...
23-
# define CXIMAGE_API
21+
#define CXIMAGE_API
2422
#endif //CXIMAGE_AS_SHARED_LIBRARY
2523

2624
/////////////////////////////////////////////////////////////////////////////

Externals/cximage/ximajpg.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#if CXIMAGE_SUPPORT_JPG
2828

2929
#define CXIMAGEJPG_SUPPORT_EXIF 1
30-
3130
#define XMD_H
3231
#define HAVE_BOOLEAN
3332
extern "C" {
@@ -37,8 +36,6 @@ extern "C" {
3736
#undef HAVE_BOOLEAN
3837
#undef XMD_H
3938

40-
#pragma comment(lib, "libjpeg.lib")
41-
4239
class DLL_EXP CxImageJPG: public CxImage
4340
{
4441
public:

Externals/libvorbis_static.vcxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<ProjectGuid>{3A214E06-B95E-4D61-A291-1F8DF2EC10FD}</ProjectGuid>
2323
<RootNamespace>libvorbis</RootNamespace>
2424
<Keyword>Win32Proj</Keyword>
25+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
2526
</PropertyGroup>
2627
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2728
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -39,12 +40,12 @@
3940
<ConfigurationType>StaticLibrary</ConfigurationType>
4041
<CharacterSet>Unicode</CharacterSet>
4142
<WholeProgramOptimization>true</WholeProgramOptimization>
42-
<PlatformToolset>v140</PlatformToolset>
43+
<PlatformToolset>v141</PlatformToolset>
4344
</PropertyGroup>
4445
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4546
<ConfigurationType>StaticLibrary</ConfigurationType>
4647
<CharacterSet>Unicode</CharacterSet>
47-
<PlatformToolset>v140</PlatformToolset>
48+
<PlatformToolset>v141</PlatformToolset>
4849
</PropertyGroup>
4950
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5051
<ImportGroup Label="ExtensionSettings">

Externals/libvorbisfile_static.vcxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<ProjectGuid>{CEBDE98B-A6AA-46E6-BC79-FAAF823DB9EC}</ProjectGuid>
2424
<RootNamespace>libvorbisfile</RootNamespace>
2525
<Keyword>Win32Proj</Keyword>
26+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
2627
</PropertyGroup>
2728
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2829
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -38,12 +39,12 @@
3839
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
3940
<ConfigurationType>StaticLibrary</ConfigurationType>
4041
<CharacterSet>Unicode</CharacterSet>
41-
<PlatformToolset>v140</PlatformToolset>
42+
<PlatformToolset>v141</PlatformToolset>
4243
</PropertyGroup>
4344
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4445
<ConfigurationType>StaticLibrary</ConfigurationType>
4546
<CharacterSet>Unicode</CharacterSet>
46-
<PlatformToolset>v140</PlatformToolset>
47+
<PlatformToolset>v141</PlatformToolset>
4748
</PropertyGroup>
4849
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
4950
<ImportGroup Label="ExtensionSettings">

src/Common/Common.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
<ClInclude Include="PlatformLinux.inl" />
144144
<ClInclude Include="PlatformWindows.inl" />
145145
<ClInclude Include="Util.hpp" />
146+
<ClInclude Include="xr_impexp_macros.h" />
146147
<ClInclude Include="_d3d_extensions.h" />
147148
</ItemGroup>
148149
<ItemGroup>

src/Common/Common.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
<ClInclude Include="..\xrCommon\xr_deque.h">
8282
<Filter>xrCommon</Filter>
8383
</ClInclude>
84+
<ClInclude Include="xr_impexp_macros.h">
85+
<Filter>Platform</Filter>
86+
</ClInclude>
8487
</ItemGroup>
8588
<ItemGroup>
8689
<Filter Include="NvMender2003">
File renamed without changes.

src/editors/ECore/Editor/EditObject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ DEFINE_VECTOR(SBonePart, BPVec, BPIt);
174174
const u32 FVF_SV = D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_NORMAL;
175175

176176
class ECORE_API CEditableObject :
177-
178177
public IKinematics,
179178
public CPhysicsShellHolderEditorBase
180179
{

src/editors/ECore/Editor/ExportObjectOGF.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
CObjectOGFCollectorPacked::CObjectOGFCollectorPacked(const Fbox& bb, int apx_vertices, int apx_faces)
1717
{
1818
// Params
19-
m_VMscale.set(bb.max.x - bb.min.x + EPS, bb.max.y - bb.min.y + EPS, bb.max.z - bb.min.z + EPS);
20-
m_VMmin.set(bb.min).sub(EPS);
19+
m_VMscale.set(bb.vMax.x - bb.vMin.x + EPS, bb.vMax.y - bb.vMin.y + EPS, bb.vMax.z - bb.vMin.z + EPS);
20+
m_VMmin.set(bb.vMin).sub(EPS);
2121
m_VMeps.set(m_VMscale.x / clpOGFMX / 2, m_VMscale.y / clpOGFMY / 2, m_VMscale.z / clpOGFMZ / 2);
2222
m_VMeps.x = (m_VMeps.x < EPS_L) ? m_VMeps.x : EPS_L;
2323
m_VMeps.y = (m_VMeps.y < EPS_L) ? m_VMeps.y : EPS_L;
@@ -133,8 +133,8 @@ void CExportObjectOGF::SSplit::SavePart(IWriter& F, CObjectOGFCollectorPacked* p
133133
H.format_version = xrOGF_FormatVersion;
134134
H.type = (part->m_SWR.size()) ? MT_PROGRESSIVE : MT_NORMAL;
135135
H.shader_id = 0;
136-
H.bb.min = part->m_Box.min;
137-
H.bb.max = part->m_Box.max;
136+
H.bb.min = part->m_Box.vMin;
137+
H.bb.max = part->m_Box.vMax;
138138
part->m_Box.getsphere(H.bs.c, H.bs.r);
139139
F.w(&H, sizeof(H));
140140
F.close_chunk();

0 commit comments

Comments
 (0)