[PATCH 2/2] d3dx9: Build without -DWINE_NO_LONG_TYPES.

Matteo Bruni wine at gitlab.winehq.org
Fri May 20 05:52:30 CDT 2022


From: Matteo Bruni <mbruni at codeweavers.com>

Based on a patch by Eric Pouech.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/d3dx9_24/Makefile.in |   2 +-
 dlls/d3dx9_25/Makefile.in |   2 +-
 dlls/d3dx9_26/Makefile.in |   2 +-
 dlls/d3dx9_27/Makefile.in |   2 +-
 dlls/d3dx9_28/Makefile.in |   2 +-
 dlls/d3dx9_29/Makefile.in |   2 +-
 dlls/d3dx9_30/Makefile.in |   2 +-
 dlls/d3dx9_31/Makefile.in |   2 +-
 dlls/d3dx9_32/Makefile.in |   2 +-
 dlls/d3dx9_33/Makefile.in |   2 +-
 dlls/d3dx9_34/Makefile.in |   2 +-
 dlls/d3dx9_35/Makefile.in |   2 +-
 dlls/d3dx9_36/Makefile.in |   2 +-
 dlls/d3dx9_36/animation.c |  22 ++--
 dlls/d3dx9_36/core.c      |   8 +-
 dlls/d3dx9_36/effect.c    | 179 ++++++++++++++++----------------
 dlls/d3dx9_36/font.c      |   8 +-
 dlls/d3dx9_36/line.c      |  10 +-
 dlls/d3dx9_36/math.c      |  30 +++---
 dlls/d3dx9_36/mesh.c      | 143 +++++++++++++-------------
 dlls/d3dx9_36/preshader.c |   8 +-
 dlls/d3dx9_36/render.c    |  50 ++++-----
 dlls/d3dx9_36/shader.c    |  65 ++++++------
 dlls/d3dx9_36/skin.c      | 112 +++++++++++----------
 dlls/d3dx9_36/sprite.c    |  12 +--
 dlls/d3dx9_36/surface.c   |  61 +++++------
 dlls/d3dx9_36/texture.c   | 207 +++++++++++++++++---------------------
 dlls/d3dx9_36/volume.c    |  87 ++++++----------
 dlls/d3dx9_36/xfile.c     |  28 +++---
 dlls/d3dx9_37/Makefile.in |   2 +-
 dlls/d3dx9_38/Makefile.in |   2 +-
 dlls/d3dx9_39/Makefile.in |   2 +-
 dlls/d3dx9_40/Makefile.in |   2 +-
 dlls/d3dx9_41/Makefile.in |   2 +-
 dlls/d3dx9_42/Makefile.in |   2 +-
 dlls/d3dx9_43/Makefile.in |   2 +-
 36 files changed, 514 insertions(+), 556 deletions(-)

diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
index 0d9b21b61bc..b43941c1942 100644
--- a/dlls/d3dx9_24/Makefile.in
+++ b/dlls/d3dx9_24/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=24
+EXTRADEFS = -DD3DX_SDK_VERSION=24
 MODULE    = d3dx9_24.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
index 11db983f118..9718cdea10b 100644
--- a/dlls/d3dx9_25/Makefile.in
+++ b/dlls/d3dx9_25/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=25
+EXTRADEFS = -DD3DX_SDK_VERSION=25
 MODULE    = d3dx9_25.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
index 64cd1d94b1f..5984411d137 100644
--- a/dlls/d3dx9_26/Makefile.in
+++ b/dlls/d3dx9_26/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=26
+EXTRADEFS = -DD3DX_SDK_VERSION=26
 MODULE    = d3dx9_26.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
index 367b64aa9b8..5484aebd010 100644
--- a/dlls/d3dx9_27/Makefile.in
+++ b/dlls/d3dx9_27/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=27
+EXTRADEFS = -DD3DX_SDK_VERSION=27
 MODULE    = d3dx9_27.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
index 57335e06477..14ea545fe3e 100644
--- a/dlls/d3dx9_28/Makefile.in
+++ b/dlls/d3dx9_28/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=28
+EXTRADEFS = -DD3DX_SDK_VERSION=28
 MODULE    = d3dx9_28.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
index a2728c4317c..796d905b86f 100644
--- a/dlls/d3dx9_29/Makefile.in
+++ b/dlls/d3dx9_29/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=29
+EXTRADEFS = -DD3DX_SDK_VERSION=29
 MODULE    = d3dx9_29.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
index bc7cb7574a7..36493d996b9 100644
--- a/dlls/d3dx9_30/Makefile.in
+++ b/dlls/d3dx9_30/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=30
+EXTRADEFS = -DD3DX_SDK_VERSION=30
 MODULE    = d3dx9_30.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
index a31a3de6f1f..9bbce4d35fd 100644
--- a/dlls/d3dx9_31/Makefile.in
+++ b/dlls/d3dx9_31/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=31
+EXTRADEFS = -DD3DX_SDK_VERSION=31
 MODULE    = d3dx9_31.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
index 85e401069cf..208a0718b42 100644
--- a/dlls/d3dx9_32/Makefile.in
+++ b/dlls/d3dx9_32/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=32
+EXTRADEFS = -DD3DX_SDK_VERSION=32
 MODULE    = d3dx9_32.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index 5f90b08265d..8b636303015 100644
--- a/dlls/d3dx9_33/Makefile.in
+++ b/dlls/d3dx9_33/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=33
+EXTRADEFS = -DD3DX_SDK_VERSION=33
 MODULE    = d3dx9_33.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
index 8c9fd380f26..31a698532a0 100644
--- a/dlls/d3dx9_34/Makefile.in
+++ b/dlls/d3dx9_34/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=34
+EXTRADEFS = -DD3DX_SDK_VERSION=34
 MODULE    = d3dx9_34.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
index 57bd49b9cf6..d1c02bd9564 100644
--- a/dlls/d3dx9_35/Makefile.in
+++ b/dlls/d3dx9_35/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=35
+EXTRADEFS = -DD3DX_SDK_VERSION=35
 MODULE    = d3dx9_35.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index 0b5891c23c5..88778b301ca 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=36
+EXTRADEFS = -DD3DX_SDK_VERSION=36
 MODULE    = d3dx9_36.dll
 IMPORTLIB = d3dx9
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c
index d0c7c069f35..822880e9e00 100644
--- a/dlls/d3dx9_36/animation.c
+++ b/dlls/d3dx9_36/animation.c
@@ -61,7 +61,7 @@ static ULONG WINAPI d3dx9_animation_controller_AddRef(ID3DXAnimationController *
     struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
     ULONG refcount = InterlockedIncrement(&animation->ref);
 
-    TRACE("%p increasing refcount to %u.\n", animation, refcount);
+    TRACE("%p increasing refcount to %lu.\n", animation, refcount);
 
     return refcount;
 }
