Skip to content

Commit

Permalink
xrEngine: Removed d3d9.h dependency.
Browse files Browse the repository at this point in the history
Author: Jules Blok <[email protected]>
Author: Alexandr Akulich <[email protected]>

Based on commit 46c36e6 from Armada651/xray repository.
  • Loading branch information
Kaffeine committed Nov 10, 2015
1 parent 1c13715 commit e87cb0d
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 13 deletions.
8 changes: 8 additions & 0 deletions src/Layers/xrRenderPC_R1/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#pragma once

#ifdef _DEBUG
# define D3D_DEBUG_INFO
#endif

#pragma warning(disable:4995)
#include "xrEngine/stdafx.h"
#pragma warning(disable:4995)
#include <d3d9.h>
#include <d3dx9.h>
#pragma warning(default:4995)
#pragma warning(disable:4714)
#pragma warning( 4 : 4018 )
#pragma warning( 4 : 4244 )

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

#include "Layers/xrRender/xrD3DDefs.h"
#include "Layers/xrRender/HW.h"
#include "Layers/xrRender/Shader.h"
Expand Down
7 changes: 7 additions & 0 deletions src/Layers/xrRenderPC_R2/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@

#pragma once

#ifdef _DEBUG
# define D3D_DEBUG_INFO
#endif

#pragma warning(disable:4995)
#include "xrEngine/stdafx.h"
#pragma warning(disable:4995)
#include <d3d9.h>
#include <d3dx9.h>
#pragma warning(default:4995)
#pragma warning(disable:4714)
#pragma warning( 4 : 4018 )
#pragma warning( 4 : 4244 )
#pragma warning(disable:4237)

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

#include "Layers/xrRender/xrD3DDefs.h"
#include "Layers/xrRender/HW.h"
#include "Layers/xrRender/Shader.h"
Expand Down
7 changes: 7 additions & 0 deletions src/Layers/xrRenderPC_R3/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@

#pragma once

#ifdef _DEBUG
# define D3D_DEBUG_INFO
#endif

#pragma warning(disable:4995)
#include "xrEngine/stdafx.h"
#pragma warning(disable:4995)
#include <d3d9.h>
#include <d3dx9.h>
#pragma warning(default:4995)
#pragma warning(disable:4714)
#pragma warning( 4 : 4018 )
#pragma warning( 4 : 4244 )
#pragma warning(disable:4237)

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

#include <d3d10_1.h>
#include <d3d11.h>
#include <D3Dx10core.h>
Expand Down
6 changes: 6 additions & 0 deletions src/Layers/xrRenderPC_R4/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#pragma once

#ifdef _DEBUG
# define D3D_DEBUG_INFO
#endif

#pragma warning(disable:4995)
#include "xrEngine/stdafx.h"
#pragma warning(disable:4995)
Expand All @@ -14,6 +18,8 @@
#pragma warning( 4 : 4244 )
#pragma warning(disable:4237)

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

#include <D3D11.h>
#include <D3Dx11core.h>
#include <D3DCompiler.h>
Expand Down
11 changes: 1 addition & 10 deletions src/xrEngine/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
#include "xrCore/xrCore.h"
#include "Include/xrAPI/xrAPI.h"

#ifdef _DEBUG
# define D3D_DEBUG_INFO
#endif

#pragma warning(disable:4995)
#include <d3d9.h>
#pragma warning(default:4995)

#define ECORE_API

// Our headers
Expand All @@ -50,7 +42,6 @@ extern ENGINE_API CInifile* pGameIni;
#pragma comment(lib, "xrScriptEngine.lib")
#pragma comment( lib, "xrAPI.lib" )
#pragma comment( lib, "winmm.lib" )
#pragma comment( lib, "d3d9.lib" )
#pragma comment( lib, "dinput8.lib" )
#pragma comment( lib, "dxguid.lib" )

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

#endif // !M_BORLAND
#endif // !defined STDAFX_3DA
#endif // !defined STDAFX_3DA
2 changes: 1 addition & 1 deletion src/xrGame/CharacterPhysicsSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1449,4 +1449,4 @@ CPHSynchronize* CCharacterPhysicsSupport::PHGetSyncItem (u16 item)
return movement()->GetSyncItem();
else
return m_EntityAlife.CPhysicsShellHolder::PHGetSyncItem(item);
}
}
2 changes: 1 addition & 1 deletion src/xrGame/ik/IKLimb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,4 +1312,4 @@ void CIKLimb::BonesCallback2 ( CBoneInstance* B )
}
#endif
VERIFY2( _valid( B->mTransform ), "CIKLimb::BonesCallback2" );
}
}
2 changes: 1 addition & 1 deletion src/xrGame/imotion_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,4 +735,4 @@ void imotion_position::rootbone_callback ( CBoneInstance *BI )
KA->LL_BoneMatrixBuild( *BI, &Fidentity, keys );

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

0 comments on commit e87cb0d

Please sign in to comment.