https://git.reactos.org/?p=reactos.git;a=commitdiff;h=edca86dadb24eacc868ad…
commit edca86dadb24eacc868ad2d8455eb84d83170fa1
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Mon Sep 21 16:30:14 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:01 2021 +0100
[D3DX9_XX] Use a common header for every file
---
dll/directx/wine/d3dx9_36/animation.c | 4 ++++
dll/directx/wine/d3dx9_36/core.c | 4 ++++
dll/directx/wine/d3dx9_36/d3dx9.cmake | 1 -
dll/directx/wine/d3dx9_36/effect.c | 4 ++++
dll/directx/wine/d3dx9_36/font.c | 4 ++++
dll/directx/wine/d3dx9_36/guid.c | 5 +++++
dll/directx/wine/d3dx9_36/line.c | 4 ++++
dll/directx/wine/d3dx9_36/main.c | 4 ++++
dll/directx/wine/d3dx9_36/math.c | 4 ++++
dll/directx/wine/d3dx9_36/mesh.c | 5 +++++
dll/directx/wine/d3dx9_36/precomp.h | 16 ++++++++++++----
dll/directx/wine/d3dx9_36/preshader.c | 4 ++++
dll/directx/wine/d3dx9_36/render.c | 4 ++++
dll/directx/wine/d3dx9_36/shader.c | 4 ++++
dll/directx/wine/d3dx9_36/skin.c | 4 ++++
dll/directx/wine/d3dx9_36/sprite.c | 4 ++++
dll/directx/wine/d3dx9_36/surface.c | 4 ++++
dll/directx/wine/d3dx9_36/texture.c | 4 ++++
dll/directx/wine/d3dx9_36/util.c | 4 ++++
dll/directx/wine/d3dx9_36/volume.c | 4 ++++
dll/directx/wine/d3dx9_36/xfile.c | 4 ++++
21 files changed, 90 insertions(+), 5 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/animation.c
b/dll/directx/wine/d3dx9_36/animation.c
index 6be2dd6b5a6..8cdc73cd163 100644
--- a/dll/directx/wine/d3dx9_36/animation.c
+++ b/dll/directx/wine/d3dx9_36/animation.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Animation Controller operations specific to D3DX9.
*
@@ -22,6 +25,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/core.c b/dll/directx/wine/d3dx9_36/core.c
index 1eb289ece6b..6ef05dfc61f 100644
--- a/dll/directx/wine/d3dx9_36/core.c
+++ b/dll/directx/wine/d3dx9_36/core.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
*
* Copyright 2002 Raphael Junqueira
@@ -21,6 +24,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/d3dx9.cmake
b/dll/directx/wine/d3dx9_36/d3dx9.cmake
index 95c5ca54d62..4140f00eca1 100644
--- a/dll/directx/wine/d3dx9_36/d3dx9.cmake
+++ b/dll/directx/wine/d3dx9_36/d3dx9.cmake
@@ -44,5 +44,4 @@ function(add_d3dx9_target __version)
add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all)
target_compile_definitions(${module} PRIVATE -DD3DX_SDK_VERSION=${__version}
-D__WINESRC__ -Dcopysignf=_copysignf)
- target_include_directories(${module} PRIVATE
${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
endfunction()
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index e8ae7b54c22..9a2e41ae90d 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright 2010 Christian Costa
* Copyright 2011 Rico Schüller
@@ -25,6 +28,7 @@
#include "d3dx9_private.h"
#include "d3dcompiler.h"
+#endif /* __REACTOS__ */
/* Constants for special INT/FLOAT conversation */
#define INT_FLOAT_MULTI 255.0f
diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c
index 418a3be3328..13c63e11ee1 100644
--- a/dll/directx/wine/d3dx9_36/font.c
+++ b/dll/directx/wine/d3dx9_36/font.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright (C) 2008 Tony Wasserka
*
@@ -22,6 +25,7 @@
#include "d3dx9_private.h"
#include "wine/unicode.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/guid.c b/dll/directx/wine/d3dx9_36/guid.c
index c43ee3c8b42..526bc124626 100644
--- a/dll/directx/wine/d3dx9_36/guid.c
+++ b/dll/directx/wine/d3dx9_36/guid.c
@@ -10,6 +10,11 @@
#include <winbase.h>
#include <wingdi.h>
#include <initguid.h>
+
#include <d3dx9.h>
+#include <wincodec.h>
+
+/* Wine-specific WIC GUIDs */
+DEFINE_GUID(GUID_WineContainerFormatTga,
0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22);
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
diff --git a/dll/directx/wine/d3dx9_36/line.c b/dll/directx/wine/d3dx9_36/line.c
index 356d54fbd0c..7f8ae320e81 100644
--- a/dll/directx/wine/d3dx9_36/line.c
+++ b/dll/directx/wine/d3dx9_36/line.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright 2010 Christian Costa
*
@@ -21,6 +24,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/main.c b/dll/directx/wine/d3dx9_36/main.c
index a256d425266..b0eabebeaa8 100644
--- a/dll/directx/wine/d3dx9_36/main.c
+++ b/dll/directx/wine/d3dx9_36/main.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Direct3D X 9 main file
*
@@ -25,6 +28,7 @@
#include "initguid.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c
index 08e51b765e7..82ea788bf2f 100644
--- a/dll/directx/wine/d3dx9_36/math.c
+++ b/dll/directx/wine/d3dx9_36/math.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Mathematical operations specific to D3DX9.
*
@@ -26,6 +29,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c
index acbb2477670..b4dab57bffd 100644
--- a/dll/directx/wine/d3dx9_36/mesh.c
+++ b/dll/directx/wine/d3dx9_36/mesh.c
@@ -1,3 +1,7 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#include <rmxftmpl.h>
+#else
/*
* Mesh operations specific to D3DX9.
*
@@ -39,6 +43,7 @@
#include "rmxftmpl.h"
#include "wine/unicode.h"
#include "wine/list.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/precomp.h b/dll/directx/wine/d3dx9_36/precomp.h
index 30ad1cf9184..543f90b6163 100644
--- a/dll/directx/wine/d3dx9_36/precomp.h
+++ b/dll/directx/wine/d3dx9_36/precomp.h
@@ -1,12 +1,12 @@
-#ifndef __WINE_D3DX9_36_PRECOMP_H
-#define __WINE_D3DX9_36_PRECOMP_H
+#pragma once
-#include <config.h>
+#include <wine/config.h>
#include <wine/port.h>
#include <assert.h>
#include <stdarg.h>
+#include <stdio.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
@@ -21,8 +21,16 @@
#include <wingdi.h>
#include <winuser.h>
+#include <wine/list.h>
#include <wine/unicode.h>
#include "d3dx9_private.h"
-#endif /* __WINE_D3DX9_36_PRECOMP_H */
+#include <dxfile.h>
+#include <rmxfguid.h>
+
+#include <d3dcommon.h>
+#include <d3dcompiler.h>
+
+#include <ole2.h>
+#include <wincodec.h>
diff --git a/dll/directx/wine/d3dx9_36/preshader.c
b/dll/directx/wine/d3dx9_36/preshader.c
index 1c38cff751d..c415397486f 100644
--- a/dll/directx/wine/d3dx9_36/preshader.c
+++ b/dll/directx/wine/d3dx9_36/preshader.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright 2016 Paul Gofman
*
@@ -23,6 +26,7 @@
#include <float.h>
#include <assert.h>
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/render.c b/dll/directx/wine/d3dx9_36/render.c
index ad8330784da..9586e2981b3 100644
--- a/dll/directx/wine/d3dx9_36/render.c
+++ b/dll/directx/wine/d3dx9_36/render.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright (C) 2012 Józef Kucia
*
@@ -21,6 +24,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c
index e8ce3dd796c..b61770177d6 100644
--- a/dll/directx/wine/d3dx9_36/shader.c
+++ b/dll/directx/wine/d3dx9_36/shader.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright 2008 Luis Busquets
* Copyright 2009 Matteo Bruni
@@ -24,6 +27,7 @@
#include "d3dx9_private.h"
#include "d3dcommon.h"
#include "d3dcompiler.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/skin.c b/dll/directx/wine/d3dx9_36/skin.c
index f197d33582a..1478d1ea358 100644
--- a/dll/directx/wine/d3dx9_36/skin.c
+++ b/dll/directx/wine/d3dx9_36/skin.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Skin Info operations specific to D3DX9.
*
@@ -22,6 +25,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/sprite.c b/dll/directx/wine/d3dx9_36/sprite.c
index 2ff2b415c81..33c926d4326 100644
--- a/dll/directx/wine/d3dx9_36/sprite.c
+++ b/dll/directx/wine/d3dx9_36/sprite.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright (C) 2008 Tony Wasserka
*
@@ -21,6 +24,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c
index cf8286ec758..92564dfb5ce 100644
--- a/dll/directx/wine/d3dx9_36/surface.c
+++ b/dll/directx/wine/d3dx9_36/surface.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright (C) 2009-2010 Tony Wasserka
* Copyright (C) 2012 Józef Kucia
@@ -26,6 +29,7 @@
#include "initguid.h"
#include "ole2.h"
#include "wincodec.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c
index e2dfab84205..4632e57950e 100644
--- a/dll/directx/wine/d3dx9_36/texture.c
+++ b/dll/directx/wine/d3dx9_36/texture.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright 2009 Tony Wasserka
* Copyright 2010 Christian Costa
@@ -23,6 +26,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c
index af71250b785..472758205b4 100644
--- a/dll/directx/wine/d3dx9_36/util.c
+++ b/dll/directx/wine/d3dx9_36/util.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright (C) 2009 Tony Wasserka
*
@@ -21,6 +24,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/volume.c b/dll/directx/wine/d3dx9_36/volume.c
index f07e552dbeb..8d6f5434ddf 100644
--- a/dll/directx/wine/d3dx9_36/volume.c
+++ b/dll/directx/wine/d3dx9_36/volume.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright 2010 Christian Costa
*
@@ -20,6 +23,7 @@
#include "wine/port.h"
#include "d3dx9_private.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
diff --git a/dll/directx/wine/d3dx9_36/xfile.c b/dll/directx/wine/d3dx9_36/xfile.c
index 157545482bf..fc44c7f391e 100644
--- a/dll/directx/wine/d3dx9_36/xfile.c
+++ b/dll/directx/wine/d3dx9_36/xfile.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Copyright (C) 2012 Christian Costa
*
@@ -24,6 +27,7 @@
#include "d3dx9xof.h"
#undef MAKE_DDHRESULT
#include "dxfile.h"
+#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);