@@ -71,7 +71,7 @@ static ULONG WINAPI d3dx9_animation_controller_Release(ID3DXAnimationController
     struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
     ULONG refcount = InterlockedDecrement(&animation->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", animation, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", animation, refcount);
 
     if (!refcount)
     {
@@ -321,7 +321,7 @@ static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_KeyTrackBlend(ID3DXAnim
 
 static HRESULT WINAPI d3dx9_animation_controller_UnkeyEvent(ID3DXAnimationController *iface, D3DXEVENTHANDLE event)
 {
-    FIXME("iface %p, event %u stub.\n", iface, event);
+    FIXME("iface %p, event %lu stub.\n", iface, event);
 
     return E_NOTIMPL;
 }
@@ -358,7 +358,7 @@ static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetCurrentPriorityBlend
 static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetUpcomingTrackEvent(ID3DXAnimationController *iface,
         UINT track, D3DXEVENTHANDLE event)
 {
-    FIXME("iface %p, track %u, event %u stub.\n", iface, track, event);
+    FIXME("iface %p, track %u, event %lu stub.\n", iface, track, event);
 
     return 0;
 }
@@ -366,14 +366,14 @@ static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetUpcomingTrackEvent(I
 static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetUpcomingPriorityBlend(ID3DXAnimationController *iface,
         D3DXEVENTHANDLE event)
 {
-    FIXME("iface %p, event %u stub.\n", iface, event);
+    FIXME("iface %p, event %lu stub.\n", iface, event);
 
     return 0;
 }
 
 static HRESULT WINAPI d3dx9_animation_controller_ValidateEvent(ID3DXAnimationController *iface, D3DXEVENTHANDLE event)
 {
-    FIXME("iface %p, event %u stub.\n", iface, event);
+    FIXME("iface %p, event %lu stub.\n", iface, event);
 
     return E_NOTIMPL;
 }
@@ -381,7 +381,7 @@ static HRESULT WINAPI d3dx9_animation_controller_ValidateEvent(ID3DXAnimationCon
 static HRESULT WINAPI d3dx9_animation_controller_GetEventDesc(ID3DXAnimationController *iface,
         D3DXEVENTHANDLE event, D3DXEVENT_DESC *desc)
 {
-    FIXME("iface %p, event %u, desc %p stub.\n", iface, event, desc);
+    FIXME("iface %p, event %lu, desc %p stub.\n", iface, event, desc);
 
     return E_NOTIMPL;
 }
@@ -510,7 +510,7 @@ static ULONG WINAPI d3dx9_keyframed_animation_AddRef(ID3DXKeyframedAnimationSet
     struct d3dx9_keyframed_animation_set *set = impl_from_ID3DXKeyframedAnimationSet(iface);
     ULONG refcount = InterlockedIncrement(&set->ref);
 
-    TRACE("%p increasing refcount to %u.\n", set, refcount);
+    TRACE("%p increasing refcount to %lu.\n", set, refcount);
 
     return refcount;
 }
@@ -520,7 +520,7 @@ static ULONG WINAPI d3dx9_keyframed_animation_Release(ID3DXKeyframedAnimationSet
     struct d3dx9_keyframed_animation_set *set = impl_from_ID3DXKeyframedAnimationSet(iface);
     ULONG refcount = InterlockedDecrement(&set->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", set, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", set, refcount);
 
     if (!refcount)
     {
@@ -596,7 +596,7 @@ static HRESULT WINAPI d3dx9_keyframed_animation_GetCallback(ID3DXKeyframedAnimat
 {
     struct d3dx9_keyframed_animation_set *set = impl_from_ID3DXKeyframedAnimationSet(iface);
 
-    FIXME("set %p, position %.16e, flags %#x, callback_position %p, callback_data %p stub.\n",
+    FIXME("set %p, position %.16e, flags %#lx, callback_position %p, callback_data %p stub.\n",
             set, position, flags, callback_position, callback_data);
     return E_NOTIMPL;
 }
@@ -803,7 +803,7 @@ static HRESULT WINAPI d3dx9_keyframed_animation_Compress(ID3DXKeyframedAnimation
 {
     struct d3dx9_keyframed_animation_set *set = impl_from_ID3DXKeyframedAnimationSet(iface);
 
-    FIXME("set %p, flags %#x, lossiness %.8e, hierarchy %p, compressed_data %p stub.\n",
+    FIXME("set %p, flags %#lx, lossiness %.8e, hierarchy %p, compressed_data %p stub.\n",
             set, flags, lossiness, hierarchy, compressed_data);
     return E_NOTIMPL;
 }
diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c
index 4c8070711c4..37f9d9aab8d 100644
--- a/dlls/d3dx9_36/core.c
+++ b/dlls/d3dx9_36/core.c
@@ -58,7 +58,7 @@ static ULONG WINAPI ID3DXBufferImpl_AddRef(ID3DXBuffer *iface)
     struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface);
     ULONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("%p increasing refcount to %u\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", This, ref);
 
     return ref;
 }
@@ -68,7 +68,7 @@ static ULONG WINAPI ID3DXBufferImpl_Release(ID3DXBuffer *iface)
     struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("%p decreasing refcount to %u\n", This, ref);
+    TRACE("%p decreasing refcount to %lu.\n", This, ref);
 
     if (ref == 0)
     {
@@ -129,7 +129,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer)
     struct ID3DXBufferImpl *object;
     HRESULT hr;
 
-    TRACE("size %u, buffer %p.\n", size, buffer);
+    TRACE("size %lu, buffer %p.\n", size, buffer);
 
     if (!buffer)
     {
@@ -144,7 +144,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer)
     hr = d3dx9_buffer_init(object, size);
     if (FAILED(hr))
     {
-        WARN("Failed to initialize buffer, hr %#x.\n", hr);
+        WARN("Failed to initialize buffer, hr %#lx.\n", hr);
         HeapFree(GetProcessHeap(), 0, object);
         return hr;
     }
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index b15ac514a1e..7719edd4f25 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -1636,11 +1636,11 @@ static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *p
     switch (state_table[state->operation].class)
     {
         case SC_RENDERSTATE:
-            TRACE("%s, operation %u, value %u.\n", state_table[state->operation].name,
+            TRACE("%s, operation %u, value %lu.\n", state_table[state->operation].name,
                     state_table[state->operation].op, *(DWORD *)param_value);
             return SET_D3D_STATE(effect, SetRenderState, state_table[state->operation].op, *(DWORD *)param_value);
         case SC_FVF:
-            TRACE("%s, value %#x.\n", state_table[state->operation].name, *(DWORD *)param_value);
+            TRACE("%s, value %#lx.\n", state_table[state->operation].name, *(DWORD *)param_value);
             return SET_D3D_STATE(effect, SetFVF, *(DWORD *)param_value);
         case SC_TEXTURE:
         {
@@ -1652,7 +1652,7 @@ static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *p
             return SET_D3D_STATE(effect, SetTexture, unit, *(IDirect3DBaseTexture9 **)param_value);
         }
         case SC_TEXTURESTAGE:
-            TRACE("%s, stage %u, value %u.\n", state_table[state->operation].name, state->index, *(DWORD *)param_value);
+            TRACE("%s, stage %u, value %lu.\n", state_table[state->operation].name, state->index, *(DWORD *)param_value);
             return SET_D3D_STATE(effect, SetTextureStageState, state->index,
                         state_table[state->operation].op, *(DWORD *)param_value);
         case SC_SETSAMPLER:
@@ -1677,7 +1677,7 @@ static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *p
             UINT sampler;
 
             sampler = parent_index == ~0u ? state->index : parent_index;
-            TRACE("%s, sampler %u, value %u.\n", state_table[state->operation].name, sampler, *(DWORD *)param_value);
+            TRACE("%s, sampler %u, value %lu.\n", state_table[state->operation].name, sampler, *(DWORD *)param_value);
             return SET_D3D_STATE(effect, SetSamplerState, sampler, state_table[state->operation].op,
                     *(DWORD *)param_value);
         }
@@ -1686,7 +1686,7 @@ static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *p
             if ((update_all || param_dirty)
                     && FAILED(hr = SET_D3D_STATE(effect, SetVertexShader,
                     *(IDirect3DVertexShader9 **)param_value)))
-                ERR("Could not set vertex shader, hr %#x.\n", hr);
+                ERR("Could not set vertex shader, hr %#lx.\n", hr);
             else if (*(IDirect3DVertexShader9 **)param_value)
                 hr = d3dx_set_shader_constants(effect, pass, param, TRUE, update_all || param_dirty);
             return hr;
@@ -1695,7 +1695,7 @@ static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *p
             if ((update_all || param_dirty)
                     && FAILED(hr = SET_D3D_STATE(effect, SetPixelShader,
                     *(IDirect3DPixelShader9 **)param_value)))
-                ERR("Could not set pixel shader, hr %#x.\n", hr);
+                ERR("Could not set pixel shader, hr %#lx.\n", hr);
             else if (*(IDirect3DPixelShader9 **)param_value)
                 hr = d3dx_set_shader_constants(effect, pass, param, FALSE, update_all || param_dirty);
             return hr;
@@ -1753,7 +1753,7 @@ static HRESULT d3dx9_apply_pass_states(struct d3dx_effect *effect, struct d3dx_p
     {
         if (FAILED(hr = d3dx9_apply_state(effect, pass, &pass->states[i], ~0u, update_all)))
         {
-            WARN("Error applying state, hr %#x.\n", hr);
+            WARN("Error applying state, hr %#lx.\n", hr);
             ret = hr;
         }
     }
@@ -1765,7 +1765,7 @@ static HRESULT d3dx9_apply_pass_states(struct d3dx_effect *effect, struct d3dx_p
             if ((effect->light_updated & (1u << i))
                     && FAILED(hr = SET_D3D_STATE(effect, SetLight, i, &effect->current_light[i])))
             {
-                WARN("Error setting light, hr %#x.\n", hr);
+                WARN("Error setting light, hr %#lx.\n", hr);
                 ret = hr;
             }
         }
@@ -1775,7 +1775,7 @@ static HRESULT d3dx9_apply_pass_states(struct d3dx_effect *effect, struct d3dx_p
     if (effect->material_updated
             && FAILED(hr = SET_D3D_STATE(effect, SetMaterial, &effect->current_material)))
     {
-        WARN("Error setting material, hr %#x.\n", hr);
+        WARN("Error setting material, hr %#lx.\n", hr);
         ret = hr;
     }
     effect->material_updated = FALSE;
@@ -1988,11 +1988,12 @@ static HRESULT WINAPI d3dx_effect_QueryInterface(ID3DXEffect *iface, REFIID riid
 
 static ULONG WINAPI d3dx_effect_AddRef(ID3DXEffect *iface)
 {
-    struct d3dx_effect *This = impl_from_ID3DXEffect(iface);
+    struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+    ULONG refcount = InterlockedIncrement(&effect->ref);
 
-    TRACE("(%p)->(): AddRef from %u\n", This, This->ref);
+    TRACE("%p increasing refcount to %lu.\n", effect, refcount);
 
-    return InterlockedIncrement(&This->ref);
+    return refcount;
 }
 
 static ULONG WINAPI d3dx_effect_Release(ID3DXEffect *iface)
@@ -2000,7 +2001,7 @@ static ULONG WINAPI d3dx_effect_Release(ID3DXEffect *iface)
     struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
     ULONG refcount = InterlockedDecrement(&effect->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", effect, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", effect, refcount);
 
     if (!refcount)
         d3dx_effect_cleanup(effect);
@@ -3788,7 +3789,7 @@ static HRESULT WINAPI d3dx_effect_ValidateTechnique(ID3DXEffect *iface, D3DXHAND
         }
     }
 done:
-    TRACE("Returning %#x.\n", ret);
+    TRACE("Returning %#lx.\n", ret);
     return ret;
 }
 
@@ -3962,12 +3963,12 @@ static HRESULT WINAPI d3dx_effect_Begin(ID3DXEffect *iface, UINT *passes, DWORD
     struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
     struct d3dx_technique *technique = effect->active_technique;
 
-    TRACE("iface %p, passes %p, flags %#x.\n", iface, passes, flags);
+    TRACE("iface %p, passes %p, flags %#lx.\n", iface, passes, flags);
 
     if (technique)
     {
         if (flags & ~(D3DXFX_DONOTSAVESTATE | D3DXFX_DONOTSAVESAMPLERSTATE | D3DXFX_DONOTSAVESHADERSTATE))
-            WARN("Invalid flags (%#x) specified.\n", flags);
+            WARN("Invalid flags %#lx specified.\n", flags);
 
         if (flags & D3DXFX_DONOTSAVESTATE)
         {
@@ -3985,15 +3986,15 @@ static HRESULT WINAPI d3dx_effect_Begin(ID3DXEffect *iface, UINT *passes, DWORD
                 manager = effect->manager;
                 effect->manager = NULL;
                 if (FAILED(hr = IDirect3DDevice9_BeginStateBlock(effect->device)))
-                    ERR("BeginStateBlock failed, hr %#x.\n", hr);
+                    ERR("BeginStateBlock failed, hr %#lx.\n", hr);
                 for (i = 0; i < technique->pass_count; i++)
                     d3dx9_apply_pass_states(effect, &technique->passes[i], TRUE);
                 if (FAILED(hr = IDirect3DDevice9_EndStateBlock(effect->device, &technique->saved_state)))
-                    ERR("EndStateBlock failed, hr %#x.\n", hr);
+                    ERR("EndStateBlock failed, hr %#lx.\n", hr);
                 effect->manager = manager;
             }
             if (FAILED(hr = IDirect3DStateBlock9_Capture(technique->saved_state)))
-                ERR("StateBlock Capture failed, hr %#x.\n", hr);
+                ERR("StateBlock Capture failed, hr %#lx.\n", hr);
         }
 
         if (passes)
@@ -4091,7 +4092,7 @@ static HRESULT WINAPI d3dx_effect_End(ID3DXEffect *iface)
         if (technique && technique->saved_state)
         {
             if (FAILED(hr = IDirect3DStateBlock9_Apply(technique->saved_state)))
-                ERR("State block apply failed, hr %#x.\n", hr);
+                ERR("State block apply failed, hr %#lx.\n", hr);
         }
         else
             ERR("No saved state.\n");
@@ -4567,7 +4568,7 @@ static ULONG WINAPI ID3DXEffectCompilerImpl_AddRef(ID3DXEffectCompiler *iface)
     struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface);
     ULONG refcount = InterlockedIncrement(&compiler->ref);
 
-    TRACE("%p increasing refcount to %u.\n", iface, refcount);
+    TRACE("%p increasing refcount to %lu.\n", iface, refcount);
 
     return refcount;
 }
@@ -4577,7 +4578,7 @@ static ULONG WINAPI ID3DXEffectCompilerImpl_Release(ID3DXEffectCompiler *iface)
     struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface);
     ULONG refcount = InterlockedDecrement(&compiler->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
 
     if (!refcount)
     {
@@ -5026,7 +5027,7 @@ static HRESULT WINAPI ID3DXEffectCompilerImpl_GetLiteral(ID3DXEffectCompiler *if
 static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileEffect(ID3DXEffectCompiler *iface, DWORD flags,
         ID3DXBuffer **effect, ID3DXBuffer **error_msgs)
 {
-    FIXME("iface %p, flags %#x, effect %p, error_msgs %p stub!\n", iface, flags, effect, error_msgs);
+    FIXME("iface %p, flags %#lx, effect %p, error_msgs %p stub!\n", iface, flags, effect, error_msgs);
 
     return E_NOTIMPL;
 }
@@ -5035,7 +5036,7 @@ static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileShader(ID3DXEffectCompiler
         const char *target, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_msgs,
         ID3DXConstantTable **constant_table)
 {
-    FIXME("iface %p, function %p, target %s, flags %#x, shader %p, error_msgs %p, constant_table %p stub!\n",
+    FIXME("iface %p, function %p, target %s, flags %#lx, shader %p, error_msgs %p, constant_table %p stub!\n",
             iface, function, debugstr_a(target), flags, shader, error_msgs, constant_table);
 
     return E_NOTIMPL;
@@ -6665,7 +6666,7 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev
     unsigned int tag;
     HRESULT hr;
 
-    TRACE("effect %p, device %p, data %p, data_size %lu, defines %p, include %p, flags %#x, errors %p, "
+    TRACE("effect %p, device %p, data %p, data_size %Iu, defines %p, include %p, flags %#x, errors %p, "
             "pool %p, skip_constants %s.\n",
             effect, device, data, data_size, defines, include, flags, errors, pool,
             debugstr_a(skip_constants_string));
@@ -6730,8 +6731,8 @@ HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *s
     struct d3dx_effect *object;
     HRESULT hr;
 
-    TRACE("device %p, srcdata %p, srcdatalen %u, defines %p, include %p,"
-            " skip_constants %p, flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+    TRACE("device %p, srcdata %p, srcdatalen %u, defines %p, include %p, "
+            "skip_constants %p, flags %#lx, pool %p, effect %p, compilation_errors %p.\n",
             device, srcdata, srcdatalen, defines, include,
             skip_constants, flags, pool, effect, compilation_errors);
 
@@ -6756,7 +6757,7 @@ HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *s
             (ID3DInclude *)include, flags, (ID3DBlob **)compilation_errors, pool, skip_constants);
     if (FAILED(hr))
     {
-        WARN("Failed to create effect object, hr %#x.\n", hr);
+        WARN("Failed to create effect object, hr %#lx.\n", hr);
         return hr;
     }
 
@@ -6767,22 +6768,23 @@ HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *s
     return D3D_OK;
 }
 
-HRESULT WINAPI D3DXCreateEffect(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
+HRESULT WINAPI D3DXCreateEffect(struct IDirect3DDevice9 *device, const void *data, UINT data_size,
         const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
-        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors)
+        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
-    TRACE("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): Forwarded to D3DXCreateEffectEx\n", device, srcdata, srcdatalen, defines,
-        include, flags, pool, effect, compilation_errors);
+    TRACE("device %p, data %p, data_size %u, defines %p, include %p, flags %#lx, pool %p, "
+            "effect %p, messages %p.\n", device, data, data_size, defines,
+            include, flags, pool, effect, messages);
 
-    return D3DXCreateEffectEx(device, srcdata, srcdatalen, defines, include, NULL, flags, pool, effect, compilation_errors);
+    return D3DXCreateEffectEx(device, data, data_size, defines, include, NULL, flags, pool, effect, messages);
 }
 
 static HRESULT d3dx9_effect_compiler_init(struct ID3DXEffectCompilerImpl *compiler,
         const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include,
-        UINT eflags, ID3DBlob **error_messages)
+        UINT eflags, ID3DBlob **messages)
 {
-    TRACE("compiler %p, data %p, data_size %lu, defines %p, include %p, eflags %#x, error_messages %p.\n",
-            compiler, data, data_size, defines, include, eflags, error_messages);
+    TRACE("compiler %p, data %p, data_size %Iu, defines %p, include %p, eflags %#x, messages %p.\n",
+            compiler, data, data_size, defines, include, eflags, messages);
 
     compiler->ID3DXEffectCompiler_iface.lpVtbl = &ID3DXEffectCompiler_Vtbl;
     compiler->ref = 1;
@@ -6792,16 +6794,16 @@ static HRESULT d3dx9_effect_compiler_init(struct ID3DXEffectCompilerImpl *compil
     return D3D_OK;
 }
 
-HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, const D3DXMACRO *defines,
-        ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **parse_errors)
+HRESULT WINAPI D3DXCreateEffectCompiler(const char *data, UINT data_size, const D3DXMACRO *defines,
+        ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **messages)
 {
     struct ID3DXEffectCompilerImpl *object;
     HRESULT hr;
 
-    TRACE("srcdata %p, srcdatalen %u, defines %p, include %p, flags %#x, compiler %p, parse_errors %p\n",
-            srcdata, srcdatalen, defines, include, flags, compiler, parse_errors);
+    TRACE("data %p, data_size %u, defines %p, include %p, flags %#lx, compiler %p, messages %p.\n",
+            data, data_size, defines, include, flags, compiler, messages);
 
-    if (!srcdata || !compiler)
+    if (!data || !compiler)
     {
         WARN("Invalid arguments supplied\n");
         return D3DERR_INVALIDCALL;
@@ -6811,8 +6813,8 @@ HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, co
     if (!object)
         return E_OUTOFMEMORY;
 
-    hr = d3dx9_effect_compiler_init(object, srcdata, srcdatalen, (const D3D_SHADER_MACRO *)defines,
-            (ID3DInclude *)include, flags, (ID3DBlob **)parse_errors);
+    hr = d3dx9_effect_compiler_init(object, data, data_size, (const D3D_SHADER_MACRO *)defines,
+            (ID3DInclude *)include, flags, (ID3DBlob **)messages);
     if (FAILED(hr))
     {
         WARN("Failed to initialize effect compiler\n");
@@ -6850,7 +6852,7 @@ static ULONG WINAPI d3dx_effect_pool_AddRef(ID3DXEffectPool *iface)
     struct d3dx_effect_pool *pool = impl_from_ID3DXEffectPool(iface);
     ULONG refcount = InterlockedIncrement(&pool->refcount);
 
-    TRACE("%p increasing refcount to %u.\n", pool, refcount);
+    TRACE("%p increasing refcount to %lu.\n", pool, refcount);
 
     return refcount;
 }
@@ -6887,7 +6889,7 @@ static ULONG WINAPI d3dx_effect_pool_Release(ID3DXEffectPool *iface)
     struct d3dx_effect_pool *pool = impl_from_ID3DXEffectPool(iface);
     ULONG refcount = InterlockedDecrement(&pool->refcount);
 
-    TRACE("%p decreasing refcount to %u.\n", pool, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", pool, refcount);
 
     if (!refcount)
         free_effect_pool(pool);
@@ -6935,7 +6937,7 @@ HRESULT WINAPI D3DXCreateEffectPool(ID3DXEffectPool **pool)
 
 HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
         const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags,
-        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     struct d3dx_include_from_file include_from_file;
     const void *buffer;
@@ -6944,9 +6946,9 @@ HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, cons
     HRESULT ret;
 
     TRACE("device %p, srcfile %s, defines %p, include %p, skipconstants %s, "
-            "flags %#x, pool %p, effect %p, compilationerrors %p.\n",
+            "flags %#lx, pool %p, effect %p, messages %p.\n",
             device, debugstr_w(srcfile), defines, include, debugstr_a(skipconstants),
-            flags, pool, effect, compilationerrors);
+            flags, pool, effect, messages);
 
     if (!device || !srcfile)
         return D3DERR_INVALIDCALL;
@@ -6973,7 +6975,7 @@ HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, cons
     }
 
     ret = D3DXCreateEffectEx(device, buffer, size, defines, include, skipconstants, flags, pool,
-            effect, compilationerrors);
+            effect, messages);
 
     ID3DXInclude_Close(include, buffer);
     LeaveCriticalSection(&from_file_mutex);
@@ -6983,16 +6985,16 @@ HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, cons
 
 HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile,
         const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags,
-        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     WCHAR *srcfileW;
     HRESULT ret;
     DWORD len;
 
     TRACE("device %p, srcfile %s, defines %p, include %p, skipconstants %s, "
-            "flags %#x, pool %p, effect %p, compilationerrors %p.\n",
+            "flags %#lx, pool %p, effect %p, messages %p.\n",
             device, debugstr_a(srcfile), defines, include, debugstr_a(skipconstants),
-            flags, pool, effect, compilationerrors);
+            flags, pool, effect, messages);
 
     if (!srcfile)
         return D3DERR_INVALIDCALL;
@@ -7001,7 +7003,7 @@ HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, cons
     srcfileW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*srcfileW));
     MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len);
 
-    ret = D3DXCreateEffectFromFileExW(device, srcfileW, defines, include, skipconstants, flags, pool, effect, compilationerrors);
+    ret = D3DXCreateEffectFromFileExW(device, srcfileW, defines, include, skipconstants, flags, pool, effect, messages);
     HeapFree(GetProcessHeap(), 0, srcfileW);
 
     return ret;
@@ -7009,32 +7011,34 @@ HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, cons
 
 HRESULT WINAPI D3DXCreateEffectFromFileW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
         const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool,
-        struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     TRACE("(void): relay\n");
-    return D3DXCreateEffectFromFileExW(device, srcfile, defines, include, NULL, flags, pool, effect, compilationerrors);
+    return D3DXCreateEffectFromFileExW(device, srcfile, defines, include, NULL, flags, pool,
+            effect, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectFromFileA(struct IDirect3DDevice9 *device, const char *srcfile,
         const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool,
-        struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     TRACE("(void): relay\n");
-    return D3DXCreateEffectFromFileExA(device, srcfile, defines, include, NULL, flags, pool, effect, compilationerrors);
+    return D3DXCreateEffectFromFileExA(device, srcfile, defines, include, NULL, flags, pool,
+            effect, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
         const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants,
-        DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     HRSRC resinfo;
     void *buffer;
     DWORD size;
 
     TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, skipconstants %s, "
-            "flags %#x, pool %p, effect %p, compilationerrors %p.\n",
+            "flags %#lx, pool %p, effect %p, messages %p.\n",
             device, srcmodule, debugstr_w(srcresource), defines, include, debugstr_a(skipconstants),
-            flags, pool, effect, compilationerrors);
+            flags, pool, effect, messages);
 
     if (!device)
         return D3DERR_INVALIDCALL;
@@ -7046,21 +7050,22 @@ HRESULT WINAPI D3DXCreateEffectFromResourceExW(struct IDirect3DDevice9 *device,
         return D3DXERR_INVALIDDATA;
 
     return D3DXCreateEffectEx(device, buffer, size, defines, include,
-            skipconstants, flags, pool, effect, compilationerrors);
+            skipconstants, flags, pool, effect, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
-        const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants,
-        DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
+        const char *skipconstants, DWORD flags, struct ID3DXEffectPool *pool,
+        struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     HRSRC resinfo;
     void *buffer;
     DWORD size;
 
     TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, skipconstants %s, "
-            "flags %#x, pool %p, effect %p, compilationerrors %p.\n",
+            "flags %#lx, pool %p, effect %p, messages %p.\n",
             device, srcmodule, debugstr_a(srcresource), defines, include, debugstr_a(skipconstants),
-            flags, pool, effect, compilationerrors);
+            flags, pool, effect, messages);
 
     if (!device)
         return D3DERR_INVALIDCALL;
@@ -7072,34 +7077,36 @@ HRESULT WINAPI D3DXCreateEffectFromResourceExA(struct IDirect3DDevice9 *device,
         return D3DXERR_INVALIDDATA;
 
     return D3DXCreateEffectEx(device, buffer, size, defines, include,
-            skipconstants, flags, pool, effect, compilationerrors);
+            skipconstants, flags, pool, effect, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectFromResourceW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
         const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
-        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     TRACE("(void): relay\n");
-    return D3DXCreateEffectFromResourceExW(device, srcmodule, srcresource, defines, include, NULL, flags, pool, effect, compilationerrors);
+    return D3DXCreateEffectFromResourceExW(device, srcmodule, srcresource, defines, include, NULL,
+            flags, pool, effect, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
         const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
-        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
+        struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **messages)
 {
     TRACE("(void): relay\n");
-    return D3DXCreateEffectFromResourceExA(device, srcmodule, srcresource, defines, include, NULL, flags, pool, effect, compilationerrors);
+    return D3DXCreateEffectFromResourceExA(device, srcmodule, srcresource, defines, include, NULL,
+            flags, pool, effect, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3DXMACRO *defines,
-        ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
+        ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **messages)
 {
     void *buffer;
     HRESULT ret;
     DWORD size;
 
-    TRACE("srcfile %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n",
-            debugstr_w(srcfile), defines, include, flags, effectcompiler, parseerrors);
+    TRACE("srcfile %s, defines %p, include %p, flags %#lx, compiler %p, messages %p.\n",
+            debugstr_w(srcfile), defines, include, flags, compiler, messages);
 
     if (!srcfile)
         return D3DERR_INVALIDCALL;
@@ -7109,21 +7116,21 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3D
     if (FAILED(ret))
         return D3DXERR_INVALIDDATA;
 
-    ret = D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors);
+    ret = D3DXCreateEffectCompiler(buffer, size, defines, include, flags, compiler, messages);
     UnmapViewOfFile(buffer);
 
     return ret;
 }
 
 HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DXMACRO *defines,
-        ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
+        ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **messages)
 {
     WCHAR *srcfileW;
     HRESULT ret;
     DWORD len;
 
-    TRACE("srcfile %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n",
-            debugstr_a(srcfile), defines, include, flags, effectcompiler, parseerrors);
+    TRACE("srcfile %s, defines %p, include %p, flags %#lx, compiler %p, messages %p.\n",
+            debugstr_a(srcfile), defines, include, flags, compiler, messages);
 
     if (!srcfile)
         return D3DERR_INVALIDCALL;
@@ -7132,7 +7139,7 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DX
     srcfileW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*srcfileW));
     MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len);
 
-    ret = D3DXCreateEffectCompilerFromFileW(srcfileW, defines, include, flags, effectcompiler, parseerrors);
+    ret = D3DXCreateEffectCompilerFromFileW(srcfileW, defines, include, flags, compiler, messages);
     HeapFree(GetProcessHeap(), 0, srcfileW);
 
     return ret;
@@ -7140,14 +7147,14 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DX
 
 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const char *srcresource,
         const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
-        ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
+        ID3DXEffectCompiler **compiler, ID3DXBuffer **messages)
 {
     HRSRC resinfo;
     void *buffer;
     DWORD size;
 
-    TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n",
-            srcmodule, debugstr_a(srcresource), defines, include, flags, effectcompiler, parseerrors);
+    TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#lx, compiler %p, messages %p.\n",
+            srcmodule, debugstr_a(srcresource), defines, include, flags, compiler, messages);
 
     if (!(resinfo = FindResourceA(srcmodule, srcresource, (const char *)RT_RCDATA)))
         return D3DXERR_INVALIDDATA;
@@ -7155,19 +7162,19 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const ch
     if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size)))
         return D3DXERR_INVALIDDATA;
 
-    return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors);
+    return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, compiler, messages);
 }
 
 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WCHAR *srcresource,
         const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
-        ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
+        ID3DXEffectCompiler **compiler, ID3DXBuffer **messages)
 {
     HRSRC resinfo;
     void *buffer;
     DWORD size;
 
-    TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n",
-            srcmodule, debugstr_w(srcresource), defines, include, flags, effectcompiler, parseerrors);
+    TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#lx, compiler %p, messages %p.\n",
+            srcmodule, debugstr_w(srcresource), defines, include, flags, compiler, messages);
 
     if (!(resinfo = FindResourceW(srcmodule, srcresource, (const WCHAR *)RT_RCDATA)))
         return D3DXERR_INVALIDDATA;
@@ -7175,7 +7182,7 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WC
     if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size)))
         return D3DXERR_INVALIDDATA;
 
-    return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors);
+    return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, compiler, messages);
 }
 
 HRESULT WINAPI D3DXDisassembleEffect(ID3DXEffect *effect, BOOL enable_color_code, ID3DXBuffer **disassembly)
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
index 13cffe4c514..daab0b219c3 100644
--- a/dlls/d3dx9_36/font.c
+++ b/dlls/d3dx9_36/font.c
@@ -97,7 +97,7 @@ static ULONG WINAPI ID3DXFontImpl_AddRef(ID3DXFont *iface)
     struct d3dx_font *font = impl_from_ID3DXFont(iface);
     ULONG ref = InterlockedIncrement(&font->ref);
 
-    TRACE("%p increasing refcount to %u\n", iface, ref);
+    TRACE("%p increasing refcount to %lu.\n", iface, ref);
     return ref;
 }
 
@@ -107,7 +107,7 @@ static ULONG WINAPI ID3DXFontImpl_Release(ID3DXFont *iface)
     ULONG ref = InterlockedDecrement(&font->ref);
     unsigned int i;
 
