Skip to content

Commit e87cb0d

Browse files
committed
xrEngine: Removed d3d9.h dependency.
Author: Jules Blok <[email protected]> Author: Alexandr Akulich <[email protected]> Based on commit 46c36e6 from Armada651/xray repository.
1 parent 1c13715 commit e87cb0d

File tree

8 files changed

+32
-13
lines changed

8 files changed

+32
-13
lines changed

src/Layers/xrRenderPC_R1/stdafx.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
#pragma once
2+
3+
#ifdef _DEBUG
4+
# define D3D_DEBUG_INFO
5+
#endif
6+
27
#pragma warning(disable:4995)
38
#include "xrEngine/stdafx.h"
49
#pragma warning(disable:4995)
10+
#include <d3d9.h>
511
#include <d3dx9.h>
612
#pragma warning(default:4995)
713
#pragma warning(disable:4714)
814
#pragma warning( 4 : 4018 )
915
#pragma warning( 4 : 4244 )
1016

17+
#pragma comment( lib, "d3d9.lib" )
18+
1119
#include "Layers/xrRender/xrD3DDefs.h"
1220
#include "Layers/xrRender/HW.h"
1321
#include "Layers/xrRender/Shader.h"

src/Layers/xrRenderPC_R2/stdafx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@
44

55
#pragma once
66

7+
#ifdef _DEBUG
8+
# define D3D_DEBUG_INFO
9+
#endif
10+
711
#pragma warning(disable:4995)
812
#include "xrEngine/stdafx.h"
913
#pragma warning(disable:4995)
14+
#include <d3d9.h>
1015
#include <d3dx9.h>
1116
#pragma warning(default:4995)
1217
#pragma warning(disable:4714)
1318
#pragma warning( 4 : 4018 )
1419
#pragma warning( 4 : 4244 )
1520
#pragma warning(disable:4237)
1621

22+
#pragma comment( lib, "d3d9.lib" )
23+
1724
#include "Layers/xrRender/xrD3DDefs.h"
1825
#include "Layers/xrRender/HW.h"
1926
#include "Layers/xrRender/Shader.h"

src/Layers/xrRenderPC_R3/stdafx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@
44

55
#pragma once
66

7+
#ifdef _DEBUG
8+
# define D3D_DEBUG_INFO
9+
#endif
10+
711
#pragma warning(disable:4995)
812
#include "xrEngine/stdafx.h"
913
#pragma warning(disable:4995)
14+
#include <d3d9.h>
1015
#include <d3dx9.h>
1116
#pragma warning(default:4995)
1217
#pragma warning(disable:4714)
1318
#pragma warning( 4 : 4018 )
1419
#pragma warning( 4 : 4244 )
1520
#pragma warning(disable:4237)
1621

22+
#pragma comment( lib, "d3d9.lib" )
23+
1724
#include <d3d10_1.h>
1825
#include <d3d11.h>
1926
#include <D3Dx10core.h>

src/Layers/xrRenderPC_R4/stdafx.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
#pragma once
66

7+
#ifdef _DEBUG
8+
# define D3D_DEBUG_INFO
9+
#endif
10+
711
#pragma warning(disable:4995)
812
#include "xrEngine/stdafx.h"
913
#pragma warning(disable:4995)
@@ -14,6 +18,8 @@
1418
#pragma warning( 4 : 4244 )
1519
#pragma warning(disable:4237)
1620

21+
#pragma comment( lib, "d3d9.lib" )
22+
1723
#include <D3D11.h>
1824
#include <D3Dx11core.h>
1925
#include <D3DCompiler.h>

src/xrEngine/stdafx.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@
1919
#include "xrCore/xrCore.h"
2020
#include "Include/xrAPI/xrAPI.h"
2121

22-
#ifdef _DEBUG
23-
# define D3D_DEBUG_INFO
24-
#endif
25-
26-
#pragma warning(disable:4995)
27-
#include <d3d9.h>
28-
#pragma warning(default:4995)
29-
3022
#define ECORE_API
3123

3224
// Our headers
@@ -50,7 +42,6 @@ extern ENGINE_API CInifile* pGameIni;
5042
#pragma comment(lib, "xrScriptEngine.lib")
5143
#pragma comment( lib, "xrAPI.lib" )
5244
#pragma comment( lib, "winmm.lib" )
53-
#pragma comment( lib, "d3d9.lib" )
5445
#pragma comment( lib, "dinput8.lib" )
5546
#pragma comment( lib, "dxguid.lib" )
5647

@@ -72,4 +63,4 @@ extern ENGINE_API CInifile* pGameIni;
7263
(((ltx)->line_exist(section, name)) ? ((ltx)->method(section, name)) : (default_value))
7364

7465
#endif // !M_BORLAND
75-
#endif // !defined STDAFX_3DA
66+
#endif // !defined STDAFX_3DA

src/xrGame/CharacterPhysicsSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,4 +1449,4 @@ CPHSynchronize* CCharacterPhysicsSupport::PHGetSyncItem (u16 item)
14491449
return movement()->GetSyncItem();
14501450
else
14511451
return m_EntityAlife.CPhysicsShellHolder::PHGetSyncItem(item);
1452-
}
1452+
}

src/xrGame/ik/IKLimb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,4 +1312,4 @@ void CIKLimb::BonesCallback2 ( CBoneInstance* B )
13121312
}
13131313
#endif
13141314
VERIFY2( _valid( B->mTransform ), "CIKLimb::BonesCallback2" );
1315-
}
1315+
}

src/xrGame/imotion_position.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,4 +735,4 @@ void imotion_position::rootbone_callback ( CBoneInstance *BI )
735735
KA->LL_BoneMatrixBuild( *BI, &Fidentity, keys );
736736

737737
R_ASSERT2( _valid(BI->mTransform), "imotion_position::rootbone_callback" );
738-
}
738+
}

0 commit comments

Comments
 (0)