https://git.reactos.org/?p=reactos.git;a=commitdiff;h=224d70bd0caae4d1b869e…
commit 224d70bd0caae4d1b869eb12b8fe90eb18917d40
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 22:52:25 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:03 2021 +0100
[WINESYNC] d3dx9: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 9fb5745a7997bbfe033779650f1193d85369cef2 by Alexandre Julliard
<julliard(a)winehq.org>
---
dll/directx/wine/d3dx9_36/animation.c | 2 --
dll/directx/wine/d3dx9_36/core.c | 2 --
dll/directx/wine/d3dx9_36/effect.c | 2 --
dll/directx/wine/d3dx9_36/font.c | 5 +----
dll/directx/wine/d3dx9_36/line.c | 2 --
dll/directx/wine/d3dx9_36/main.c | 2 --
dll/directx/wine/d3dx9_36/math.c | 4 ++--
dll/directx/wine/d3dx9_36/mesh.c | 18 ++++++------------
dll/directx/wine/d3dx9_36/preshader.c | 7 +------
dll/directx/wine/d3dx9_36/render.c | 2 --
dll/directx/wine/d3dx9_36/shader.c | 2 --
dll/directx/wine/d3dx9_36/skin.c | 2 --
dll/directx/wine/d3dx9_36/sprite.c | 2 --
dll/directx/wine/d3dx9_36/surface.c | 2 --
dll/directx/wine/d3dx9_36/texture.c | 2 --
dll/directx/wine/d3dx9_36/util.c | 2 --
dll/directx/wine/d3dx9_36/volume.c | 2 --
dll/directx/wine/d3dx9_36/xfile.c | 2 --
modules/rostests/winetests/d3dx9_36/math.c | 4 ++--
sdk/tools/winesync/d3dx9.cfg | 2 +-
20 files changed, 13 insertions(+), 55 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/animation.c
b/dll/directx/wine/d3dx9_36/animation.c
index 8cdc73cd163..01cc7d44046 100644
--- a/dll/directx/wine/d3dx9_36/animation.c
+++ b/dll/directx/wine/d3dx9_36/animation.c
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/core.c b/dll/directx/wine/d3dx9_36/core.c
index 6ef05dfc61f..c08a2310346 100644
--- a/dll/directx/wine/d3dx9_36/core.c
+++ b/dll/directx/wine/d3dx9_36/core.c
@@ -20,8 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index 5f35b8299f1..0d7a79a02bc 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -20,8 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include <stdio.h>
#include <assert.h>
diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c
index 13c63e11ee1..20c409c9026 100644
--- a/dll/directx/wine/d3dx9_36/font.c
+++ b/dll/directx/wine/d3dx9_36/font.c
@@ -20,11 +20,8 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
-#include "wine/unicode.h"
#endif /* __REACTOS__ */
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
@@ -270,7 +267,7 @@ HRESULT WINAPI D3DXCreateFontW(IDirect3DDevice9 *device, INT height,
UINT width,
desc.OutputPrecision=precision;
desc.Quality=quality;
desc.PitchAndFamily=pitchandfamily;
- if(facename != NULL) strcpyW(desc.FaceName, facename);
+ if(facename != NULL) lstrcpyW(desc.FaceName, facename);
else desc.FaceName[0] = '\0';
return D3DXCreateFontIndirectW(device, &desc, font);
diff --git a/dll/directx/wine/d3dx9_36/line.c b/dll/directx/wine/d3dx9_36/line.c
index 7f8ae320e81..5095e23ebe0 100644
--- a/dll/directx/wine/d3dx9_36/line.c
+++ b/dll/directx/wine/d3dx9_36/line.c
@@ -20,8 +20,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/main.c b/dll/directx/wine/d3dx9_36/main.c
index b0eabebeaa8..e0fc2d50332 100644
--- a/dll/directx/wine/d3dx9_36/main.c
+++ b/dll/directx/wine/d3dx9_36/main.c
@@ -23,8 +23,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "initguid.h"
#include "d3dx9_private.h"
diff --git a/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c
index 82ea788bf2f..cdc55feb64f 100644
--- a/dll/directx/wine/d3dx9_36/math.c
+++ b/dll/directx/wine/d3dx9_36/math.c
@@ -25,8 +25,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
+
+#include <float.h>
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c
index dcdae29098a..2b664a0e51c 100644
--- a/dll/directx/wine/d3dx9_36/mesh.c
+++ b/dll/directx/wine/d3dx9_36/mesh.c
@@ -28,20 +28,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include <assert.h>
-#ifdef HAVE_FLOAT_H
-# include <float.h>
-#endif
+#include <float.h>
#include "d3dx9_private.h"
#undef MAKE_DDHRESULT
#include "dxfile.h"
#include "rmxfguid.h"
#include "rmxftmpl.h"
-#include "wine/unicode.h"
#include "wine/list.h"
#endif /* __REACTOS__ */
@@ -1595,10 +1590,10 @@ static void fill_attribute_table(DWORD *attrib_buffer, DWORD
numfaces, void *ind
attrib_table_size++;
}
-static int attrib_entry_compare(const DWORD **a, const DWORD **b)
+static int attrib_entry_compare(const void *a, const void *b)
{
- const DWORD *ptr_a = *a;
- const DWORD *ptr_b = *b;
+ const DWORD *ptr_a = *(const DWORD **)a;
+ const DWORD *ptr_b = *(const DWORD **)b;
int delta = *ptr_a - *ptr_b;
if (delta)
@@ -1628,8 +1623,7 @@ static HRESULT remap_faces_for_attrsort(struct d3dx9_mesh *This,
const DWORD *in
for (i = 0; i < This->numfaces; i++)
sorted_attrib_ptr_buffer[i] = &attrib_buffer[i];
- qsort(sorted_attrib_ptr_buffer, This->numfaces,
sizeof(*sorted_attrib_ptr_buffer),
- (int(*)(const void *, const void *))attrib_entry_compare);
+ qsort(sorted_attrib_ptr_buffer, This->numfaces, sizeof(*sorted_attrib_ptr_buffer),
attrib_entry_compare);
for (i = 0; i < This->numfaces; i++)
{
@@ -6162,7 +6156,7 @@ HRESULT WINAPI D3DXCreateTextW(struct IDirect3DDevice9 *device, HDC
hdc, const W
}
oldfont = SelectObject(hdc, font);
- textlen = strlenW(text);
+ textlen = lstrlenW(text);
for (i = 0; i < textlen; i++)
{
int datasize = GetGlyphOutlineW(hdc, text[i], GGO_NATIVE, &gm, 0, NULL,
&identity);
diff --git a/dll/directx/wine/d3dx9_36/preshader.c
b/dll/directx/wine/d3dx9_36/preshader.c
index fe8a1332851..cf418b98879 100644
--- a/dll/directx/wine/d3dx9_36/preshader.c
+++ b/dll/directx/wine/d3dx9_36/preshader.c
@@ -19,12 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#include <float.h>
+#include <math.h>
#include <assert.h>
#endif /* __REACTOS__ */
@@ -135,11 +134,7 @@ static double pres_log(double *args, int n)
if (v == 0.0)
return 0.0;
else
-#ifdef HAVE_LOG2
return log2(v);
-#else
- return log(v) / log(2);
-#endif
}
static double pres_asin(double *args, int n) {return to_signed_nan(asin(args[0]));}
static double pres_acos(double *args, int n) {return to_signed_nan(acos(args[0]));}
diff --git a/dll/directx/wine/d3dx9_36/render.c b/dll/directx/wine/d3dx9_36/render.c
index 9586e2981b3..288dd859753 100644
--- a/dll/directx/wine/d3dx9_36/render.c
+++ b/dll/directx/wine/d3dx9_36/render.c
@@ -20,8 +20,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c
index b61770177d6..2d0649f3016 100644
--- a/dll/directx/wine/d3dx9_36/shader.c
+++ b/dll/directx/wine/d3dx9_36/shader.c
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#include "d3dcommon.h"
diff --git a/dll/directx/wine/d3dx9_36/skin.c b/dll/directx/wine/d3dx9_36/skin.c
index 1478d1ea358..70c0a6a1229 100644
--- a/dll/directx/wine/d3dx9_36/skin.c
+++ b/dll/directx/wine/d3dx9_36/skin.c
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/sprite.c b/dll/directx/wine/d3dx9_36/sprite.c
index 33c926d4326..277d14502fa 100644
--- a/dll/directx/wine/d3dx9_36/sprite.c
+++ b/dll/directx/wine/d3dx9_36/sprite.c
@@ -20,8 +20,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c
index aaaef34948f..c3c19e056be 100644
--- a/dll/directx/wine/d3dx9_36/surface.c
+++ b/dll/directx/wine/d3dx9_36/surface.c
@@ -21,8 +21,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c
index 4632e57950e..943e7fec06f 100644
--- a/dll/directx/wine/d3dx9_36/texture.c
+++ b/dll/directx/wine/d3dx9_36/texture.c
@@ -22,8 +22,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c
index 472758205b4..d15444e5cdc 100644
--- a/dll/directx/wine/d3dx9_36/util.c
+++ b/dll/directx/wine/d3dx9_36/util.c
@@ -20,8 +20,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/volume.c b/dll/directx/wine/d3dx9_36/volume.c
index 8d6f5434ddf..e1a6a3bc3cd 100644
--- a/dll/directx/wine/d3dx9_36/volume.c
+++ b/dll/directx/wine/d3dx9_36/volume.c
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#endif /* __REACTOS__ */
diff --git a/dll/directx/wine/d3dx9_36/xfile.c b/dll/directx/wine/d3dx9_36/xfile.c
index f75433bb4b0..1ac1a212d51 100644
--- a/dll/directx/wine/d3dx9_36/xfile.c
+++ b/dll/directx/wine/d3dx9_36/xfile.c
@@ -20,8 +20,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
#include "d3dx9_private.h"
#include "d3dx9xof.h"
diff --git a/modules/rostests/winetests/d3dx9_36/math.c
b/modules/rostests/winetests/d3dx9_36/math.c
index cd3ecfc076a..b9537b0d217 100644
--- a/modules/rostests/winetests/d3dx9_36/math.c
+++ b/modules/rostests/winetests/d3dx9_36/math.c
@@ -4046,7 +4046,7 @@ static void test_D3DXSHMultiply3(void)
D3DXSHMultiply3(c, c, b);
for (i = 0; i < ARRAY_SIZE(expected_aliased); ++i)
{
- equal = compare_float(c[i], expected_aliased[i], 32);
+ equal = compare_float(c[i], expected_aliased[i], 34);
ok(equal, "Expected[%u] = %.8e, received = %.8e.\n", i,
expected_aliased[i], c[i]);
}
}
@@ -4324,7 +4324,7 @@ static void test_D3DXSHRotateZ(void)
expected = ( i + 1.0f ) * ( i + 1.0f );
else
expected = table[36 * (l + 3 * j) + i];
- equal = compare_float(expected, out_temp[i], 256);
+ equal = compare_float(expected, out_temp[i], 512);
ok(equal || (fabs(expected) < 2.0e-5f && fabs(out_temp[i])
< 2.0e-5f),
"angle %.8e, order %u index %u, expected %.8e, received
%.8e.\n",
angle[j], order, i, expected, out_temp[i]);
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 421aaff1e59..1d7f99ec8c8 100644
--- a/sdk/tools/winesync/d3dx9.cfg
+++ b/sdk/tools/winesync/d3dx9.cfg
@@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h:
sdk/inc
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h:
sdk/include/dxsdk/d3dx9of.h,
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h:
sdk/include/dxsdk/d3dx9shape.h,
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h:
sdk/include/dxsdk/d3dx9xof.h}
-tags: {wine: a16ef96dc624edf2666aa125fbc1c197f5edcc1b}
+tags: {wine: 9fb5745a7997bbfe033779650f1193d85369cef2}