-    TRACE("%p decreasing refcount to %u\n", iface, ref);
+    TRACE("%p decreasing refcount to %lu.\n", iface, ref);
 
     if (!ref)
     {
@@ -486,7 +486,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextA(ID3DXFont *iface, ID3DXSprite *sprite,
     int ret, countW;
     WCHAR *wstr;
 
-    TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x.\n",
+    TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#lx, color 0x%08lx.\n",
           iface,  sprite, debugstr_an(string, count), count, wine_dbgstr_rect(rect), format, color);
 
     if (!string || !count)
@@ -658,7 +658,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
     WCHAR *line;
     SIZE size;
 
-    TRACE("iface %p, sprite %p, string %s, in_count %d, rect %s, format %#x, color 0x%08x.\n",
+    TRACE("iface %p, sprite %p, string %s, in_count %d, rect %s, format %#lx, color 0x%08lx.\n",
           iface,  sprite, debugstr_wn(string, in_count), in_count, wine_dbgstr_rect(rect), format, color);
 
     if (!string)
diff --git a/dlls/d3dx9_36/line.c b/dlls/d3dx9_36/line.c
index 647eb1b5b2a..8cf17eb9511 100644
--- a/dlls/d3dx9_36/line.c
+++ b/dlls/d3dx9_36/line.c
@@ -60,7 +60,7 @@ static ULONG WINAPI d3dx9_line_AddRef(ID3DXLine *iface)
     struct d3dx9_line *line = impl_from_ID3DXLine(iface);
     ULONG refcount = InterlockedIncrement(&line->ref);
 
-    TRACE("%p increasing refcount to %u.\n", line, refcount);
+    TRACE("%p increasing refcount to %lu.\n", line, refcount);
 
     return refcount;
 }
@@ -70,7 +70,7 @@ static ULONG WINAPI d3dx9_line_Release(ID3DXLine *iface)
     struct d3dx9_line *line = impl_from_ID3DXLine(iface);
     ULONG refcount = InterlockedDecrement(&line->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", line, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", line, refcount);
 
     if (!refcount)
     {
@@ -148,7 +148,7 @@ failed:
 static HRESULT WINAPI d3dx9_line_Draw(ID3DXLine *iface, const D3DXVECTOR2 *vertex_list,
         DWORD vertex_list_count, D3DCOLOR color)
 {
-    FIXME("iface %p, vertex_list %p, vertex_list_count %u, color 0x%08x stub!\n",
+    FIXME("iface %p, vertex_list %p, vertex_list_count %lu, color 0x%08lx stub!\n",
             iface, vertex_list, vertex_list_count, color);
 
     return E_NOTIMPL;
@@ -157,7 +157,7 @@ static HRESULT WINAPI d3dx9_line_Draw(ID3DXLine *iface, const D3DXVECTOR2 *verte
 static HRESULT WINAPI d3dx9_line_DrawTransform(ID3DXLine *iface, const D3DXVECTOR3 *vertex_list,
         DWORD vertex_list_count, const D3DXMATRIX *transform, D3DCOLOR color)
 {
-    FIXME("iface %p, vertex_list %p, vertex_list_count %u, transform %p, color 0x%08x stub!\n",
+    FIXME("iface %p, vertex_list %p, vertex_list_count %lu, transform %p, color 0x%08lx stub!\n",
             iface, vertex_list, vertex_list_count, transform, color);
 
     return E_NOTIMPL;
@@ -165,7 +165,7 @@ static HRESULT WINAPI d3dx9_line_DrawTransform(ID3DXLine *iface, const D3DXVECTO
 
 static HRESULT WINAPI d3dx9_line_SetPattern(ID3DXLine *iface, DWORD pattern)
 {
-    FIXME("iface %p, pattern 0x%08x stub!\n", iface, pattern);
+    FIXME("iface %p, pattern 0x%08lx stub!\n", iface, pattern);
 
     return E_NOTIMPL;
 }
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index b6f0bed38ad..06fa6477eb1 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -913,23 +913,25 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *ifac
 
 static ULONG WINAPI ID3DXMatrixStackImpl_AddRef(ID3DXMatrixStack *iface)
 {
-    struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
-    TRACE("(%p) : AddRef from %d\n", This, ref - 1);
-    return ref;
+    struct ID3DXMatrixStackImpl *stack = impl_from_ID3DXMatrixStack(iface);
+    ULONG refcount = InterlockedIncrement(&stack->ref);
+
+    TRACE("%p increasing refcount to %lu.\n", iface, refcount);
+    return refcount;
 }
 
 static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack *iface)
 {
-    struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
-    if (!ref)
+    struct ID3DXMatrixStackImpl *stack = impl_from_ID3DXMatrixStack(iface);
+    ULONG refcount = InterlockedDecrement(&stack->ref);
+
+    TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
+    if (!refcount)
     {
-        HeapFree(GetProcessHeap(), 0, This->stack);
-        HeapFree(GetProcessHeap(), 0, This);
+        HeapFree(GetProcessHeap(), 0, stack->stack);
+        HeapFree(GetProcessHeap(), 0, stack);
     }
-    TRACE("(%p) : ReleaseRef to %d\n", This, ref);
-    return ref;
+    return refcount;
 }
 
 static D3DXMATRIX* WINAPI ID3DXMatrixStackImpl_GetTop(ID3DXMatrixStack *iface)
@@ -1170,7 +1172,7 @@ HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, ID3DXMatrixStack **stack)
 {
     struct ID3DXMatrixStackImpl *object;
 
-    TRACE("flags %#x, stack %p.\n", flags, stack);
+    TRACE("flags %#lx, stack %p.\n", flags, stack);
 
     if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
     {
@@ -3010,7 +3012,7 @@ HRESULT WINAPI D3DXSHProjectCubeMap(unsigned int order, IDirect3DCubeTexture9 *t
 
     if (FAILED(hr = IDirect3DCubeTexture9_GetLevelDesc(texture, 0, &desc)))
     {
-        ERR("Failed to get level desc, hr %#x.\n", hr);
+        ERR("Failed to get level desc, hr %#lx.\n", hr);
         return hr;
     }
 
@@ -3036,7 +3038,7 @@ HRESULT WINAPI D3DXSHProjectCubeMap(unsigned int order, IDirect3DCubeTexture9 *t
 
         if (FAILED(hr = IDirect3DCubeTexture9_LockRect(texture, face, 0, &map_desc, NULL, D3DLOCK_READONLY)))
         {
-            ERR("Failed to map texture, hr %#x.\n", hr);
+            ERR("Failed to map texture, hr %#lx.\n", hr);
             free(temp);
             return hr;
         }
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 7252e2f8fdd..f033ac14cb7 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -108,7 +108,7 @@ static ULONG WINAPI d3dx9_mesh_AddRef(ID3DXMesh *iface)
     struct d3dx9_mesh *mesh = impl_from_ID3DXMesh(iface);
     ULONG refcount = InterlockedIncrement(&mesh->ref);
 
-    TRACE("%p increasing refcount to %u.\n", mesh, refcount);
+    TRACE("%p increasing refcount to %lu.\n", mesh, refcount);
 
     return refcount;
 }
@@ -118,7 +118,7 @@ static ULONG WINAPI d3dx9_mesh_Release(ID3DXMesh *iface)
     struct d3dx9_mesh *mesh = impl_from_ID3DXMesh(iface);
     ULONG refcount = InterlockedDecrement(&mesh->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", mesh, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", mesh, refcount);
 
     if (!refcount)
     {
@@ -143,7 +143,7 @@ static HRESULT WINAPI d3dx9_mesh_DrawSubset(ID3DXMesh *iface, DWORD attrib_id)
     DWORD face_end = 0;
     DWORD vertex_size;
 
-    TRACE("iface %p, attrib_id %u.\n", iface, attrib_id);
+    TRACE("iface %p, attrib_id %lu.\n", iface, attrib_id);
 
     if (!This->vertex_declaration)
     {
@@ -267,7 +267,7 @@ static HRESULT WINAPI d3dx9_mesh_CloneMeshFVF(struct ID3DXMesh *iface, DWORD opt
     HRESULT hr;
     D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE];
 
-    TRACE("iface %p, options %#x, fvf %#x, device %p, clone_mesh %p.\n",
+    TRACE("iface %p, options %#lx, fvf %#lx, device %p, clone_mesh %p.\n",
             iface, options, fvf, device, clone_mesh);
 
     if (FAILED(hr = D3DXDeclaratorFromFVF(fvf, declaration)))
@@ -681,7 +681,7 @@ static HRESULT WINAPI d3dx9_mesh_CloneMesh(struct ID3DXMesh *iface, DWORD option
     HRESULT hr;
     BOOL same_declaration;
 
-    TRACE("iface %p, options %#x, declaration %p, device %p, clone_mesh_out %p.\n",
+    TRACE("iface %p, options %#lx, declaration %p, device %p, clone_mesh_out %p.\n",
             iface, options, declaration, device, clone_mesh_out);
 
     if (!clone_mesh_out)
@@ -800,7 +800,7 @@ static HRESULT WINAPI d3dx9_mesh_LockVertexBuffer(ID3DXMesh *iface, DWORD flags,
 {
     struct d3dx9_mesh *mesh = impl_from_ID3DXMesh(iface);
 
-    TRACE("iface %p, flags %#x, data %p.\n", iface, flags, data);
+    TRACE("iface %p, flags %#lx, data %p.\n", iface, flags, data);
 
     return IDirect3DVertexBuffer9_Lock(mesh->vertex_buffer, 0, 0, data, flags);
 }
@@ -818,7 +818,7 @@ static HRESULT WINAPI d3dx9_mesh_LockIndexBuffer(ID3DXMesh *iface, DWORD flags,
 {
     struct d3dx9_mesh *mesh = impl_from_ID3DXMesh(iface);
 
-    TRACE("iface %p, flags %#x, data %p.\n", iface, flags, data);
+    TRACE("iface %p, flags %#lx, data %p.\n", iface, flags, data);
 
     return IDirect3DIndexBuffer9_Lock(mesh->index_buffer, 0, 0, data, flags);
 }
@@ -1415,7 +1415,7 @@ static HRESULT WINAPI d3dx9_mesh_LockAttributeBuffer(ID3DXMesh *iface, DWORD fla
 {
     struct d3dx9_mesh *mesh = impl_from_ID3DXMesh(iface);
 
-    TRACE("iface %p, flags %#x, data %p.\n", iface, flags, data);
+    TRACE("iface %p, flags %#lx, data %p.\n", iface, flags, data);
 
     InterlockedIncrement(&mesh->attrib_buffer_lock_count);
 
@@ -1457,7 +1457,7 @@ static HRESULT WINAPI d3dx9_mesh_Optimize(ID3DXMesh *iface, DWORD flags, const D
     D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE] = { D3DDECL_END() };
     ID3DXMesh *optimized_mesh;
 
-    TRACE("iface %p, flags %#x, adjacency_in %p, adjacency_out %p, face_remap %p, vertex_remap %p, opt_mesh %p.\n",
+    TRACE("iface %p, flags %#lx, adjacency_in %p, adjacency_out %p, face_remap %p, vertex_remap %p, opt_mesh %p.\n",
             iface, flags, adjacency_in, adjacency_out, face_remap, vertex_remap, opt_mesh);
 
     if (!opt_mesh)
@@ -1640,7 +1640,7 @@ static HRESULT WINAPI d3dx9_mesh_OptimizeInplace(ID3DXMesh *iface, DWORD flags,
     DWORD *sorted_attrib_buffer = NULL;
     DWORD i;
 
-    TRACE("iface %p, flags %#x, adjacency_in %p, adjacency_out %p, face_remap_out %p, vertex_remap_out %p.\n",
+    TRACE("iface %p, flags %#lx, adjacency_in %p, adjacency_out %p, face_remap_out %p, vertex_remap_out %p.\n",
             iface, flags, adjacency_in, adjacency_out, face_remap_out, vertex_remap_out);
 
     if (!flags)
@@ -1824,7 +1824,7 @@ static HRESULT WINAPI d3dx9_mesh_SetAttributeTable(ID3DXMesh *iface,
     struct d3dx9_mesh *mesh = impl_from_ID3DXMesh(iface);
     D3DXATTRIBUTERANGE *new_table = NULL;
 
-    TRACE("iface %p, attrib_table %p, attrib_table_size %u.\n", iface, attrib_table, attrib_table_size);
+    TRACE("iface %p, attrib_table %p, attrib_table_size %lu.\n", iface, attrib_table, attrib_table_size);
 
     if (attrib_table_size) {
         size_t size = attrib_table_size * sizeof(*attrib_table);
@@ -2026,7 +2026,7 @@ HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD fvf, D3DVERTEXELEMENT9 declaration[MA
     unsigned int idx = 0;
     unsigned int i;
 
-    TRACE("fvf %#x, declaration %p.\n", fvf, declaration);
+    TRACE("fvf %#lx, declaration %p.\n", fvf, declaration);
 
     if (fvf & (D3DFVF_RESERVED0 | D3DFVF_RESERVED2)) return D3DERR_INVALIDCALL;
 
@@ -2066,7 +2066,7 @@ HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD fvf, D3DVERTEXELEMENT9 declaration[MA
                     append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT4, D3DDECLUSAGE_BLENDWEIGHT, 0);
                     break;
                  default:
-                     ERR("Invalid blend count %u.\n", blend_count);
+                     ERR("Invalid blend count %lu.\n", blend_count);
                      break;
             }
 
@@ -2310,7 +2310,7 @@ UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_id
     const D3DVERTEXELEMENT9 *element;
     UINT size = 0;
 
-    TRACE("decl %p, stream_idx %u\n", decl, stream_idx);
+    TRACE("decl %p, stream_idx %lu.\n", decl, stream_idx);
 
     if (!decl) return 0;
 
@@ -2434,7 +2434,7 @@ HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
     D3DPOOL vertex_pool = D3DPOOL_DEFAULT;
     int i;
 
-    TRACE("numfaces %u, numvertices %u, options %#x, declaration %p, device %p, mesh %p.\n",
+    TRACE("numfaces %lu, numvertices %lu, options %#lx, declaration %p, device %p, mesh %p.\n",
             numfaces, numvertices, options, declaration, device, mesh);
 
     if (numfaces == 0 || numvertices == 0 || declaration == NULL || device == NULL || mesh == NULL ||
@@ -2498,43 +2498,26 @@ HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
         fvf = 0;
     }
 
-    /* Create vertex declaration */
-    hr = IDirect3DDevice9_CreateVertexDeclaration(device,
-                                                  declaration,
-                                                  &vertex_declaration);
-    if (FAILED(hr))
+    if (FAILED(hr = IDirect3DDevice9_CreateVertexDeclaration(device, declaration, &vertex_declaration)))
     {
-        WARN("Unexpected return value %x from IDirect3DDevice9_CreateVertexDeclaration.\n",hr);
+        WARN("Failed to create vertex declaration, hr %#lx.\n", hr);
         return hr;
     }
     vertex_declaration_size = D3DXGetDeclVertexSize(declaration, declaration[0].Stream);
 
-    /* Create vertex buffer */
-    hr = IDirect3DDevice9_CreateVertexBuffer(device,
-                                             numvertices * vertex_declaration_size,
-                                             vertex_usage,
-                                             fvf,
-                                             vertex_pool,
-                                             &vertex_buffer,
-                                             NULL);
-    if (FAILED(hr))
+    if (FAILED(hr = IDirect3DDevice9_CreateVertexBuffer(device, numvertices * vertex_declaration_size,
+            vertex_usage, fvf, vertex_pool, &vertex_buffer, NULL)))
     {
-        WARN("Unexpected return value %x from IDirect3DDevice9_CreateVertexBuffer.\n",hr);
+        WARN("Failed to create vertex buffer, hr %#lx.\n", hr);
         IDirect3DVertexDeclaration9_Release(vertex_declaration);
         return hr;
     }
 
-    /* Create index buffer */
-    hr = IDirect3DDevice9_CreateIndexBuffer(device,
-                                            numfaces * 3 * ((index_format == D3DFMT_INDEX16) ? 2 : 4),
-                                            index_usage,
-                                            index_format,
-                                            index_pool,
-                                            &index_buffer,
-                                            NULL);
-    if (FAILED(hr))
+    if (FAILED(hr = IDirect3DDevice9_CreateIndexBuffer(device,
+            numfaces * 3 * ((index_format == D3DFMT_INDEX16) ? 2 : 4), index_usage, index_format,
+            index_pool, &index_buffer, NULL)))
     {
-        WARN("Unexpected return value %x from IDirect3DDevice9_CreateVertexBuffer.\n",hr);
+        WARN("Failed to create index buffer, hr %#lx.\n", hr);
         IDirect3DVertexBuffer9_Release(vertex_buffer);
         IDirect3DVertexDeclaration9_Release(vertex_declaration);
         return hr;
@@ -2578,18 +2561,19 @@ HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
 /*************************************************************************
  * D3DXCreateMeshFVF
  */
-HRESULT WINAPI D3DXCreateMeshFVF(DWORD numfaces, DWORD numvertices, DWORD options,
+HRESULT WINAPI D3DXCreateMeshFVF(DWORD face_count, DWORD vertex_count, DWORD options,
         DWORD fvf, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh)
 {
     HRESULT hr;
     D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE];
 
-    TRACE("(%u, %u, %u, %u, %p, %p)\n", numfaces, numvertices, options, fvf, device, mesh);
+    TRACE("face_count %lu, vertex_count %lu, options %#lx, fvf %#lx, device %p, mesh %p.\n",
+            face_count, vertex_count, options, fvf, device, mesh);
 
     hr = D3DXDeclaratorFromFVF(fvf, declaration);
     if (FAILED(hr)) return hr;
 
-    return D3DXCreateMesh(numfaces, numvertices, options, declaration, device, mesh);
+    return D3DXCreateMesh(face_count, vertex_count, options, declaration, device, mesh);
 }
 
 
@@ -2643,7 +2627,7 @@ static HRESULT parse_texture_filename(ID3DXFileData *filedata, char **filename_o
     /* FIXME: String must be retrieved directly instead of through a pointer once ID3DXFILE is fixed */
     if (data_size < sizeof(filename_in))
     {
-        WARN("truncated data (%lu bytes)\n", data_size);
+        WARN("Truncated data (%Iu bytes).\n", data_size);
         filedata->lpVtbl->Unlock(filedata);
         return E_FAIL;
     }
@@ -2697,8 +2681,9 @@ static HRESULT parse_material(ID3DXFileData *filedata, D3DXMATERIAL *material)
      *     [ ... ]
      * }
      */
-    if (data_size != sizeof(FLOAT) * 11) {
-        WARN("incorrect data size (%ld bytes)\n", data_size);
+    if (data_size != sizeof(float) * 11)
+    {
+        WARN("Incorrect data size (%Id bytes).\n", data_size);
         filedata->lpVtbl->Unlock(filedata);
         return E_FAIL;
     }
@@ -3498,8 +3483,10 @@ HRESULT WINAPI D3DXLoadSkinMeshFromXof(struct ID3DXFileData *filedata, DWORD opt
     BYTE *out_ptr;
     DWORD provide_flags = 0;
 
-    TRACE("(%p, %x, %p, %p, %p, %p, %p, %p, %p)\n", filedata, options, device, adjacency_out, materials_out,
-          effects_out, num_materials_out, skin_info_out, mesh_out);
+    TRACE("filedata %p, options %#lx, device %p, adjacency_out %p, materials_out %p, "
+            "effects_out %p, num_materials_out %p, skin_info_out %p, mesh_out %p.\n",
+            filedata, options, device, adjacency_out, materials_out,
+            effects_out, num_materials_out, skin_info_out, mesh_out);
 
     ZeroMemory(&mesh_data, sizeof(mesh_data));
 
@@ -3727,7 +3714,7 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXA(const char *filename, DWORD options,
     HRESULT hr;
     int len;
 
-    TRACE("filename %s, options %#x, device %p, alloc_hier %p, "
+    TRACE("filename %s, options %#lx, device %p, alloc_hier %p, "
             "load_user_data %p, frame_hierarchy %p, anim_controller %p.\n",
             debugstr_a(filename), options, device, alloc_hier,
             load_user_data, frame_hierarchy, anim_controller);
@@ -3755,7 +3742,7 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXW(const WCHAR *filename, DWORD options,
     HRESULT hr;
     DWORD size;
 
-    TRACE("filename %s, options %#x, device %p, alloc_hier %p, "
+    TRACE("filename %s, options %#lx, device %p, alloc_hier %p, "
             "load_user_data %p, frame_hierarchy %p, anim_controller %p.\n",
             debugstr_w(filename), options, device, alloc_hier,
             load_user_data, frame_hierarchy, anim_controller);
@@ -3839,9 +3826,9 @@ cleanup:
 
 static HRESULT parse_transform_matrix(ID3DXFileData *filedata, D3DXMATRIX *transform)
 {
-    HRESULT hr;
     SIZE_T data_size;
     const BYTE *data;
+    HRESULT hr;
 
     /* template Matrix4x4 {
      *     array FLOAT matrix[16];
@@ -3851,11 +3838,13 @@ static HRESULT parse_transform_matrix(ID3DXFileData *filedata, D3DXMATRIX *trans
      * }
      */
 
-    hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data);
-    if (FAILED(hr)) return hr;
+    hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void **)&data);
+    if (FAILED(hr))
+        return hr;
 
-    if (data_size != sizeof(D3DXMATRIX)) {
-        WARN("incorrect data size (%ld bytes)\n", data_size);
+    if (data_size != sizeof(D3DXMATRIX))
+    {
+        WARN("Incorrect data size (%Id bytes).\n", data_size);
         filedata->lpVtbl->Unlock(filedata);
         return E_FAIL;
     }
@@ -3941,8 +3930,9 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memo
     SIZE_T i, nb_children;
     GUID guid;
 
-    TRACE("(%p, %u, %x, %p, %p, %p, %p, %p)\n", memory, memory_size, options,
-          device, alloc_hier, load_user_data, frame_hierarchy, anim_controller);
+    TRACE("memory %p, memory_size %lu, options %#lx, device %p, alloc_hier %p, load_user_data %p, "
+            "frame_hierarchy %p, anim_controller %p.\n", memory, memory_size, options,
+            device, alloc_hier, load_user_data, frame_hierarchy, anim_controller);
 
     if (!memory || !memory_size || !device || !frame_hierarchy || !alloc_hier)
         return D3DERR_INVALIDCALL;
@@ -4090,7 +4080,7 @@ HRESULT WINAPI D3DXLoadMeshFromXA(const char *filename, DWORD options, struct ID
     HRESULT hr;
     int len;
 
-    TRACE("filename %s, options %#x, device %p, adjacency %p, materials %p, "
+    TRACE("filename %s, options %#lx, device %p, adjacency %p, materials %p, "
             "effect_instances %p, num_materials %p, mesh %p.\n",
             debugstr_a(filename), options, device, adjacency, materials,
             effect_instances, num_materials, mesh);
@@ -4118,7 +4108,7 @@ HRESULT WINAPI D3DXLoadMeshFromXW(const WCHAR *filename, DWORD options, struct I
     HRESULT hr;
     DWORD size;
 
-    TRACE("filename %s, options %#x, device %p, adjacency %p, materials %p, "
+    TRACE("filename %s, options %#lx, device %p, adjacency %p, materials %p, "
             "effect_instances %p, num_materials %p, mesh %p.\n",
             debugstr_w(filename), options, device, adjacency, materials,
             effect_instances, num_materials, mesh);
@@ -4147,7 +4137,7 @@ HRESULT WINAPI D3DXLoadMeshFromXResource(HMODULE module, const char *name, const
     void *buffer;
     DWORD size;
 
-    TRACE("module %p, name %s, type %s, options %#x, device %p, adjacency %p, "
+    TRACE("module %p, name %s, type %s, options %#lx, device %p, adjacency %p, "
             "materials %p, effect_instances %p, num_materials %p, mesh %p.\n",
             module, debugstr_a(name), debugstr_a(type), options, device, adjacency,
             materials, effect_instances, num_materials, mesh);
@@ -4256,8 +4246,9 @@ HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size,
     SIZE_T i, nb_children;
     GUID guid;
 
-    TRACE("(%p, %u, %x, %p, %p, %p, %p, %p, %p)\n", memory, memory_size, options,
-          device, adjacency_out, materials_out, effects_out, num_materials_out, mesh_out);
+    TRACE("memory %p, memory_size %lu, options %#lx, device %p, adjacency_out %p, materials_out %p, "
+            "effects_out %p, num_materials_out %p, mesh_out %p.\n", memory, memory_size, options,
+            device, adjacency_out, materials_out, effects_out, num_materials_out, mesh_out);
 
     if (!memory || !memory_size || !device || !mesh_out)
         return D3DERR_INVALIDCALL;
@@ -5626,7 +5617,7 @@ static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int da
         pt->corner = POINTTYPE_CORNER;
 
         if (header->dwType != TT_POLYGON_TYPE)
-            FIXME("Unknown header type %d\n", header->dwType);
+            FIXME("Unknown header type %lu.\n", header->dwType);
 
         while ((char *)curve < (char *)header + header->cb)
         {
@@ -7053,7 +7044,8 @@ HRESULT WINAPI D3DXWeldVertices(ID3DXMesh *mesh, DWORD flags, const D3DXWELDEPSI
     DWORD *vertex_face_map = NULL;
     BYTE *vertices = NULL;
 
-    TRACE("mesh %p, flags %#x, epsilons %p, adjacency %p, adjacency_out %p, face_remap_out %p, vertex_remap_out %p.\n",
+    TRACE("mesh %p, flags %#lx, epsilons %p, adjacency %p, adjacency_out %p, face_remap_out %p, "
+            "vertex_remap_out %p.\n",
             mesh, flags, epsilons, adjacency, adjacency_out, face_remap_out, vertex_remap_out);
 
     if (flags == 0)
@@ -7340,13 +7332,15 @@ HRESULT WINAPI D3DXComputeTangentFrameEx(ID3DXMesh *mesh, DWORD texture_in_seman
     D3DVERTEXELEMENT9 *position_declaration = NULL, *normal_declaration = NULL;
     DWORD weighting_method = options & (D3DXTANGENT_WEIGHT_EQUAL | D3DXTANGENT_WEIGHT_BY_AREA);
 
-    TRACE("mesh %p, texture_in_semantic %u, texture_in_index %u, u_partial_out_semantic %u, u_partial_out_index %u, "
-            "v_partial_out_semantic %u, v_partial_out_index %u, normal_out_semantic %u, normal_out_index %u, "
-            "options %#x, adjacency %p, partial_edge_threshold %f, singular_point_threshold %f, "
-            "normal_edge_threshold %f, mesh_out %p, vertex_mapping %p\n",
+    TRACE("mesh %p, texture_in_semantic %lu, texture_in_index %lu, u_partial_out_semantic %lu, "
+            "u_partial_out_index %lu, v_partial_out_semantic %lu, v_partial_out_index %lu, "
+            "normal_out_semantic %lu, normal_out_index %lu, options %#lx, adjacency %p, "
+            "partial_edge_threshold %.8e, singular_point_threshold %.8e, normal_edge_threshold %.8e, "
+            "mesh_out %p, vertex_mapping %p.\n",
             mesh, texture_in_semantic, texture_in_index, u_partial_out_semantic, u_partial_out_index,
-            v_partial_out_semantic, v_partial_out_index, normal_out_semantic, normal_out_index, options, adjacency,
-            partial_edge_threshold, singular_point_threshold, normal_edge_threshold, mesh_out, vertex_mapping);
+            v_partial_out_semantic, v_partial_out_index, normal_out_semantic, normal_out_index,
+            options, adjacency, partial_edge_threshold, singular_point_threshold,
+            normal_edge_threshold, mesh_out, vertex_mapping);
 
     if (!mesh)
     {
@@ -7372,9 +7366,10 @@ HRESULT WINAPI D3DXComputeTangentFrameEx(ID3DXMesh *mesh, DWORD texture_in_seman
         return E_NOTIMPL;
     }
 
-    if (options & ~(D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_EQUAL | D3DXTANGENT_WEIGHT_BY_AREA))
+    if (options & ~(D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS
+            | D3DXTANGENT_WEIGHT_EQUAL | D3DXTANGENT_WEIGHT_BY_AREA))
     {
-        FIXME("unsupported options %#x\n", options);
+        FIXME("Unsupported options %#lx.\n", options);
         return E_NOTIMPL;
     }
 
@@ -7588,7 +7583,7 @@ HRESULT WINAPI D3DXTessellateNPatches(ID3DXMesh *mesh, const DWORD *adjacency_in
 HRESULT WINAPI D3DXConvertMeshSubsetToSingleStrip(struct ID3DXBaseMesh *mesh_in, DWORD attribute_id,
         DWORD ib_flags, struct IDirect3DIndexBuffer9 **index_buffer, DWORD *index_count)
 {
-    FIXME("mesh_in %p, attribute_id %u, ib_flags %u, index_buffer %p, index_count %p stub.\n",
+    FIXME("mesh_in %p, attribute_id %lu, ib_flags %#lx, index_buffer %p, index_count %p stub.\n",
             mesh_in, attribute_id, ib_flags, index_buffer, index_count);
 
     return E_NOTIMPL;
diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c
index 9852b9b9410..3f9374c7d1a 100644
--- a/dlls/d3dx9_36/preshader.c
+++ b/dlls/d3dx9_36/preshader.c
@@ -861,16 +861,16 @@ static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab
     D3DXHANDLE hc;
     unsigned int i, j;
 
-    hr = D3DXGetShaderConstantTable(byte_code, &ctab);
+    hr = D3DXGetShaderConstantTable((DWORD *)byte_code, &ctab);
     if (FAILED(hr) || !ctab)
     {
-        TRACE("Could not get CTAB data, hr %#x.\n", hr);
+        TRACE("Could not get CTAB data, hr %#lx.\n", hr);
         /* returning OK, shaders and preshaders without CTAB are valid */
         return D3D_OK;
     }
     if (FAILED(hr = ID3DXConstantTable_GetDesc(ctab, &desc)))
     {
-        FIXME("Could not get CTAB desc, hr %#x.\n", hr);
+        FIXME("Could not get CTAB desc, hr %#lx.\n", hr);
         goto cleanup;
     }
 
@@ -1294,7 +1294,7 @@ HRESULT d3dx_create_param_eval(struct d3dx_effect *effect, void *byte_code, unsi
         if (FAILED(ret = get_constants_desc(shader_ptr, &peval->shader_inputs, effect,
                 skip_constants, skip_constants_count, &peval->pres)))
         {
-            TRACE("Could not get shader constant table, hr %#x.\n", ret);
+            TRACE("Could not get shader constant table, hr %#lx.\n", ret);
             goto err_out;
         }
         update_table_sizes_consts(peval->pres.regs.table_sizes, &peval->shader_inputs);
diff --git a/dlls/d3dx9_36/render.c b/dlls/d3dx9_36/render.c
index f9a6a8635e8..96bdd4ca9fd 100644
--- a/dlls/d3dx9_36/render.c
+++ b/dlls/d3dx9_36/render.c
@@ -151,7 +151,7 @@ static ULONG WINAPI D3DXRenderToSurface_AddRef(ID3DXRenderToSurface *iface)
     struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface);
     ULONG ref = InterlockedIncrement(&render->ref);
 
-    TRACE("%p increasing refcount to %u\n", iface, ref);
+    TRACE("%p increasing refcount to %lu.\n", iface, ref);
 
     return ref;
 }
@@ -161,7 +161,7 @@ static ULONG WINAPI D3DXRenderToSurface_Release(ID3DXRenderToSurface *iface)
     struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface);
     ULONG ref = InterlockedDecrement(&render->ref);
 
-    TRACE("%p decreasing refcount to %u\n", iface, ref);
+    TRACE("%p decreasing refcount to %lu.\n", iface, ref);
 
     if (!ref)
     {
@@ -185,7 +185,7 @@ static HRESULT WINAPI D3DXRenderToSurface_GetDevice(ID3DXRenderToSurface *iface,
 {
     struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface);
 
-    TRACE("(%p)->(%p)\n", iface, device);
+    TRACE("iface %p, device %p.\n", iface, device);
 
     if (!device) return D3DERR_INVALIDCALL;
 
@@ -199,7 +199,7 @@ static HRESULT WINAPI D3DXRenderToSurface_GetDesc(ID3DXRenderToSurface *iface,
 {
     struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface);
 
-    TRACE("(%p)->(%p)\n", iface, desc);
+    TRACE("iface %p, desc %p.\n", iface, desc);
 
     if (!desc) return D3DERR_INVALIDCALL;
 
@@ -219,7 +219,7 @@ static HRESULT WINAPI D3DXRenderToSurface_BeginScene(ID3DXRenderToSurface *iface
     D3DMULTISAMPLE_TYPE multi_sample_type = D3DMULTISAMPLE_NONE;
     DWORD multi_sample_quality = 0;
 
-    TRACE("(%p)->(%p, %p)\n", iface, surface, viewport);
+    TRACE("iface %p, surface %p, viewport %p.\n", iface, surface, viewport);
 
     if (!surface || render->dst_surface) return D3DERR_INVALIDCALL;
 
@@ -307,7 +307,7 @@ static HRESULT WINAPI D3DXRenderToSurface_EndScene(ID3DXRenderToSurface *iface,
     struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface);
     HRESULT hr;
 
-    TRACE("(%p)->(%#x)\n", iface, filter);
+    TRACE("iface %p, filter %#lx.\n", iface, filter);
 
     if (!render->dst_surface) return D3DERR_INVALIDCALL;
 
@@ -318,7 +318,8 @@ static HRESULT WINAPI D3DXRenderToSurface_EndScene(ID3DXRenderToSurface *iface,
     {
         hr = D3DXLoadSurfaceFromSurface(render->dst_surface, NULL, NULL,
                 render->render_target, NULL, NULL, filter, 0);
-        if (FAILED(hr)) ERR("Copying render target data to surface failed %#x\n", hr);
+        if (FAILED(hr))
+            ERR("Copying render target data to surface failed, hr %#lx.\n", hr);
     }
 
     device_state_restore(render->device, &render->previous_state);
@@ -344,13 +345,13 @@ static HRESULT WINAPI D3DXRenderToSurface_EndScene(ID3DXRenderToSurface *iface,
 
 static HRESULT WINAPI D3DXRenderToSurface_OnLostDevice(ID3DXRenderToSurface *iface)
 {
-    FIXME("(%p)->(): stub\n", iface);
+    FIXME("iface %p stub!\n", iface);
     return D3D_OK;
 }
 
 static HRESULT WINAPI D3DXRenderToSurface_OnResetDevice(ID3DXRenderToSurface *iface)
 {
-    FIXME("(%p)->(): stub\n", iface);
+    FIXME("iface %p stub!\n", iface);
     return D3D_OK;
 }
 
@@ -380,8 +381,8 @@ HRESULT WINAPI D3DXCreateRenderToSurface(IDirect3DDevice9 *device,
     HRESULT hr;
     struct render_to_surface *render;
 
-    TRACE("(%p, %u, %u, %#x, %d, %#x, %p)\n", device, width, height, format,
-            depth_stencil, depth_stencil_format, out);
+    TRACE("device %p, width %u, height %u, format %#x, depth_stencil %#x, depth_stencil_format %#x, out %p.\n",
+            device, width, height, format, depth_stencil, depth_stencil_format, out);
 
     if (!device || !out) return D3DERR_INVALIDCALL;
 
@@ -453,7 +454,8 @@ static void copy_render_target_to_cube_texture_face(IDirect3DCubeTexture9 *cube_
     IDirect3DCubeTexture9_GetCubeMapSurface(cube_texture, face, 0, &cube_surface);
 
     hr = D3DXLoadSurfaceFromSurface(cube_surface, NULL, NULL, render_target, NULL, NULL, filter, 0);
-    if (FAILED(hr)) ERR("Copying render target data to surface failed %#x\n", hr);
+    if (FAILED(hr))
+        ERR("Copying render target data to surface failed, hr %#lx.\n", hr);
 
     IDirect3DSurface9_Release(cube_surface);
 }
@@ -488,7 +490,7 @@ static ULONG WINAPI D3DXRenderToEnvMap_AddRef(ID3DXRenderToEnvMap *iface)
     struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface);
     ULONG ref = InterlockedIncrement(&render->ref);
 
-    TRACE("%p increasing refcount to %u\n", iface, ref);
+    TRACE("%p increasing refcount to %lu.\n", iface, ref);
 
     return ref;
 }
@@ -498,7 +500,7 @@ static ULONG WINAPI D3DXRenderToEnvMap_Release(ID3DXRenderToEnvMap *iface)
     struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface);
     ULONG ref = InterlockedDecrement(&render->ref);
 
-    TRACE("%p decreasing refcount to %u\n", iface, ref);
+    TRACE("%p decreasing refcount to %lu.\n", iface, ref);
 
     if (!ref)
     {
@@ -522,7 +524,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_GetDevice(ID3DXRenderToEnvMap *iface,
 {
     struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface);
 
-    TRACE("(%p)->(%p)\n", iface, device);
+    TRACE("iface %p, device %p.\n", iface, device);
 
     if (!device) return D3DERR_INVALIDCALL;
 
@@ -536,7 +538,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_GetDesc(ID3DXRenderToEnvMap *iface,
 {
     struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface);
 
-    TRACE("(%p)->(%p)\n", iface, desc);
+    TRACE("iface %p, desc %p.\n", iface, desc);
 
     if (!desc) return D3DERR_INVALIDCALL;
 
@@ -551,7 +553,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_BeginCube(ID3DXRenderToEnvMap *iface,
     HRESULT hr;
     D3DSURFACE_DESC level_desc;
 
-    TRACE("(%p)->(%p)\n", iface, texture);
+    TRACE("iface %p, texture %p.\n", iface, texture);
 
     if (!texture) return D3DERR_INVALIDCALL;
 
@@ -598,7 +600,7 @@ cleanup:
 static HRESULT WINAPI D3DXRenderToEnvMap_BeginSphere(ID3DXRenderToEnvMap *iface,
                                                      IDirect3DTexture9 *texture)
 {
-    FIXME("(%p)->(%p): stub\n", iface, texture);
+    FIXME("iface %p, texture %p stub!\n", iface, texture);
     return E_NOTIMPL;
 }
 
@@ -606,7 +608,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_BeginHemisphere(ID3DXRenderToEnvMap *if
                                                          IDirect3DTexture9 *pos_z_texture,
                                                          IDirect3DTexture9 *neg_z_texture)
 {
-    FIXME("(%p)->(%p, %p): stub\n", iface, pos_z_texture, neg_z_texture);
+    FIXME("iface %p, pos_z_texture %p, neg_z_texture %p stub!\n", iface, pos_z_texture, neg_z_texture);
     return E_NOTIMPL;
 }
 
@@ -614,7 +616,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_BeginParabolic(ID3DXRenderToEnvMap *ifa
                                                         IDirect3DTexture9 *pos_z_texture,
                                                         IDirect3DTexture9 *neg_z_texture)
 {
-    FIXME("(%p)->(%p, %p): stub\n", iface, pos_z_texture, neg_z_texture);
+    FIXME("iface %p, pos_z_texture %p, neg_z_texture %p stub!\n", iface, pos_z_texture, neg_z_texture);
     return E_NOTIMPL;
 }
 
@@ -626,7 +628,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_Face(ID3DXRenderToEnvMap *iface,
     HRESULT hr;
     unsigned int i;
 
-    TRACE("(%p)->(%u, %#x)\n", iface, face, filter);
+    TRACE("iface %p, face %u, filter %#lx.\n", iface, face, filter);
 
     if (render->state == CUBE_FACE)
     {
@@ -676,7 +678,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_End(ID3DXRenderToEnvMap *iface,
 {
     struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface);
 
-    TRACE("(%p)->(%#x)\n", iface, filter);
+    TRACE("iface %p, filter %#lx.\n", iface, filter);
 
     if (render->state == INITIAL) return D3DERR_INVALIDCALL;
 
@@ -713,13 +715,13 @@ static HRESULT WINAPI D3DXRenderToEnvMap_End(ID3DXRenderToEnvMap *iface,
 
 static HRESULT WINAPI D3DXRenderToEnvMap_OnLostDevice(ID3DXRenderToEnvMap *iface)
 {
-    FIXME("(%p)->(): stub\n", iface);
+    FIXME("iface %p stub!\n", iface);
     return D3D_OK;
 }
 
 static HRESULT WINAPI D3DXRenderToEnvMap_OnResetDevice(ID3DXRenderToEnvMap *iface)
 {
-    FIXME("(%p)->(): stub\n", iface);
+    FIXME("iface %p stub!\n", iface);
     return D3D_OK;
 }
 
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index e4cd6d8c10e..3663eacf6da 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -147,7 +147,7 @@ HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const
     const DWORD *ptr = byte_code;
     DWORD version;
 
-    TRACE("byte_code %p, fourcc %x, data %p, size %p\n", byte_code, fourcc, data, size);
+    TRACE("byte_code %p, fourcc %#lx, data %p, size %p.\n", byte_code, fourcc, data, size);
 
     if (data) *data = NULL;
     if (size) *size = 0;
@@ -197,7 +197,7 @@ HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMAC
 {
     HRESULT hr;
 
-    TRACE("data %p, data_len %u, defines %p, include %p, flags %#x, shader %p, error_messages %p\n",
+    TRACE("data %p, data_len %u, defines %p, include %p, flags %#lx, shader %p, error_messages %p.\n",
           data, data_len, defines, include, flags, shader, error_messages);
 
     /* Forward to d3dcompiler: the parameter types aren't really different,
@@ -320,7 +320,7 @@ HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO
     DWORD len;
     HRESULT ret;
 
-    TRACE("filename %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.\n",
+    TRACE("filename %s, defines %p, include %p, flags %#lx, shader %p, error_messages %p.\n",
             debugstr_a(filename), defines, include, flags, shader, error_messages);
 
     if (!filename) return D3DXERR_INVALIDDATA;
@@ -345,7 +345,7 @@ HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACR
     char *filename_a;
     HRESULT hr;
 
-    TRACE("filename %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.\n",
+    TRACE("filename %s, defines %p, include %p, flags %#lx, shader %p, error_messages %p.\n",
             debugstr_w(filename), defines, include, flags, shader, error_messages);
 
     if(!include)
@@ -384,7 +384,7 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resou
     HRSRC res;
     DWORD len;
 
-    TRACE("module %p, resource %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.\n",
+    TRACE("module %p, resource %s, defines %p, include %p, flags %#lx, shader %p, error_messages %p.\n",
             module, debugstr_a(resource), defines, include, flags, shader, error_messages);
 
     if (!(res = FindResourceA(module, resource, (const char *)RT_RCDATA)))
@@ -402,7 +402,7 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module, const WCHAR *reso
     HRSRC res;
     DWORD len;
 
-    TRACE("module %p, resource %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.\n",
+    TRACE("module %p, resource %s, defines %p, include %p, flags %#lx, shader %p, error_messages %p.\n",
             module, debugstr_w(resource), defines, include, flags, shader, error_messages);
 
     if (!(res = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA)))
@@ -420,7 +420,7 @@ HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO
     HRESULT hr;
 
     TRACE("data %s, length %u, defines %p, include %p, function %s, profile %s, "
-            "flags %#x, shader %p, error_msgs %p, constant_table %p.\n",
+            "flags %#lx, shader %p, error_msgs %p, constant_table %p.\n",
             debugstr_a(data), length, defines, include, debugstr_a(function), debugstr_a(profile),
             flags, shader, error_msgs, constant_table);
 
@@ -452,7 +452,7 @@ HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO
     HRESULT ret;
 
     TRACE("filename %s, defines %p, include %p, entrypoint %s, profile %s, "
-            "flags %#x, shader %p, error_messages %p, constant_table %p.\n",
+            "flags %#lx, shader %p, error_messages %p, constant_table %p.\n",
             debugstr_a(filename), defines, include, debugstr_a(entrypoint),
             debugstr_a(profile), flags, shader, error_messages, constant_table);
 
@@ -483,7 +483,7 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO
     UINT len;
 
     TRACE("filename %s, defines %p, include %p, entrypoint %s, profile %s, "
-            "flags %#x, shader %p, error_messages %p, constant_table %p.\n",
+            "flags %#lx, shader %p, error_messages %p, constant_table %p.\n",
             debugstr_w(filename), defines, include, debugstr_a(entrypoint), debugstr_a(profile),
             flags, shader, error_messages, constant_table);
 
@@ -534,7 +534,7 @@ HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resour
     DWORD len;
 
     TRACE("module %p, resource %s, defines %p, include %p, entrypoint %s, profile %s, "
-            "flags %#x, shader %p, error_messages %p, constant_table %p.\n",
+            "flags %#lx, shader %p, error_messages %p, constant_table %p.\n",
             module, debugstr_a(resource), defines, include, debugstr_a(entrypoint), debugstr_a(profile),
             flags, shader, error_messages, constant_table);
 
@@ -555,7 +555,7 @@ HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resou
     DWORD len;
 
     TRACE("module %p, resource %s, defines %p, include %p, entrypoint %s, profile %s, "
-            "flags %#x, shader %p, error_messages %p, constant_table %p.\n",
+            "flags %#lx, shader %p, error_messages %p, constant_table %p.\n",
             module, debugstr_w(resource), defines, include, debugstr_a(entrypoint), debugstr_a(profile),
             flags, shader, error_messages, constant_table);
 
@@ -890,27 +890,28 @@ static HRESULT WINAPI ID3DXConstantTableImpl_QueryInterface(ID3DXConstantTable *
 
 static ULONG WINAPI ID3DXConstantTableImpl_AddRef(ID3DXConstantTable *iface)
 {
-    struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface);
+    struct ID3DXConstantTableImpl *table = impl_from_ID3DXConstantTable(iface);
+    ULONG refcount = InterlockedIncrement(&table->ref);
 
-    TRACE("(%p)->(): AddRef from %d\n", This, This->ref);
+    TRACE("%p increasing refcount to %lu.\n", table, refcount);
 
-    return InterlockedIncrement(&This->ref);
+    return refcount;
 }
 
 static ULONG WINAPI ID3DXConstantTableImpl_Release(ID3DXConstantTable *iface)
 {
-    struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
+    struct ID3DXConstantTableImpl *table = impl_from_ID3DXConstantTable(iface);
+    ULONG refcount = InterlockedDecrement(&table->ref);
 
-    TRACE("(%p)->(): Release from %d\n", This, ref + 1);
+    TRACE("%p decreasing refcount to %lu.\n", table, refcount);
 
-    if (!ref)
+    if (!refcount)
     {
-        free_constant_table(This);
-        HeapFree(GetProcessHeap(), 0, This);
+        free_constant_table(table);
+        HeapFree(GetProcessHeap(), 0, table);
     }
 
-    return ref;
+    return refcount;
 }
 
 /*** ID3DXBuffer methods ***/
@@ -1965,7 +1966,7 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
     const D3DXSHADER_CONSTANTINFO *constant_info;
     DWORD i;
 
-    TRACE("byte_code %p, flags %#x, constant_table %p.\n", byte_code, flags, constant_table);
+    TRACE("byte_code %p, flags %#lx, constant_table %p.\n", byte_code, flags, constant_table);
 
     if (constant_table)
         *constant_table = NULL;
@@ -1983,7 +1984,7 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
     }
 
     if (flags & ~D3DXCONSTTABLE_LARGEADDRESSAWARE)
-        FIXME("Flags %#x not handled.\n", flags);
+        FIXME("Flags %#lx not handled.\n", flags);
 
     hr = D3DXFindShaderComment(byte_code, MAKEFOURCC('C','T','A','B'), &data, &size);
     if (hr != D3D_OK)
@@ -2026,7 +2027,7 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
     object->desc.Creator = ctab_header->Creator ? object->ctab + ctab_header->Creator : NULL;
     object->desc.Version = ctab_header->Version;
     object->desc.Constants = ctab_header->Constants;
-    TRACE("Creator %s, Version %x, Constants %u, Target %s\n",
+    TRACE("Creator %s, Version %#lx, Constants %u, Target %s.\n",
             debugstr_a(object->desc.Creator), object->desc.Version, object->desc.Constants,
             debugstr_a(ctab_header->Target ? object->ctab + ctab_header->Target : NULL));
 
@@ -2119,7 +2120,7 @@ static ULONG WINAPI d3dx9_fragment_linker_AddRef(ID3DXFragmentLinker *iface)
     struct d3dx9_fragment_linker *linker = impl_from_ID3DXFragmentLinker(iface);
     ULONG refcount = InterlockedIncrement(&linker->ref);
 
-    TRACE("%p increasing refcount to %u.\n", linker, refcount);
+    TRACE("%p increasing refcount to %lu.\n", linker, refcount);
 
     return refcount;
 }
@@ -2129,7 +2130,7 @@ static ULONG WINAPI d3dx9_fragment_linker_Release(ID3DXFragmentLinker *iface)
     struct d3dx9_fragment_linker *linker = impl_from_ID3DXFragmentLinker(iface);
     ULONG refcount = InterlockedDecrement(&linker->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", linker, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", linker, refcount);
 
     if (!refcount)
     {
@@ -2215,7 +2216,7 @@ static HRESULT WINAPI d3dx9_fragment_linker_LinkShader(ID3DXFragmentLinker *ifac
         DWORD flags, const D3DXHANDLE *handles, UINT fragment_count, ID3DXBuffer **buffer,
         ID3DXBuffer **errors)
 {
-    FIXME("iface %p, profile %s, flags %#x, handles %p, fragment_count %u, buffer %p, errors %p: stub.\n",
+    FIXME("iface %p, profile %s, flags %#lx, handles %p, fragment_count %u, buffer %p, errors %p: stub.\n",
             iface, debugstr_a(profile), flags, handles, fragment_count, buffer, errors);
 
     return E_NOTIMPL;
@@ -2225,7 +2226,7 @@ static HRESULT WINAPI d3dx9_fragment_linker_LinkVertexShader(ID3DXFragmentLinker
         DWORD flags, const D3DXHANDLE *handles, UINT fragment_count, IDirect3DVertexShader9 **shader,
         ID3DXBuffer **errors)
 {
-    FIXME("iface %p, profile %s, flags %#x, handles %p, fragment_count %u, shader %p, errors %p: stub.\n",
+    FIXME("iface %p, profile %s, flags %#lx, handles %p, fragment_count %u, shader %p, errors %p: stub.\n",
             iface, debugstr_a(profile), flags, handles, fragment_count, shader, errors);
 
     return E_NOTIMPL;
@@ -2235,7 +2236,7 @@ static HRESULT WINAPI d3dx9_fragment_linker_LinkPixelShader(ID3DXFragmentLinker
         DWORD flags, const D3DXHANDLE *handles, UINT fragment_count, IDirect3DPixelShader9 **shader,
         ID3DXBuffer **errors)
 {
-    FIXME("iface %p, profile %s, flags %#x, handles %p, fragment_count %u, shader %p, errors %p: stub.\n",
+    FIXME("iface %p, profile %s, flags %#lx, handles %p, fragment_count %u, shader %p, errors %p: stub.\n",
         iface, debugstr_a(profile), flags, handles, fragment_count, shader, errors);
 
     return E_NOTIMPL;
@@ -2272,7 +2273,7 @@ HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, D
 {
     struct d3dx9_fragment_linker *object;
 
-    TRACE("device %p, size %u, flags %#x, linker %p.\n", device, size, flags, linker);
+    TRACE("device %p, size %u, flags %#lx, linker %p.\n", device, size, flags, linker);
 
     object = heap_alloc(sizeof(*object));
     if (!object)
@@ -2389,7 +2390,7 @@ static ULONG WINAPI d3dx9_texture_shader_AddRef(ID3DXTextureShader *iface)
     struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface);
     ULONG refcount = InterlockedIncrement(&texture_shader->ref);
 
-    TRACE("%p increasing refcount to %u.\n", texture_shader, refcount);
+    TRACE("%p increasing refcount to %lu.\n", texture_shader, refcount);
 
     return refcount;
 }
@@ -2399,7 +2400,7 @@ static ULONG WINAPI d3dx9_texture_shader_Release(ID3DXTextureShader *iface)
     struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface);
     ULONG refcount = InterlockedDecrement(&texture_shader->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", texture_shader, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", texture_shader, refcount);
 
     if (!refcount)
     {
diff --git a/dlls/d3dx9_36/skin.c b/dlls/d3dx9_36/skin.c
index ffc89f0bad9..b81fb6863d3 100644
--- a/dlls/d3dx9_36/skin.c
+++ b/dlls/d3dx9_36/skin.c
@@ -70,7 +70,7 @@ static ULONG WINAPI d3dx9_skin_info_AddRef(ID3DXSkinInfo *iface)
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
     ULONG refcount = InterlockedIncrement(&skin->ref);
 
-    TRACE("%p increasing refcount to %u.\n", skin, refcount);
+    TRACE("%p increasing refcount to %lu.\n", skin, refcount);
 
     return refcount;
 }
@@ -80,7 +80,7 @@ static ULONG WINAPI d3dx9_skin_info_Release(ID3DXSkinInfo *iface)
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
     ULONG refcount = InterlockedDecrement(&skin->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", skin, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", skin, refcount);
 
     if (!refcount)
     {
@@ -107,7 +107,7 @@ static HRESULT WINAPI d3dx9_skin_info_SetBoneInfluence(ID3DXSkinInfo *iface,
     DWORD *new_vertices = NULL;
     FLOAT *new_weights = NULL;
 
-    TRACE("iface %p, bone_num %u, num_influences %u, vertices %p, weights %p.\n",
+    TRACE("iface %p, bone_num %lu, num_influences %lu, vertices %p, weights %p.\n",
             iface, bone_num, num_influences, vertices, weights);
 
     if (bone_num >= skin->num_bones || !vertices || !weights)
@@ -136,39 +136,39 @@ static HRESULT WINAPI d3dx9_skin_info_SetBoneInfluence(ID3DXSkinInfo *iface,
 }
 
 static HRESULT WINAPI d3dx9_skin_info_SetBoneVertexInfluence(ID3DXSkinInfo *iface,
-        DWORD bone_num, DWORD influence_num, float weight)
+        DWORD bone_idx, DWORD influence_idx, float weight)
 {
-    FIXME("iface %p, bone_num %u, influence_num %u, weight %.8e stub!\n",
-            iface, bone_num, influence_num, weight);
+    FIXME("iface %p, bone_idx %lu, influence_idx %lu, weight %.8e stub!\n",
+            iface, bone_idx, influence_idx, weight);
 
     return E_NOTIMPL;
 }
 
-static DWORD WINAPI d3dx9_skin_info_GetNumBoneInfluences(ID3DXSkinInfo *iface, DWORD bone_num)
+static DWORD WINAPI d3dx9_skin_info_GetNumBoneInfluences(ID3DXSkinInfo *iface, DWORD bone_idx)
 {
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
 
-    TRACE("iface %p, bone_num %u.\n", iface, bone_num);
+    TRACE("iface %p, bone_idx %lu.\n", iface, bone_idx);
 
-    if (bone_num >= skin->num_bones)
+    if (bone_idx >= skin->num_bones)
         return 0;
 
-    return skin->bones[bone_num].num_influences;
+    return skin->bones[bone_idx].num_influences;
 }
 
 static HRESULT WINAPI d3dx9_skin_info_GetBoneInfluence(ID3DXSkinInfo *iface,
-        DWORD bone_num, DWORD *vertices, float *weights)
+        DWORD bone_idx, DWORD *vertices, float *weights)
 {
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
     struct bone *bone;
 
-    TRACE("iface %p, bone_num %u, vertices %p, weights %p.\n",
-            iface, bone_num, vertices, weights);
+    TRACE("iface %p, bone_idx %lu, vertices %p, weights %p.\n",
+            iface, bone_idx, vertices, weights);
 
-    if (bone_num >= skin->num_bones || !vertices)
+    if (bone_idx >= skin->num_bones || !vertices)
         return D3DERR_INVALIDCALL;
 
-    bone = &skin->bones[bone_num];
+    bone = &skin->bones[bone_idx];
     if (!bone->num_influences)
         return D3D_OK;
 
@@ -180,10 +180,10 @@ static HRESULT WINAPI d3dx9_skin_info_GetBoneInfluence(ID3DXSkinInfo *iface,
 }
 
 static HRESULT WINAPI d3dx9_skin_info_GetBoneVertexInfluence(ID3DXSkinInfo *iface,
-        DWORD bone_num, DWORD influence_num, float *weight, DWORD *vertex_num)
+        DWORD bone_idx, DWORD influence_idx, float *weight, DWORD *vertex_idx)
 {
-    FIXME("iface %p, bone_num %u, influence_num %u, weight %p, vertex_num %p stub!\n",
-            iface, bone_num, influence_num, weight, vertex_num);
+    FIXME("iface %p, bone_idx %lu, influence_idx %lu, weight %p, vertex_idx %p stub!\n",
+            iface, bone_idx, influence_idx, weight, vertex_idx);
 
     return E_NOTIMPL;
 }
@@ -205,19 +205,19 @@ static DWORD WINAPI d3dx9_skin_info_GetNumBones(ID3DXSkinInfo *iface)
 }
 
 static HRESULT WINAPI d3dx9_skin_info_FindBoneVertexInfluenceIndex(ID3DXSkinInfo *iface,
-        DWORD bone_num, DWORD vertex_num, DWORD *influence_index)
+        DWORD bone_idx, DWORD vertex_idx, DWORD *influence_idx)
 {
-    FIXME("iface %p, bone_num %u, vertex_num %u, influence_index %p stub!\n",
-            iface, bone_num, vertex_num, influence_index);
+    FIXME("iface %p, bone_idx %lu, vertex_idx %lu, influence_idx %p stub!\n",
+            iface, bone_idx, vertex_idx, influence_idx);
 
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI d3dx9_skin_info_GetMaxFaceInfluences(struct ID3DXSkinInfo *iface,
-        struct IDirect3DIndexBuffer9 *index_buffer, DWORD num_faces, DWORD *max_face_influences)
+        struct IDirect3DIndexBuffer9 *index_buffer, DWORD face_count, DWORD *max_face_influences)
 {
-    FIXME("iface %p, index_buffer %p, num_faces %u, max_face_influences %p stub!\n",
-            iface, index_buffer, num_faces, max_face_influences);
+    FIXME("iface %p, index_buffer %p, face_count %lu, max_face_influences %p stub!\n",
+            iface, index_buffer, face_count, max_face_influences);
 
     return E_NOTIMPL;
 }
@@ -242,7 +242,7 @@ static HRESULT WINAPI d3dx9_skin_info_SetBoneName(ID3DXSkinInfo *iface, DWORD bo
     char *new_name;
     size_t size;
 
-    TRACE("iface %p, bone_idx %u, name %s.\n", iface, bone_idx, debugstr_a(name));
+    TRACE("iface %p, bone_idx %lu, name %s.\n", iface, bone_idx, debugstr_a(name));
 
     if (bone_idx >= skin->num_bones || !name)
         return D3DERR_INVALIDCALL;
@@ -262,7 +262,7 @@ static const char * WINAPI d3dx9_skin_info_GetBoneName(ID3DXSkinInfo *iface, DWO
 {
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
 
-    TRACE("iface %p, bone_idx %u.\n", iface, bone_idx);
+    TRACE("iface %p, bone_idx %lu.\n", iface, bone_idx);
 
     if (bone_idx >= skin->num_bones)
         return NULL;
@@ -271,29 +271,29 @@ static const char * WINAPI d3dx9_skin_info_GetBoneName(ID3DXSkinInfo *iface, DWO
 }
 
 static HRESULT WINAPI d3dx9_skin_info_SetBoneOffsetMatrix(ID3DXSkinInfo *iface,
-        DWORD bone_num, const D3DXMATRIX *bone_transform)
+        DWORD bone_idx, const D3DXMATRIX *bone_transform)
 {
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
 
-    TRACE("iface %p, bone_num %u, bone_transform %p.\n", iface, bone_num, bone_transform);
+    TRACE("iface %p, bone_idx %lu, bone_transform %p.\n", iface, bone_idx, bone_transform);
 
-    if (bone_num >= skin->num_bones || !bone_transform)
+    if (bone_idx >= skin->num_bones || !bone_transform)
         return D3DERR_INVALIDCALL;
 
-    skin->bones[bone_num].transform = *bone_transform;
+    skin->bones[bone_idx].transform = *bone_transform;
     return D3D_OK;
 }
 
-static D3DXMATRIX * WINAPI d3dx9_skin_info_GetBoneOffsetMatrix(ID3DXSkinInfo *iface, DWORD bone_num)
+static D3DXMATRIX * WINAPI d3dx9_skin_info_GetBoneOffsetMatrix(ID3DXSkinInfo *iface, DWORD bone_idx)
 {
     struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface);
 
-    TRACE("iface %p, bone_num %u.\n", iface, bone_num);
+    TRACE("iface %p, bone_idx %lu.\n", iface, bone_idx);
 
-    if (bone_num >= skin->num_bones)
+    if (bone_idx >= skin->num_bones)
         return NULL;
 
-    return &skin->bones[bone_num].transform;
+    return &skin->bones[bone_idx].transform;
 }
 
 static HRESULT WINAPI d3dx9_skin_info_Clone(ID3DXSkinInfo *iface, ID3DXSkinInfo **skin_info)
@@ -327,9 +327,9 @@ static HRESULT WINAPI d3dx9_skin_info_Clone(ID3DXSkinInfo *iface, ID3DXSkinInfo
     return hr;
 }
 
-static HRESULT WINAPI d3dx9_skin_info_Remap(ID3DXSkinInfo *iface, DWORD num_vertices, DWORD *vertex_remap)
+static HRESULT WINAPI d3dx9_skin_info_Remap(ID3DXSkinInfo *iface, DWORD vertex_count, DWORD *vertex_remap)
 {
-    FIXME("iface %p, num_vertices %u, vertex_remap %p stub!\n", iface, num_vertices, vertex_remap);
+    FIXME("iface %p, vertex_count %lu, vertex_remap %p stub!\n", iface, vertex_count, vertex_remap);
 
     return E_NOTIMPL;
 }
@@ -339,7 +339,7 @@ static HRESULT WINAPI d3dx9_skin_info_SetFVF(ID3DXSkinInfo *iface, DWORD fvf)
     HRESULT hr;
     D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE];
 
-    TRACE("iface %p, fvf %#x.\n", iface, fvf);
+    TRACE("iface %p, fvf %#lx.\n", iface, fvf);
 
     hr = D3DXDeclaratorFromFVF(fvf, declaration);
     if (FAILED(hr)) return hr;
@@ -407,26 +407,27 @@ static HRESULT WINAPI d3dx9_skin_info_UpdateSkinnedMesh(ID3DXSkinInfo *iface, co
 
 static HRESULT WINAPI d3dx9_skin_info_ConvertToBlendedMesh(ID3DXSkinInfo *iface, ID3DXMesh *mesh_in,
         DWORD options, const DWORD *adjacency_in, DWORD *adjacency_out, DWORD *face_remap,
-        ID3DXBuffer **vertex_remap, DWORD *max_face_infl, DWORD *num_bone_combinations,
+        ID3DXBuffer **vertex_remap, DWORD *max_face_influences, DWORD *bone_combination_count,
         ID3DXBuffer **bone_combination_table, ID3DXMesh **mesh_out)
 {
-    FIXME("iface %p, mesh_in %p, options %#x, adjacency_in %p, adjacency_out %p, face_remap %p, vertex_remap %p, "
-            "max_face_infl %p, num_bone_combinations %p, bone_combination_table %p, mesh_out %p stub!\n",
+    FIXME("iface %p, mesh_in %p, options %#lx, adjacency_in %p, adjacency_out %p, face_remap %p, vertex_remap %p, "
+            "max_face_influences %p, bone_combination_count %p, bone_combination_table %p, mesh_out %p stub!\n",
             iface, mesh_in, options, adjacency_in, adjacency_out, face_remap, vertex_remap,
-            max_face_infl, num_bone_combinations, bone_combination_table, mesh_out);
+            max_face_influences, bone_combination_count, bone_combination_table, mesh_out);
 
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI d3dx9_skin_info_ConvertToIndexedBlendedMesh(ID3DXSkinInfo *iface, ID3DXMesh *mesh_in,
         DWORD options, DWORD palette_size, const DWORD *adjacency_in, DWORD *adjacency_out, DWORD *face_remap,
-        ID3DXBuffer **vertex_remap, DWORD *max_face_infl, DWORD *num_bone_combinations,
+        ID3DXBuffer **vertex_remap, DWORD *max_vertex_influences, DWORD *bone_combination_count,
         ID3DXBuffer **bone_combination_table, ID3DXMesh **mesh_out)
 {
-    FIXME("iface %p, mesh_in %p, options %#x, palette_size %u, adjacency_in %p, adjacency_out %p, face_remap %p, vertex_remap %p, "
-            "max_face_infl %p, num_bone_combinations %p, bone_combination_table %p, mesh_out %p stub!\n",
+    FIXME("iface %p, mesh_in %p, options %#lx, palette_size %lu, adjacency_in %p, adjacency_out %p, "
+            "face_remap %p, vertex_remap %p, max_vertex_influences %p, bone_combination_count %p, "
+            "bone_combination_table %p, mesh_out %p stub!\n",
             iface, mesh_in, options, palette_size, adjacency_in, adjacency_out, face_remap, vertex_remap,
-            max_face_infl, num_bone_combinations, bone_combination_table, mesh_out);
+            max_vertex_influences, bone_combination_count, bone_combination_table, mesh_out);
 
     return E_NOTIMPL;
 }
@@ -462,15 +463,15 @@ static const struct ID3DXSkinInfoVtbl d3dx9_skin_info_vtbl =
     d3dx9_skin_info_ConvertToIndexedBlendedMesh,
 };
 
-HRESULT WINAPI D3DXCreateSkinInfo(DWORD num_vertices, const D3DVERTEXELEMENT9 *declaration,
-        DWORD num_bones, ID3DXSkinInfo **skin_info)
+HRESULT WINAPI D3DXCreateSkinInfo(DWORD vertex_count, const D3DVERTEXELEMENT9 *declaration,
+        DWORD bone_count, ID3DXSkinInfo **skin_info)
 {
     HRESULT hr;
     static const D3DVERTEXELEMENT9 empty_declaration = D3DDECL_END();
     struct d3dx9_skin_info *object = NULL;
 
-    TRACE("num_vertices %u, declaration %p, num_bones %u, skin_info %p.\n",
-            num_vertices, declaration, num_bones, skin_info);
+    TRACE("vertex_count %lu, declaration %p, bone_count %lu, skin_info %p.\n",
+            vertex_count, declaration, bone_count, skin_info);
 
     if (!skin_info || !declaration)
         return D3DERR_INVALIDCALL;
@@ -481,12 +482,12 @@ HRESULT WINAPI D3DXCreateSkinInfo(DWORD num_vertices, const D3DVERTEXELEMENT9 *d
 
     object->ID3DXSkinInfo_iface.lpVtbl = &d3dx9_skin_info_vtbl;
     object->ref = 1;
-    object->num_vertices = num_vertices;
-    object->num_bones = num_bones;
+    object->num_vertices = vertex_count;
+    object->num_bones = bone_count;
     object->vertex_declaration[0] = empty_declaration;
     object->fvf = 0;
 
-    object->bones = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_bones * sizeof(*object->bones));
+    object->bones = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bone_count * sizeof(*object->bones));
     if (!object->bones) {
         hr = E_OUTOFMEMORY;
         goto error;
@@ -504,16 +505,17 @@ error:
     return hr;
 }
 
-HRESULT WINAPI D3DXCreateSkinInfoFVF(DWORD num_vertices, DWORD fvf, DWORD num_bones, ID3DXSkinInfo **skin_info)
+HRESULT WINAPI D3DXCreateSkinInfoFVF(DWORD vertex_count, DWORD fvf, DWORD bone_count, ID3DXSkinInfo **skin_info)
 {
     HRESULT hr;
     D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE];
 
-    TRACE("(%u, %x, %u, %p)\n", num_vertices, fvf, num_bones, skin_info);
+    TRACE("vertex_count %lu, fvf %#lx, bone_count %lu, skin_info %p.\n",
+            vertex_count, fvf, bone_count, skin_info);
 
     hr = D3DXDeclaratorFromFVF(fvf, declaration);
     if (FAILED(hr))
         return hr;
 
-    return D3DXCreateSkinInfo(num_vertices, declaration, num_bones, skin_info);
+    return D3DXCreateSkinInfo(vertex_count, declaration, bone_count, skin_info);
 }
diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c
index 5499904da24..1a072e52cda 100644
--- a/dlls/d3dx9_36/sprite.c
+++ b/dlls/d3dx9_36/sprite.c
@@ -94,7 +94,7 @@ static ULONG WINAPI d3dx9_sprite_AddRef(ID3DXSprite *iface)
     struct d3dx9_sprite *sprite = impl_from_ID3DXSprite(iface);
     ULONG refcount = InterlockedIncrement(&sprite->ref);
 
-    TRACE("%p increasing refcount to %u.\n", sprite, refcount);
+    TRACE("%p increasing refcount to %lu.\n", sprite, refcount);
 
     return refcount;
 }
@@ -104,7 +104,7 @@ static ULONG WINAPI d3dx9_sprite_Release(ID3DXSprite *iface)
     struct d3dx9_sprite *sprite = impl_from_ID3DXSprite(iface);
     ULONG refcount = InterlockedDecrement(&sprite->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", sprite, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", sprite, refcount);
 
     if (!refcount)
     {
@@ -279,7 +279,7 @@ static HRESULT WINAPI d3dx9_sprite_Begin(ID3DXSprite *iface, DWORD flags)
     struct d3dx9_sprite *This = impl_from_ID3DXSprite(iface);
     HRESULT hr;
 
-    TRACE("iface %p, flags %#x.\n", iface, flags);
+    TRACE("iface %p, flags %#lx.\n", iface, flags);
 
     if(flags>D3DXSPRITE_FLAGLIMIT || This->ready) return D3DERR_INVALIDCALL;
 
@@ -295,10 +295,10 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
     if(flags & (D3DXSPRITE_BILLBOARD |
                 D3DXSPRITE_DONOTMODIFY_RENDERSTATE | D3DXSPRITE_OBJECTSPACE |
                 D3DXSPRITE_SORT_DEPTH_BACKTOFRONT))
-        FIXME("Flags unsupported: %#x\n", flags);
+        FIXME("Flags unsupported: %#lx.\n", flags);
     /* These flags should only matter to performance */
     else if(flags & (D3DXSPRITE_SORT_DEPTH_FRONTTOBACK | D3DXSPRITE_SORT_TEXTURE))
-        TRACE("Flags unsupported: %#x\n", flags);
+        TRACE("Flags unsupported: %#lx.\n", flags);
 
     if(This->vdecl==NULL) {
         static const D3DVERTEXELEMENT9 elements[] =
@@ -345,7 +345,7 @@ static HRESULT WINAPI d3dx9_sprite_Draw(ID3DXSprite *iface, IDirect3DTexture9 *t
     struct sprite *new_sprites;
     D3DSURFACE_DESC texdesc;
 
-    TRACE("iface %p, texture %p, rect %s, center %p, position %p, color 0x%08x.\n",
+    TRACE("iface %p, texture %p, rect %s, center %p, position %p, color 0x%08lx.\n",
             iface, texture, wine_dbgstr_rect(rect), center, position, color);
 
     if(texture==NULL) return D3DERR_INVALIDCALL;
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 39733d3ef7e..26809a47e18 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -173,7 +173,7 @@ static D3DFORMAT dds_fourcc_to_d3dformat(DWORD fourcc)
             return fourcc;
     }
 
-    WARN("Unknown FourCC %#x\n", fourcc);
+    WARN("Unknown FourCC %#lx.\n", fourcc);
     return D3DFMT_UNKNOWN;
 }
 
@@ -235,8 +235,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
                 desc.Format, D3DMULTISAMPLE_NONE, 0, TRUE, temp_surface, NULL);
         if (FAILED(hr))
         {
-            WARN("Failed to create temporary surface, surface %p, format %#x,"
-                    " usage %#x, pool %#x, write %#x, width %u, height %u.\n",
+            WARN("Failed to create temporary surface, surface %p, format %#x, "
+                    "usage %#lx, pool %#x, write %#x, width %u, height %u.\n",
                     surface, desc.Format, desc.Usage, desc.Pool, write, width, height);
             IDirect3DDevice9_Release(device);
             return hr;
@@ -249,7 +249,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
         IDirect3DDevice9_Release(device);
         if (FAILED(hr))
         {
-            WARN("Failed to lock surface %p, write %#x, usage %#x, pool %#x.\n",
+            WARN("Failed to lock surface %p, write %#x, usage %#lx, pool %#x.\n",
                     surface, write, desc.Usage, desc.Pool);
             IDirect3DSurface9_Release(*temp_surface);
             *temp_surface = NULL;
@@ -288,7 +288,7 @@ HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
         }
         IDirect3DSurface9_GetDevice(surface, &device);
         if (FAILED(hr = IDirect3DDevice9_UpdateSurface(device, temp_surface, NULL, surface, &surface_point)))
-            WARN("Updating surface failed, hr %#x, surface %p, temp_surface %p.\n",
+            WARN("Updating surface failed, hr %#lx, surface %p, temp_surface %p.\n",
                     hr, surface, temp_surface);
         IDirect3DDevice9_Release(device);
     }
@@ -314,8 +314,8 @@ static D3DFORMAT dds_rgb_to_d3dformat(const struct dds_pixel_format *pixel_forma
         }
     }
 
-    WARN("Unknown RGB pixel format (%#x, %#x, %#x, %#x)\n",
-        pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
+    WARN("Unknown RGB pixel format (r %#lx, g %#lx, b %#lx, a %#lx).\n",
+            pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
     return D3DFMT_UNKNOWN;
 }
 
@@ -336,8 +336,8 @@ static D3DFORMAT dds_luminance_to_d3dformat(const struct dds_pixel_format *pixel
             return D3DFMT_A8L8;
     }
 
-    WARN("Unknown luminance pixel format (bpp %u, l %#x, a %#x)\n",
-        pixel_format->bpp, pixel_format->rmask, pixel_format->amask);
+    WARN("Unknown luminance pixel format (bpp %lu, l %#lx, a %#lx).\n",
+            pixel_format->bpp, pixel_format->rmask, pixel_format->amask);
     return D3DFMT_UNKNOWN;
 }
 
@@ -346,7 +346,7 @@ static D3DFORMAT dds_alpha_to_d3dformat(const struct dds_pixel_format *pixel_for
     if (pixel_format->bpp == 8 && pixel_format->amask == 0xff)
         return D3DFMT_A8;
 
-    WARN("Unknown Alpha pixel format (%u, %#x)\n", pixel_format->bpp, pixel_format->rmask);
+    WARN("Unknown alpha pixel format (bpp %lu, a %#lx).\n", pixel_format->bpp, pixel_format->rmask);
     return D3DFMT_UNKNOWN;
 }
 
@@ -355,7 +355,7 @@ static D3DFORMAT dds_indexed_to_d3dformat(const struct dds_pixel_format *pixel_f
     if (pixel_format->bpp == 8)
         return D3DFMT_P8;
 
-    WARN("Unknown indexed pixel format (%u).\n", pixel_format->bpp);
+    WARN("Unknown indexed pixel format (bpp %lu).\n", pixel_format->bpp);
     return D3DFMT_UNKNOWN;
 }
 
@@ -366,8 +366,8 @@ static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_form
     if (pixel_format->bpp == 32 && pixel_format->rmask == 0x0000ffff && pixel_format->gmask == 0xffff0000)
         return D3DFMT_V16U16;
 
-    WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n", pixel_format->bpp,
-        pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
+    WARN("Unknown bump pixel format (bpp %lu, r %#lx, g %#lx, b %#lx, a %#lx).\n", pixel_format->bpp,
+            pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
     return D3DFMT_UNKNOWN;
 }
 
@@ -377,16 +377,16 @@ static D3DFORMAT dds_bump_luminance_to_d3dformat(const struct dds_pixel_format *
             && pixel_format->bmask == 0x00ff0000)
         return D3DFMT_X8L8V8U8;
 
-    WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x).\n", pixel_format->bpp,
-        pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
+    WARN("Unknown bump pixel format (bpp %lu, r %#lx, g %#lx, b %#lx, a %#lx).\n", pixel_format->bpp,
+            pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
     return D3DFMT_UNKNOWN;
 }
 
 static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format)
 {
-    TRACE("pixel_format: size %u, flags %#x, fourcc %#x, bpp %u.\n", pixel_format->size,
+    TRACE("pixel_format: size %lu, flags %#lx, fourcc %#lx, bpp %lu.\n", pixel_format->size,
             pixel_format->flags, pixel_format->fourcc, pixel_format->bpp);
-    TRACE("rmask %#x, gmask %#x, bmask %#x, amask %#x.\n", pixel_format->rmask, pixel_format->gmask,
+    TRACE("rmask %#lx, gmask %#lx, bmask %#lx, amask %#lx.\n", pixel_format->rmask, pixel_format->gmask,
             pixel_format->bmask, pixel_format->amask);
 
     if (pixel_format->flags & DDS_PF_FOURCC)
@@ -404,7 +404,7 @@ static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pi
     if (pixel_format->flags & DDS_PF_BUMPLUMINANCE)
         return dds_bump_luminance_to_d3dformat(pixel_format);
 
-    WARN("Unknown pixel format (flags %#x, fourcc %#x, bpp %u, r %#x, g %#x, b %#x, a %#x)\n",
+    WARN("Unknown pixel format (flags %#lx, fourcc %#lx, bpp %lu, r %#lx, g %#lx, b %#lx, a %#lx).\n",
         pixel_format->flags, pixel_format->fourcc, pixel_format->bpp,
         pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
     return D3DFMT_UNKNOWN;
@@ -433,7 +433,7 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
         }
     }
 
-    WARN("Unknown pixel format %#x\n", d3dformat);
+    WARN("Unknown pixel format %#x.\n", d3dformat);
     return E_NOTIMPL;
 }
 
@@ -905,7 +905,7 @@ static BOOL image_is_argb(IWICBitmapFrameDecode *frame, const D3DXIMAGE_INFO *in
 
     if (FAILED(hr = IWICBitmapFrameDecode_CopyPixels(frame, NULL, info->Width * 4, size, buffer)))
     {
-        ERR("Failed to copy pixels, hr %#x.\n", hr);
+        ERR("Failed to copy pixels, hr %#lx.\n", hr);
         free(buffer);
         return FALSE;
     }
@@ -1206,7 +1206,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface,
     RECT rect;
 
     TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_data %p, src_data_size %u, "
-            "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n",
+            "src_rect %s, filter %#lx, color_key 0x%08lx, src_info %p.\n",
             pDestSurface, pDestPalette, wine_dbgstr_rect(pDestRect), pSrcData, SrcDataSize,
             wine_dbgstr_rect(pSrcRect), dwFilter, Colorkey, pSrcInfo);
 
@@ -1369,7 +1369,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileA(IDirect3DSurface9 *dst_surface,
     int strlength;
 
     TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_file %s, "
-            "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n",
+            "src_rect %s, filter %#lx, color_key 0x%08lx, src_info %p.\n",
             dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), debugstr_a(src_file),
             wine_dbgstr_rect(src_rect), filter, color_key, src_info);
 
@@ -1396,7 +1396,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileW(IDirect3DSurface9 *dst_surface,
     HRESULT hr;
 
     TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_file %s, "
-            "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n",
+            "src_rect %s, filter %#lx, color_key 0x%08lx, src_info %p.\n",
             dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), debugstr_w(src_file),
             wine_dbgstr_rect(src_rect), filter, color_key, src_info);
 
@@ -1422,7 +1422,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface,
     void *data;
 
     TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_module %p, resource %s, "
-            "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n",
+            "src_rect %s, filter %#lx, color_key 0x%08lx, src_info %p.\n",
             dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_module, debugstr_a(resource),
             wine_dbgstr_rect(src_rect), filter, color_key, src_info);
 
@@ -1450,7 +1450,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface,
     void *data;
 
     TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_module %p, resource %s, "
-            "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n",
+            "src_rect %s, filter %#lx, color_key 0x%08lx, src_info %p.\n",
             dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_module, debugstr_w(resource),
             wine_dbgstr_rect(src_rect), filter, color_key, src_info);
 
@@ -1687,7 +1687,7 @@ void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pit
     UINT x, y, z;
 
     TRACE("src %p, src_row_pitch %u, src_slice_pitch %u, src_size %p, src_format %p, dst %p, "
-            "dst_row_pitch %u, dst_slice_pitch %u, dst_size %p, dst_format %p, color_key 0x%08x, palette %p.\n",
+            "dst_row_pitch %u, dst_slice_pitch %u, dst_size %p, dst_format %p, color_key 0x%08lx, palette %p.\n",
             src, src_row_pitch, src_slice_pitch, src_size, src_format, dst, dst_row_pitch, dst_slice_pitch, dst_size,
             dst_format, color_key, palette);
 
@@ -1794,7 +1794,7 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
     UINT x, y, z;
 
     TRACE("src %p, src_row_pitch %u, src_slice_pitch %u, src_size %p, src_format %p, dst %p, "
-            "dst_row_pitch %u, dst_slice_pitch %u, dst_size %p, dst_format %p, color_key 0x%08x, palette %p.\n",
+            "dst_row_pitch %u, dst_slice_pitch %u, dst_size %p, dst_format %p, color_key 0x%08lx, palette %p.\n",
             src, src_row_pitch, src_slice_pitch, src_size, src_format, dst, dst_row_pitch, dst_slice_pitch, dst_size,
             dst_format, color_key, palette);
 
@@ -1920,7 +1920,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
     D3DLOCKED_RECT lockrect;
     HRESULT hr;
 
-    TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n",
+    TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_memory %p, src_format %#x, "
+            "src_pitch %u, src_palette %p, src_rect %s, filter %#lx, color_key 0x%08lx.\n",
             dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format,
             src_pitch, src_palette, wine_dbgstr_rect(src_rect), filter, color_key);
 
@@ -2114,7 +2115,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
         else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
         {
             if ((filter & 0xf) != D3DX_FILTER_POINT)
-                FIXME("Unhandled filter %#x.\n", filter);
+                FIXME("Unhandled filter %#lx.\n", filter);
 
             /* Always apply a point filter until D3DX_FILTER_LINEAR,
              * D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
@@ -2193,7 +2194,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface,
     RECT s;
 
     TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_surface %p, "
-            "src_palette %p, src_rect %s, filter %#x, color_key 0x%08x.\n",
+            "src_palette %p, src_rect %s, filter %#lx, color_key 0x%08lx.\n",
             dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_surface,
             src_palette, wine_dbgstr_rect(src_rect), filter, color_key);
 
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index 6af44589047..46bca5eb4e6 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -54,7 +54,7 @@ HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture,
     HRESULT hr;
     D3DRESOURCETYPE type;
 
-    TRACE("(%p, %p, %u, %#x)\n", texture, palette, srclevel, filter);
+    TRACE("texture %p, palette %p, srclevel %u, filter %#lx.\n", texture, palette, srclevel, filter);
 
     if (!texture)
         return D3DERR_INVALIDCALL;
@@ -408,7 +408,7 @@ cleanup:
 HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height,
         UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
 {
-    TRACE("device %p, width %p, height %p, miplevels %p, usage %u, format %p, pool %u.\n",
+    TRACE("device %p, width %p, height %p, miplevels %p, usage %#lx, format %p, pool %#x.\n",
             device, width, height, miplevels, usage, format, pool);
 
     return check_texture_requirements(device, width, height, miplevels, usage, format, pool, D3DRTYPE_TEXTURE);
@@ -421,7 +421,8 @@ HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device,
     UINT s = (size && *size) ? *size : 256;
     HRESULT hr;
 
-    TRACE("(%p, %p, %p, %u, %p, %u)\n", device, size, miplevels, usage, format, pool);
+    TRACE("device %p, size %p, miplevels %p, usage %#lx, format %p, pool %#x.\n",
+            device, size, miplevels, usage, format, pool);
 
     if (s == D3DX_DEFAULT)
         s = 256;
@@ -458,8 +459,8 @@ HRESULT WINAPI D3DXCheckVolumeTextureRequirements(struct IDirect3DDevice9 *devic
     UINT d = (depth && *depth) ? *depth : 1;
     HRESULT hr;
 
-    TRACE("(%p, %p, %p, %p, %p, %u, %p, %u)\n", device, width, height, depth, miplevels,
-          usage, format, pool);
+    TRACE("device %p, width %p, height %p, depth %p, miplevels %p, usage %#lx, format %p, pool %#x.\n",
+            device, width, height, depth, miplevels, usage, format, pool);
 
     if (!device || FAILED(IDirect3DDevice9_GetDeviceCaps(device, &caps)))
         return D3DERR_INVALIDCALL;
@@ -526,7 +527,7 @@ HRESULT WINAPI D3DXCreateTexture(struct IDirect3DDevice9 *device, UINT width, UI
 {
     HRESULT hr;
 
-    TRACE("device %p, width %u, height %u, miplevels %u, usage %#x, format %#x, pool %#x, texture %p.\n",
+    TRACE("device %p, width %u, height %u, miplevels %u, usage %#lx, format %#x, pool %#x, texture %p.\n",
             device, width, height, miplevels, usage, format, pool, texture);
 
     if (!device || !texture)
@@ -575,9 +576,9 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *devi
     D3DCAPS9 caps;
     HRESULT hr;
 
-    TRACE("device %p, srcdata %p, srcdatasize %u, width %u, height %u, miplevels %u,"
-            " usage %#x, format %#x, pool %#x, filter %#x, mipfilter %#x, colorkey %#x,"
-            " srcinfo %p, palette %p, texture %p.\n",
+    TRACE("device %p, srcdata %p, srcdatasize %u, width %u, height %u, miplevels %u, "
+            "usage %#lx, format %#x, pool %#x, filter %#lx, mipfilter %#lx, colorkey %#lx, "
+            "srcinfo %p, palette %p, texture %p.\n",
             device, srcdata, srcdatasize, width, height, miplevels, usage, format, pool,
             filter, mipfilter, colorkey, srcinfo, palette, texture);
 
@@ -744,7 +745,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *devi
 HRESULT WINAPI D3DXCreateTextureFromFileInMemory(struct IDirect3DDevice9 *device,
         const void *srcdata, UINT srcdatasize, struct IDirect3DTexture9 **texture)
 {
-    TRACE("(%p, %p, %d, %p)\n", device, srcdata, srcdatasize, texture);
+    TRACE("device %p, srcdata %p, srcdatasize %u, texture %p.\n", device, srcdata, srcdatasize, texture);
 
     return D3DXCreateTextureFromFileInMemoryEx(device, srcdata, srcdatasize, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN,
                                                D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture);
@@ -759,8 +760,8 @@ HRESULT WINAPI D3DXCreateTextureFromFileExW(struct IDirect3DDevice9 *device, con
     HRESULT hr;
     DWORD size;
 
-    TRACE("device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#x, format %#x, "
-            "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
+    TRACE("device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#lx, format %#x, "
+            "pool %#x, filter %#lx, mipfilter %#lx, colorkey 0x%08lx, srcinfo %p, palette %p, texture %p.\n",
             device, debugstr_w(srcfile), width, height, miplevels, usage, format,
             pool, filter, mipfilter, colorkey, srcinfo, palette, texture);
 
@@ -791,8 +792,8 @@ HRESULT WINAPI D3DXCreateTextureFromFileExA(struct IDirect3DDevice9 *device, con
     HRESULT hr;
     DWORD len;
 
-    TRACE("device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#x, format %#x, "
-            "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
+    TRACE("device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#lx, format %#x, "
+            "pool %#x, filter %#lx, mipfilter %#lx, colorkey 0x%08lx, srcinfo %p, palette %p, texture %p.\n",
             device, debugstr_a(srcfile), width, height, miplevels, usage, format,
             pool, filter, mipfilter, colorkey, srcinfo, palette, texture);
 
@@ -814,7 +815,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileExA(struct IDirect3DDevice9 *device, con
 HRESULT WINAPI D3DXCreateTextureFromFileA(struct IDirect3DDevice9 *device,
         const char *srcfile, struct IDirect3DTexture9 **texture)
 {
-    TRACE("(%p, %s, %p)\n", device, debugstr_a(srcfile), texture);
+    TRACE("device %p, srcfile %s, texture %p.\n", device, debugstr_a(srcfile), texture);
 
     return D3DXCreateTextureFromFileExA(device, srcfile, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN,
                                         D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture);
@@ -823,7 +824,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileA(struct IDirect3DDevice9 *device,
 HRESULT WINAPI D3DXCreateTextureFromFileW(struct IDirect3DDevice9 *device,
         const WCHAR *srcfile, struct IDirect3DTexture9 **texture)
 {
-    TRACE("(%p, %s, %p)\n", device, debugstr_w(srcfile), texture);
+    TRACE("device %p, srcfile %s, texture %p.\n", device, debugstr_w(srcfile), texture);
 
     return D3DXCreateTextureFromFileExW(device, srcfile, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN,
                                         D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture);
@@ -833,19 +834,23 @@ HRESULT WINAPI D3DXCreateTextureFromFileW(struct IDirect3DDevice9 *device,
 HRESULT WINAPI D3DXCreateTextureFromResourceA(struct IDirect3DDevice9 *device,
         HMODULE srcmodule, const char *resource, struct IDirect3DTexture9 **texture)
 {
-    TRACE("(%p, %s): relay\n", srcmodule, debugstr_a(resource));
+    TRACE("device %p, srcmodule %p, resource %s, texture %p.\n",
+            device, srcmodule, debugstr_a(resource), texture);
 
-    return D3DXCreateTextureFromResourceExA(device, srcmodule, resource, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN,
-                                            D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture);
+    return D3DXCreateTextureFromResourceExA(device, srcmodule, resource, D3DX_DEFAULT, D3DX_DEFAULT,
+            D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL,
+            NULL, texture);
 }
 
 HRESULT WINAPI D3DXCreateTextureFromResourceW(struct IDirect3DDevice9 *device,
         HMODULE srcmodule, const WCHAR *resource, struct IDirect3DTexture9 **texture)
 {
-    TRACE("(%p, %s): relay\n", srcmodule, debugstr_w(resource));
+    TRACE("device %p, srcmodule %p, resource %s, texture %p.\n",
+            device, srcmodule, debugstr_w(resource), texture);
 
-    return D3DXCreateTextureFromResourceExW(device, srcmodule, resource, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN,
-                                            D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture);
+    return D3DXCreateTextureFromResourceExW(device, srcmodule, resource, D3DX_DEFAULT, D3DX_DEFAULT,
+            D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL,
+            NULL, texture);
 }
 
 HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
@@ -857,8 +862,8 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device,
     void *buffer;
     DWORD size;
 
-    TRACE("device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, "
-            "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
+    TRACE("device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#lx, format %#x, "
+            "pool %#x, filter %#lx, mipfilter %#lx, colorkey 0x%08lx, srcinfo %p, palette %p, texture %p.\n",
             device, srcmodule, debugstr_a(resource), width, height, miplevels, usage, format,
             pool, filter, mipfilter, colorkey, srcinfo, palette, texture);
 
@@ -886,8 +891,8 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device,
     void *buffer;
     DWORD size;
 
-    TRACE("device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, "
-            "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
+    TRACE("device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#lx, format %#x, "
+            "pool %#x, filter %#lx, mipfilter %#lx, colorkey 0x%08lx, srcinfo %p, palette %p, texture %p.\n",
             device, srcmodule, debugstr_w(resource), width, height, miplevels, usage, format,
             pool, filter, mipfilter, colorkey, srcinfo, palette, texture);
 
@@ -911,8 +916,8 @@ HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size,
 {
     HRESULT hr;
 
-    TRACE("(%p, %u, %u, %#x, %#x, %#x, %p)\n", device, size, miplevels, usage, format,
-        pool, texture);
+    TRACE("device %p, size %u, miplevels %u, usage %#lx, format %#x, pool %#x, texture %p.\n",
+            device, size, miplevels, usage, format, pool, texture);
 
     if (!device || !texture)
         return D3DERR_INVALIDCALL;
@@ -931,7 +936,7 @@ HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size,
 HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device,
         const void *data, UINT datasize, struct IDirect3DCubeTexture9 **texture)
 {
-    TRACE("(%p, %p, %u, %p)\n", device, data, datasize, texture);
+    TRACE("device %p, data %p, datasize %u, texture %p.\n", device, data, datasize, texture);
 
     return D3DXCreateCubeTextureFromFileInMemoryEx(device, data, datasize, D3DX_DEFAULT, D3DX_DEFAULT,
         0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture);
@@ -942,8 +947,8 @@ HRESULT WINAPI D3DXCreateVolumeTexture(struct IDirect3DDevice9 *device, UINT wid
 {
     HRESULT hr;
 
-    TRACE("(%p, %u, %u, %u, %u, %#x, %#x, %#x, %p)\n", device, width, height, depth,
-          miplevels, usage, format, pool, texture);
+    TRACE("device %p, width %u, height %u, depth %u, miplevels %u, usage %#lx, format %#x, pool %#x, texture %p.\n",
+            device, width, height, depth, miplevels, usage, format, pool, texture);
 
     if (!device || !texture)
         return D3DERR_INVALIDCALL;
@@ -971,8 +976,7 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(IDirect3DDevice9 *device,
     DWORD data_size;
     WCHAR *filenameW;
 
-    TRACE("(%p, %s, %p): relay\n",
-            device, debugstr_a(filename), volume_texture);
+    TRACE("device %p, filename %s, volume_texture %p.\n", device, debugstr_a(filename), volume_texture);
 
     if (!filename) return D3DERR_INVALIDCALL;
 
@@ -1000,8 +1004,7 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(IDirect3DDevice9 *device,
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %p): relay\n",
-            device, debugstr_w(filename), volume_texture);
+    TRACE("device %p, filename %s, volume_texture %p.\n", device, debugstr_w(filename), volume_texture);
 
     if (!filename) return D3DERR_INVALIDCALL;
 
@@ -1037,10 +1040,11 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(IDirect3DDevice9 *device,
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
-            device, debugstr_a(filename), width, height, depth, mip_levels,
-            usage, format, pool, filter, mip_filter, color_key, src_info,
-            palette, volume_texture);
+    TRACE("device %p, filename %s, width %u, height %u, depth %u, mip_levels %u, usage %#lx, "
+            "format %#x, pool %#x, filter %#lx, mip_filter %#lx, color_key 0x%08lx, src_info %p, "
+            "palette %p, volume_texture %p.\n",
+            device, debugstr_a(filename), width, height, depth, mip_levels, usage,
+            format, pool, filter, mip_filter, color_key, src_info, palette, volume_texture);
 
     if (!filename) return D3DERR_INVALIDCALL;
 
@@ -1081,10 +1085,11 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(IDirect3DDevice9 *device,
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
-            device, debugstr_w(filename), width, height, depth, mip_levels,
-            usage, format, pool, filter, mip_filter, color_key, src_info,
-            palette, volume_texture);
+    TRACE("device %p, filename %s, width %u, height %u, depth %u, mip_levels %u, usage %#lx, "
+            "format %#x, pool %#x, filter %#lx, mip_filter %#lx, color_key 0x%08lx, src_info %p, "
+            "palette %p, volume_texture %p.\n",
+            device, debugstr_w(filename), width, height, depth, mip_levels, usage,
+            format, pool, filter, mip_filter, color_key, src_info, palette, volume_texture);
 
     if (!filename) return D3DERR_INVALIDCALL;
 
@@ -1104,29 +1109,17 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device,
                                                        UINT data_size,
                                                        IDirect3DVolumeTexture9 **volume_texture)
 {
-    TRACE("(%p, %p, %u, %p): relay\n", device, data, data_size, volume_texture);
+    TRACE("device %p, data %p, data_size %u, volume_texture %p.\n", device, data, data_size, volume_texture);
 
     return D3DXCreateVolumeTextureFromFileInMemoryEx(device, data, data_size, D3DX_DEFAULT, D3DX_DEFAULT,
         D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT,
         0, NULL, NULL, volume_texture);
 }
 
-HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
-                                                         const void *data,
-                                                         UINT data_size,
-                                                         UINT width,
-                                                         UINT height,
-                                                         UINT depth,
-                                                         UINT mip_levels,
-                                                         DWORD usage,
-                                                         D3DFORMAT format,
-                                                         D3DPOOL pool,
-                                                         DWORD filter,
-                                                         DWORD mip_filter,
-                                                         D3DCOLOR color_key,
-                                                         D3DXIMAGE_INFO *info,
-                                                         PALETTEENTRY *palette,
-                                                         IDirect3DVolumeTexture9 **volume_texture)
+HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, const void *data,
+        UINT data_size, UINT width, UINT height, UINT depth, UINT mip_levels, DWORD usage,
+        D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key,
+        D3DXIMAGE_INFO *info, PALETTEENTRY *palette, IDirect3DVolumeTexture9 **volume_texture)
 {
     HRESULT hr;
     D3DCAPS9 caps;
@@ -1139,7 +1132,9 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic
     BOOL file_mip_levels = FALSE;
     IDirect3DVolumeTexture9 *tex, *buftex;
 
-    TRACE("(%p, %p, %u, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p)\n",
+    TRACE("device %p, data %p, data_size %u, width %u, height %u, depth %u, mip_levels %u, "
+            "usage %#lx, format %#x, pool %#x, filter %#lx, mip_filter %#lx, color_key 0x%08lx, "
+            "info %p, palette %p, volume_texture %p.\n",
             device, data, data_size, width, height, depth, mip_levels, usage, format, pool,
             filter, mip_filter, color_key, info, palette, volume_texture);
 
@@ -1393,20 +1388,10 @@ HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, ID3DXTexture
     return E_NOTIMPL;
 }
 
-HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
-                                                       const void *src_data,
-                                                       UINT src_data_size,
-                                                       UINT size,
-                                                       UINT mip_levels,
-                                                       DWORD usage,
-                                                       D3DFORMAT format,
-                                                       D3DPOOL pool,
-                                                       DWORD filter,
-                                                       DWORD mip_filter,
-                                                       D3DCOLOR color_key,
-                                                       D3DXIMAGE_INFO *src_info,
-                                                       PALETTEENTRY *palette,
-                                                       IDirect3DCubeTexture9 **cube_texture)
+HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, const void *src_data,
+        UINT src_data_size, UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool,
+        DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info,
+        PALETTEENTRY *palette, IDirect3DCubeTexture9 **cube_texture)
 {
     HRESULT hr;
     D3DCAPS9 caps;
@@ -1418,9 +1403,11 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
     BOOL file_mip_levels = FALSE;
     IDirect3DCubeTexture9 *tex, *buftex;
 
-    TRACE("(%p, %p, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p)\n", device,
-        src_data, src_data_size, size, mip_levels, usage, format, pool, filter, mip_filter,
-        color_key, src_info, palette, cube_texture);
+    TRACE("device %p, src_data %p, src_data_size %u, size %u, mip_levels %u, usage %#lx, "
+            "format %#x, pool %#x, filter %#lx, mip_filter %#lx, color_key 0x%08lx, src_info %p, "
+            "palette %p, cube_texture %p.\n",
+            device, src_data, src_data_size, size, mip_levels, usage, format, pool, filter,
+            mip_filter, color_key, src_info, palette, cube_texture);
 
     if (!device || !cube_texture || !src_data || !src_data_size)
         return D3DERR_INVALIDCALL;
@@ -1534,7 +1521,7 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileA(IDirect3DDevice9 *device,
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %p): relay\n", device, wine_dbgstr_a(src_filename), cube_texture);
+    TRACE("device %p, src_filename %s, cube_texture %p.\n", device, wine_dbgstr_a(src_filename), cube_texture);
 
     if (!src_filename) return D3DERR_INVALIDCALL;
 
@@ -1566,7 +1553,7 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileW(IDirect3DDevice9 *device,
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %p): relay\n", device, wine_dbgstr_w(src_filename), cube_texture);
+    TRACE("device %p, src_filename %s, cube_texture %p.\n", device, wine_dbgstr_w(src_filename), cube_texture);
 
     hr = map_view_of_file(src_filename, &data, &data_size);
     if (FAILED(hr)) return D3DXERR_INVALIDDATA;
@@ -1578,19 +1565,10 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileW(IDirect3DDevice9 *device,
     return hr;
 }
 
-HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(IDirect3DDevice9 *device,
-                                                const char *src_filename,
-                                                UINT size,
-                                                UINT mip_levels,
-                                                DWORD usage,
-                                                D3DFORMAT format,
-                                                D3DPOOL pool,
-                                                DWORD filter,
-                                                DWORD mip_filter,
-                                                D3DCOLOR color_key,
-                                                D3DXIMAGE_INFO *image_info,
-                                                PALETTEENTRY *palette,
-                                                IDirect3DCubeTexture9 **cube_texture)
+HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(IDirect3DDevice9 *device, const char *src_filename,
+        UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter,
+        DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *image_info, PALETTEENTRY *palette,
+        IDirect3DCubeTexture9 **cube_texture)
 {
     int len;
     HRESULT hr;
@@ -1598,9 +1576,10 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(IDirect3DDevice9 *device,
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
-            device, wine_dbgstr_a(src_filename), size, mip_levels, usage, format,
-            pool, filter, mip_filter, color_key, image_info, palette, cube_texture);
+    TRACE("device %p, src_filename %s, size %u, mip_levels %u, usage %#lx, format %#x, pool %#x, "
+            "filter %#lx, mip_filter %#lx, color_key 0x%08lx, image_info %p, palette %p, cube_texture %p.\n",
+            device, wine_dbgstr_a(src_filename), size, mip_levels, usage, format, pool,
+            filter, mip_filter, color_key, image_info, palette, cube_texture);
 
     if (!src_filename) return D3DERR_INVALIDCALL;
 
@@ -1624,25 +1603,17 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(IDirect3DDevice9 *device,
     return hr;
 }
 
-HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(IDirect3DDevice9 *device,
-                                                const WCHAR *src_filename,
-                                                UINT size,
-                                                UINT mip_levels,
-                                                DWORD usage,
-                                                D3DFORMAT format,
-                                                D3DPOOL pool,
-                                                DWORD filter,
-                                                DWORD mip_filter,
-                                                D3DCOLOR color_key,
-                                                D3DXIMAGE_INFO *image_info,
-                                                PALETTEENTRY *palette,
-                                                IDirect3DCubeTexture9 **cube_texture)
+HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(IDirect3DDevice9 *device, const WCHAR *src_filename,
+        UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter,
+        DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *image_info, PALETTEENTRY *palette,
+        IDirect3DCubeTexture9 **cube_texture)
 {
     HRESULT hr;
     void *data;
     DWORD data_size;
 
-    TRACE("(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
+    TRACE("device %p, src_filename %s, size %u, mip_levels %u, usage %#lx, format %#x, pool %#x, "
+            "filter %#lx, mip_filter %#lx, color_key 0x%08lx, image_info %p, palette %p, cube_texture %p.\n",
             device, wine_dbgstr_w(src_filename), size, mip_levels, usage, format,
             pool, filter, mip_filter, color_key, image_info, palette, cube_texture);
 
@@ -1708,6 +1679,8 @@ HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DX
             {XCOORDINV, YCOORDINV, ZERO}
         };
 
+    TRACE("texture %p, function %p, funcdata %p.\n", texture, function, funcdata);
+
     if (texture == NULL || function == NULL)
         return D3DERR_INVALIDCALL;
 
@@ -1773,6 +1746,8 @@ HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LP
     const struct pixel_format_desc *format;
     BYTE *data;
 
+    TRACE("texture %p, function %p, funcdata %p.\n", texture, function, funcdata);
+
     if (texture == NULL || function == NULL)
         return D3DERR_INVALIDCALL;
 
@@ -1840,7 +1815,7 @@ HRESULT WINAPI D3DXSaveTextureToFileA(const char *dst_filename, D3DXIMAGE_FILEFO
     HRESULT hr;
     ID3DXBuffer *buffer;
 
-    TRACE("(%s, %#x, %p, %p): relay\n",
+    TRACE("dst_filename %s, file_format %u, src_texture %p, src_palette %p.\n",
             wine_dbgstr_a(dst_filename), file_format, src_texture, src_palette);
 
     if (!dst_filename) return D3DERR_INVALIDCALL;
@@ -1867,8 +1842,8 @@ HRESULT WINAPI D3DXSaveTextureToFileW(const WCHAR *dst_filename, D3DXIMAGE_FILEF
     HRESULT hr;
     ID3DXBuffer *buffer;
 
-    TRACE("(%s, %#x, %p, %p): relay\n",
-        wine_dbgstr_w(dst_filename), file_format, src_texture, src_palette);
+    TRACE("dst_filename %s, file_format %u, src_texture %p, src_palette %p.\n",
+            wine_dbgstr_w(dst_filename), file_format, src_texture, src_palette);
 
     if (!dst_filename) return D3DERR_INVALIDCALL;
 
@@ -1889,8 +1864,8 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
     D3DRESOURCETYPE type;
     IDirect3DSurface9 *surface;
 
-    TRACE("(%p, %#x, %p, %p)\n",
-        dst_buffer, file_format, src_texture, src_palette);
+    TRACE("dst_buffer %p, file_format %u, src_texture %p, src_palette %p.\n",
+            dst_buffer, file_format, src_texture, src_palette);
 
     if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
 
@@ -1926,7 +1901,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
 HRESULT WINAPI D3DXComputeNormalMap(IDirect3DTexture9 *texture, IDirect3DTexture9 *src_texture,
         const PALETTEENTRY *src_palette, DWORD flags, DWORD channel, float amplitude)
 {
-    FIXME("texture %p, src_texture %p, src_palette %p, flags %#x, channel %u, amplitude %.8e stub.\n",
+    FIXME("texture %p, src_texture %p, src_palette %p, flags %#lx, channel %lu, amplitude %.8e stub.\n",
             texture, src_texture, src_palette, flags, channel, amplitude);
 
     return D3D_OK;
diff --git a/dlls/d3dx9_36/volume.c b/dlls/d3dx9_36/volume.c
index d601650cff5..d7d52b72626 100644
--- a/dlls/d3dx9_36/volume.c
+++ b/dlls/d3dx9_36/volume.c
@@ -21,22 +21,17 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
 
-HRESULT WINAPI D3DXLoadVolumeFromFileA(IDirect3DVolume9 *dst_volume,
-                                       const PALETTEENTRY *dst_palette,
-                                       const D3DBOX *dst_box,
-                                       const char *filename,
-                                       const D3DBOX *src_box,
-                                       DWORD filter,
-                                       D3DCOLOR color_key,
-                                       D3DXIMAGE_INFO *info)
+HRESULT WINAPI D3DXLoadVolumeFromFileA(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette,
+        const D3DBOX *dst_box, const char *filename, const D3DBOX *src_box, DWORD filter,
+        D3DCOLOR color_key, D3DXIMAGE_INFO *info)
 {
     HRESULT hr;
     int length;
     WCHAR *filenameW;
 
-    TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n",
-            dst_volume, dst_palette, dst_box, debugstr_a(filename), src_box,
-            filter, color_key, info);
+    TRACE("dst_volume %p, dst_palette %p, dst_box %p, filename %s, src_box %p, filter %#lx, "
+            "color_key 0x%08lx, info %p.\n",
+            dst_volume, dst_palette, dst_box, debugstr_a(filename), src_box, filter, color_key, info);
 
     if (!dst_volume || !filename) return D3DERR_INVALIDCALL;
 
@@ -51,22 +46,17 @@ HRESULT WINAPI D3DXLoadVolumeFromFileA(IDirect3DVolume9 *dst_volume,
     return hr;
 }
 
-HRESULT WINAPI D3DXLoadVolumeFromFileW(IDirect3DVolume9 *dst_volume,
-                                       const PALETTEENTRY *dst_palette,
-                                       const D3DBOX *dst_box,
-                                       const WCHAR *filename,
-                                       const D3DBOX *src_box,
-                                       DWORD filter,
-                                       D3DCOLOR color_key,
-                                       D3DXIMAGE_INFO *info)
+HRESULT WINAPI D3DXLoadVolumeFromFileW(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette,
+        const D3DBOX *dst_box, const WCHAR *filename, const D3DBOX *src_box, DWORD filter,
+        D3DCOLOR color_key, D3DXIMAGE_INFO *info)
 {
     DWORD data_size;
     HRESULT hr;
     void *data;
 
-    TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n",
-            dst_volume, dst_palette, dst_box, debugstr_w(filename), src_box,
-            filter, color_key, info);
+    TRACE("dst_volume %p, dst_palette %p, dst_box %p, filename %s, src_box %p, filter %#lx, "
+            "color_key 0x%08lx, info %p.\n",
+            dst_volume, dst_palette, dst_box, debugstr_w(filename), src_box, filter, color_key, info);
 
     if (!dst_volume || !filename) return D3DERR_INVALIDCALL;
 
@@ -81,16 +71,9 @@ HRESULT WINAPI D3DXLoadVolumeFromFileW(IDirect3DVolume9 *dst_volume,
 }
 
 HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
-                                        const PALETTEENTRY *dst_palette,
-                                        const D3DBOX *dst_box,
-                                        const void *src_memory,
-                                        D3DFORMAT src_format,
-                                        UINT src_row_pitch,
-                                        UINT src_slice_pitch,
-                                        const PALETTEENTRY *src_palette,
-                                        const D3DBOX *src_box,
-                                        DWORD filter,
-                                        D3DCOLOR color_key)
+        const PALETTEENTRY *dst_palette, const D3DBOX *dst_box, const void *src_memory,
+        D3DFORMAT src_format, UINT src_row_pitch, UINT src_slice_pitch,
+        const PALETTEENTRY *src_palette, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key)
 {
     HRESULT hr;
     D3DVOLUME_DESC desc;
@@ -98,9 +81,10 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
     struct volume dst_size, src_size;
     const struct pixel_format_desc *src_format_desc, *dst_format_desc;
 
-    TRACE("(%p, %p, %p, %p, %#x, %u, %u, %p, %p, %x, %x)\n", dst_volume, dst_palette, dst_box,
-            src_memory, src_format, src_row_pitch, src_slice_pitch, src_palette, src_box,
-            filter, color_key);
+    TRACE("dst_volume %p, dst_palette %p, dst_box %p, src_memory %p, src_format %#x, "
+            "src_row_pitch %u, src_slice_pitch %u, src_palette %p, src_box %p, filter %#lx, color_key 0x%08lx.\n",
+            dst_volume, dst_palette, dst_box, src_memory, src_format, src_row_pitch, src_slice_pitch,
+            src_palette, src_box, filter, color_key);
 
     if (!dst_volume || !src_memory || !src_box) return D3DERR_INVALIDCALL;
 
@@ -210,7 +194,7 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
         else
         {
             if ((filter & 0xf) != D3DX_FILTER_POINT)
-                FIXME("Unhandled filter %#x.\n", filter);
+                FIXME("Unhandled filter %#lx.\n", filter);
 
             point_filter_argb_pixels(src_addr, src_row_pitch, src_slice_pitch, &src_size, src_format_desc,
                     locked_box.pBits, locked_box.RowPitch, locked_box.SlicePitch, &dst_size, dst_format_desc, color_key,
@@ -223,22 +207,16 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
     return D3D_OK;
 }
 
-HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume,
-                                              const PALETTEENTRY *dst_palette,
-                                              const D3DBOX *dst_box,
-                                              const void *src_data,
-                                              UINT src_data_size,
-                                              const D3DBOX *src_box,
-                                              DWORD filter,
-                                              D3DCOLOR color_key,
-                                              D3DXIMAGE_INFO *src_info)
+HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette,
+        const D3DBOX *dst_box, const void *src_data, UINT src_data_size, const D3DBOX *src_box,
+        DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info)
 {
     HRESULT hr;
     D3DBOX box;
     D3DXIMAGE_INFO image_info;
 
     TRACE("dst_volume %p, dst_palette %p, dst_box %p, src_data %p, src_data_size %u, src_box %p, "
-            "filter %#x, color_key 0x%08x, src_info %p.\n",
+            "filter %#lx, color_key 0x%08lx, src_info %p.\n",
             dst_volume, dst_palette, dst_box, src_data, src_data_size, src_box,
             filter, color_key, src_info);
 
@@ -284,23 +262,18 @@ HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume,
     return D3D_OK;
 }
 
-HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume,
-                                        const PALETTEENTRY *dst_palette,
-                                        const D3DBOX *dst_box,
-                                        IDirect3DVolume9 *src_volume,
-                                        const PALETTEENTRY *src_palette,
-                                        const D3DBOX *src_box,
-                                        DWORD filter,
-                                        D3DCOLOR color_key)
+HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette,
+        const D3DBOX *dst_box, IDirect3DVolume9 *src_volume, const PALETTEENTRY *src_palette,
+        const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key)
 {
     HRESULT hr;
     D3DBOX box;
     D3DVOLUME_DESC desc;
     D3DLOCKED_BOX locked_box;
 
-    TRACE("(%p, %p, %p, %p, %p, %p, %#x, %#x)\n",
-            dst_volume, dst_palette, dst_box, src_volume, src_palette, src_box,
-            filter, color_key);
+    TRACE("dst_volume %p, dst_palette %p, dst_box %p, src_volume %p, src_palette %p, src_box %p, "
+            "filter %#lx, color_key 0x%08lx.\n",
+            dst_volume, dst_palette, dst_box, src_volume, src_palette, src_box, filter, color_key);
 
     if (!dst_volume || !src_volume) return D3DERR_INVALIDCALL;
 
diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c
index c845ac289c5..ec38dc002b7 100644
--- a/dlls/d3dx9_36/xfile.c
+++ b/dlls/d3dx9_36/xfile.c
@@ -40,7 +40,7 @@ static HRESULT error_dxfile_to_d3dxfile(HRESULT error)
         case DXFILEERR_BADVALUE:
             return D3DXFERR_BADVALUE;
         default:
-            FIXME("Cannot map error %#x\n", error);
+            FIXME("Cannot map error %#lx.\n", error);
             return E_FAIL;
     }
 }
@@ -108,7 +108,7 @@ static ULONG WINAPI d3dx9_file_data_AddRef(ID3DXFileData *iface)
     struct d3dx9_file_data *file_data = impl_from_ID3DXFileData(iface);
     ULONG refcount = InterlockedIncrement(&file_data->ref);
 
-    TRACE("%p increasing refcount to %u.\n", file_data, refcount);
+    TRACE("%p increasing refcount to %lu.\n", file_data, refcount);
 
     return refcount;
 }
@@ -118,7 +118,7 @@ static ULONG WINAPI d3dx9_file_data_Release(ID3DXFileData *iface)
     struct d3dx9_file_data *file_data = impl_from_ID3DXFileData(iface);
     ULONG refcount = InterlockedDecrement(&file_data->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", file_data, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", file_data, refcount);
 
     if (!refcount)
     {
@@ -265,7 +265,7 @@ static HRESULT WINAPI d3dx9_file_data_GetChild(ID3DXFileData *iface, SIZE_T id,
 {
     struct d3dx9_file_data *file_data = impl_from_ID3DXFileData(iface);
 
-    TRACE("iface %p, id %#lx, object %p.\n", iface, id, object);
+    TRACE("iface %p, id %#Ix, object %p.\n", iface, id, object);
 
     if (!object)
         return E_POINTER;
@@ -410,7 +410,7 @@ static ULONG WINAPI d3dx9_file_enum_object_AddRef(ID3DXFileEnumObject *iface)
     struct d3dx9_file_enum_object *file_enum = impl_from_ID3DXFileEnumObject(iface);
     ULONG refcount = InterlockedIncrement(&file_enum->ref);
 
-    TRACE("%p increasing refcount to %u.\n", file_enum, refcount);
+    TRACE("%p increasing refcount to %lu.\n", file_enum, refcount);
 
     return refcount;
 }
@@ -420,7 +420,7 @@ static ULONG WINAPI d3dx9_file_enum_object_Release(ID3DXFileEnumObject *iface)
     struct d3dx9_file_enum_object *file_enum = impl_from_ID3DXFileEnumObject(iface);
     ULONG refcount = InterlockedDecrement(&file_enum->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", file_enum, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", file_enum, refcount);
 
     if (!refcount)
     {
@@ -463,7 +463,7 @@ static HRESULT WINAPI d3dx9_file_enum_object_GetChild(ID3DXFileEnumObject *iface
 {
     struct d3dx9_file_enum_object *file_enum = impl_from_ID3DXFileEnumObject(iface);
 
-    TRACE("iface %p, id %#lx, object %p.\n", iface, id, object);
+    TRACE("iface %p, id %#Ix, object %p.\n", iface, id, object);
 
     if (!object)
         return E_POINTER;
@@ -525,7 +525,7 @@ static ULONG WINAPI d3dx9_file_AddRef(ID3DXFile *iface)
     struct d3dx9_file *file = impl_from_ID3DXFile(iface);
     ULONG refcount = InterlockedIncrement(&file->ref);
 
-    TRACE("%p increasing refcount to %u.\n", file, refcount);
+    TRACE("%p increasing refcount to %lu.\n", file, refcount);
 
     return refcount;
 }
@@ -535,7 +535,7 @@ static ULONG WINAPI d3dx9_file_Release(ID3DXFile *iface)
     struct d3dx9_file *file = impl_from_ID3DXFile(iface);
     ULONG refcount = InterlockedDecrement(&file->ref);
 
-    TRACE("%p decreasing refcount to %u.\n", file, refcount);
+    TRACE("%p decreasing refcount to %lu.\n", file, refcount);
 
     if (!refcount)
     {
@@ -560,7 +560,7 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void *
     unsigned children_array_size = 0;
     HRESULT ret;
 
-    TRACE("iface %p, source %p, options %#x, enum_object %p.\n", iface, source, options, enum_object);
+    TRACE("iface %p, source %p, options %#lx, enum_object %p.\n", iface, source, options, enum_object);
 
     if (!enum_object)
         return E_POINTER;
@@ -593,7 +593,7 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void *
     }
     else
     {
-        FIXME("Source type %u is not handled yet\n", options);
+        FIXME("Source type %lu not handled yet.\n", options);
         return E_NOTIMPL;
     }
 
@@ -669,7 +669,7 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void *
 static HRESULT WINAPI d3dx9_file_CreateSaveObject(ID3DXFile *iface, const void *data,
         D3DXF_FILESAVEOPTIONS options, D3DXF_FILEFORMAT format, ID3DXFileSaveObject **save_object)
 {
-    FIXME("iface %p, data %p, options %#x, format %#x, save_object %p stub!\n",
+    FIXME("iface %p, data %p, options %#lx, format %#lx, save_object %p stub!\n",
             iface, data, options, format, save_object);
 
     return E_NOTIMPL;
@@ -680,12 +680,12 @@ static HRESULT WINAPI d3dx9_file_RegisterTemplates(ID3DXFile *iface, const void
     struct d3dx9_file *file = impl_from_ID3DXFile(iface);
     HRESULT ret;
 
-    TRACE("iface %p, data %p, size %lu.\n", iface, data, size);
+    TRACE("iface %p, data %p, size %Iu.\n", iface, data, size);
 
     ret = IDirectXFile_RegisterTemplates(file->dxfile, (void *)data, size);
     if (ret != DXFILE_OK)
     {
-        WARN("Error %#x\n", ret);
+        WARN("Error registering templates, hr %#lx.\n", ret);
         return error_dxfile_to_d3dxfile(ret);
     }
 
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
index a1fcc43af9a..f9a0d4085a8 100644
--- a/dlls/d3dx9_37/Makefile.in
+++ b/dlls/d3dx9_37/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=37
+EXTRADEFS = -DD3DX_SDK_VERSION=37
 MODULE    = d3dx9_37.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
index 29d8865b792..2814a4686f9 100644
--- a/dlls/d3dx9_38/Makefile.in
+++ b/dlls/d3dx9_38/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=38
+EXTRADEFS = -DD3DX_SDK_VERSION=38
 MODULE    = d3dx9_38.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
index a63a2288b55..61c44debd2f 100644
--- a/dlls/d3dx9_39/Makefile.in
+++ b/dlls/d3dx9_39/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=39
+EXTRADEFS = -DD3DX_SDK_VERSION=39
 MODULE    = d3dx9_39.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
index 263ad5b3769..c1e8f15edab 100644
--- a/dlls/d3dx9_40/Makefile.in
+++ b/dlls/d3dx9_40/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=40
+EXTRADEFS = -DD3DX_SDK_VERSION=40
 MODULE    = d3dx9_40.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
index a12e639a6ec..132a6971639 100644
--- a/dlls/d3dx9_41/Makefile.in
+++ b/dlls/d3dx9_41/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=41
+EXTRADEFS = -DD3DX_SDK_VERSION=41
 MODULE    = d3dx9_41.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
index f98ef0d6256..305cb9b34f5 100644
--- a/dlls/d3dx9_42/Makefile.in
+++ b/dlls/d3dx9_42/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=42
+EXTRADEFS = -DD3DX_SDK_VERSION=42
 MODULE    = d3dx9_42.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
index 86c6a8c51d2..bcf41038c2c 100644
--- a/dlls/d3dx9_43/Makefile.in
+++ b/dlls/d3dx9_43/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3DX_SDK_VERSION=43
+EXTRADEFS = -DD3DX_SDK_VERSION=43
 MODULE    = d3dx9_43.dll
 IMPORTS   = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
 PARENTSRC = ../d3dx9_36
-- 
GitLab

https://gitlab.winehq.org/wine/wine/-/merge_requests/102



More information about the wine-devel mailing list