You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f686957b39 | ||
|
|
d472acd179 | ||
|
|
c9ec1b4c08 | ||
|
|
588afb2427 | ||
|
|
efcf9f948e | ||
|
|
31b114a4e3 | ||
|
|
866ca1e24a | ||
|
|
79283b4b8e | ||
|
|
7c674a599b | ||
|
|
ec458fc7ae | ||
|
|
6f356eb1f5 | ||
|
|
672a2bae70 | ||
|
|
52f1f289f0 |
@@ -1,43 +0,0 @@
|
||||
From 9cf09446b0bf5da7988d1ba30c24d392c7a01f4b Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 12 Nov 2019 18:13:20 +0800
|
||||
Subject: [PATCH] comctl32: Bump version to 6.0.
|
||||
|
||||
An application that I have here checks comctl32.dll version information
|
||||
and refuses to run, changing DLL version to 6.0 makes it run.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/comctl32.rc | 2 +-
|
||||
include/commctrl.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc
|
||||
index 2c62dbe2720..473de211c67 100644
|
||||
--- a/dlls/comctl32/comctl32.rc
|
||||
+++ b/dlls/comctl32/comctl32.rc
|
||||
@@ -113,7 +113,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
|
||||
#define WINE_FILENAME_STR "comctl32.dll"
|
||||
-#define WINE_FILEVERSION COMCTL32_VERSION,81,4704,1100
|
||||
+#define WINE_FILEVERSION COMCTL32_VERSION,0,4704,1100
|
||||
|
||||
#include "wine/wine_common_ver.rc"
|
||||
|
||||
diff --git a/include/commctrl.h b/include/commctrl.h
|
||||
index 235704a76dd..5a67c1284a0 100644
|
||||
--- a/include/commctrl.h
|
||||
+++ b/include/commctrl.h
|
||||
@@ -59,7 +59,7 @@ enum _LI_METRIC
|
||||
WINCOMMCTRLAPI HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
|
||||
WINCOMMCTRLAPI HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
|
||||
|
||||
-#define COMCTL32_VERSION 5 /* dll version */
|
||||
+#define COMCTL32_VERSION 6 /* dll version */
|
||||
|
||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||
--
|
||||
2.47.2
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
From 4abe3ab87631c7bb6144437ff2e1473030d033cb Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 12:13:11 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMeshBuilder2 Clone stub
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 85 +++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 83 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 27e76c1cf25..0c765d77281 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -402,9 +402,90 @@ static ULONG WINAPI d3drm_mesh_builder2_Release(IDirect3DRMMeshBuilder2 *iface)
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_Clone(IDirect3DRMMeshBuilder2 *iface,
|
||||
IUnknown *outer, REFIID iid, void **out)
|
||||
{
|
||||
- FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
||||
+ struct d3drm_mesh_builder *mesh_builder = impl_from_IDirect3DRMMeshBuilder2(iface);
|
||||
+ struct d3drm_mesh_builder *mesh2;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ FIXME("iface %p, outer %p, iid %s, out %p Semi-stub\n", iface, outer, debugstr_guid(iid), out);
|
||||
+
|
||||
+ if (outer)
|
||||
+ FIXME("outer currently ignored\n");
|
||||
+
|
||||
+ *out = NULL;
|
||||
+
|
||||
+ hr = d3drm_mesh_builder_create(&mesh2, mesh_builder->d3drm);
|
||||
+ if(SUCCEEDED(hr))
|
||||
+ {
|
||||
+ mesh2->nb_vertices = mesh_builder->nb_vertices;
|
||||
+ mesh2->vertices_size = mesh_builder->vertices_size;
|
||||
+ if (mesh_builder->vertices && mesh_builder->nb_vertices)
|
||||
+ {
|
||||
+ if (!d3drm_array_reserve((void **)&mesh2->vertices, &mesh_builder->vertices_size, mesh_builder->nb_vertices,
|
||||
+ sizeof(*mesh_builder->vertices)))
|
||||
+ {
|
||||
+ IDirect3DRMMeshBuilder2_Release(&mesh2->IDirect3DRMMeshBuilder2_iface);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ memcpy(mesh2->vertices, mesh_builder->vertices, mesh_builder->nb_vertices * sizeof(*mesh_builder->vertices));
|
||||
+ }
|
||||
+
|
||||
+ mesh2->nb_normals = mesh_builder->nb_normals;
|
||||
+ mesh2->normals_size = mesh_builder->normals_size;
|
||||
+ if (mesh_builder->normals && mesh_builder->nb_normals)
|
||||
+ {
|
||||
+ if (!d3drm_array_reserve((void **)&mesh2->normals, &mesh_builder->normals_size,
|
||||
+ mesh_builder->nb_vertices, sizeof(*mesh_builder->normals)))
|
||||
+ {
|
||||
+ IDirect3DRMMeshBuilder2_Release(&mesh2->IDirect3DRMMeshBuilder2_iface);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ memcpy(mesh2->normals, mesh_builder->normals, mesh_builder->nb_normals * sizeof(*mesh_builder->normals));
|
||||
+ }
|
||||
+
|
||||
+ mesh2->nb_faces = mesh_builder->nb_faces;
|
||||
+ mesh2->face_data_size = mesh_builder->face_data_size;
|
||||
+ if (mesh_builder->pFaceData && mesh_builder->face_data_size)
|
||||
+ {
|
||||
+ mesh2->pFaceData = malloc(mesh_builder->face_data_size * 2);
|
||||
+ if(!mesh2->pFaceData)
|
||||
+ {
|
||||
+ IDirect3DRMMeshBuilder2_Release(&mesh2->IDirect3DRMMeshBuilder2_iface);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ memcpy(mesh2->pFaceData, mesh_builder->pFaceData, mesh_builder->face_data_size * 2);
|
||||
+ }
|
||||
+
|
||||
+ mesh2->nb_coords2d = mesh_builder->nb_coords2d;
|
||||
+ if (mesh_builder->pCoords2d && mesh_builder->nb_coords2d)
|
||||
+ {
|
||||
+ mesh2->pCoords2d = calloc(mesh_builder->nb_coords2d, sizeof(*mesh_builder->pCoords2d));
|
||||
+ if (!mesh2->pCoords2d)
|
||||
+ {
|
||||
+ IDirect3DRMMeshBuilder2_Release(&mesh2->IDirect3DRMMeshBuilder2_iface);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ memcpy(mesh2->pCoords2d, mesh_builder->pCoords2d, mesh_builder->nb_coords2d * sizeof(*mesh_builder->pCoords2d));
|
||||
+ }
|
||||
+
|
||||
+ mesh2->color = mesh_builder->color;
|
||||
+ mesh2->material = mesh_builder->material;
|
||||
+ if (mesh2->material)
|
||||
+ IDirect3DRMTexture2_AddRef(mesh2->material);
|
||||
+ mesh2->texture = mesh_builder->texture;
|
||||
+ if (mesh2->texture)
|
||||
+ IDirect3DRMTexture2_AddRef(mesh2->texture);
|
||||
+ mesh2->nb_materials = mesh_builder->nb_materials;
|
||||
+ if (mesh2->nb_materials > 0)
|
||||
+ FIXME("materials NOT copied yet\n");
|
||||
+ //struct mesh_material *materials;
|
||||
+ //DWORD *material_indices;
|
||||
+ mesh2->quality = mesh_builder->quality;
|
||||
+
|
||||
+ hr = IDirect3DRMMeshBuilder2_QueryInterface(&mesh2->IDirect3DRMMeshBuilder2_iface, iid, out);
|
||||
+ IDirect3DRMMeshBuilder2_Release(&mesh2->IDirect3DRMMeshBuilder3_iface);
|
||||
+ }
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_AddDestroyCallback(IDirect3DRMMeshBuilder2 *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 689dad471ce391ed9cfcbc91a4b6c2a00c21b7d8 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 12:31:55 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMeshBuilder2 AddFaces stub
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 0c765d77281..abad81c51ae 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -679,7 +679,9 @@ static HRESULT WINAPI d3drm_mesh_builder2_AddFaces(IDirect3DRMMeshBuilder2 *ifac
|
||||
FIXME("iface %p, vertex_count %lu, vertices %p, normal_count %lu, normals %p, face_data %p, array %p stub!\n",
|
||||
iface, vertex_count, vertices, normal_count, normals, face_data, array);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (array)
|
||||
+ *array = NULL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_ReserveSpace(IDirect3DRMMeshBuilder2 *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From d1beb46198beef65617571b6d4cebf7cf8618188 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 12:56:26 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMesh GetBox stubs
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 4 ++--
|
||||
dlls/d3drm/tests/d3drm.c | 8 ++++++++
|
||||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index abad81c51ae..2f0fe1df7ba 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -626,7 +626,7 @@ static HRESULT WINAPI d3drm_mesh_builder2_GetBox(IDirect3DRMMeshBuilder2 *iface,
|
||||
{
|
||||
FIXME("iface %p, box %p stub!\n", iface, box);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_GenerateNormals(IDirect3DRMMeshBuilder2 *iface)
|
||||
@@ -2594,7 +2594,7 @@ static HRESULT WINAPI d3drm_mesh_GetBox(IDirect3DRMMesh *iface, D3DRMBOX *box)
|
||||
{
|
||||
FIXME("iface %p, box %p stub!\n", iface, box);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return D3DRMERR_BOXNOTSET;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_AddGroup(IDirect3DRMMesh *iface, unsigned vertex_count,
|
||||
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
|
||||
index 5d478f24b1a..72e07dde7a8 100644
|
||||
--- a/dlls/d3drm/tests/d3drm.c
|
||||
+++ b/dlls/d3drm/tests/d3drm.c
|
||||
@@ -449,6 +449,7 @@ static void test_MeshBuilder(void)
|
||||
DWORD size;
|
||||
D3DCOLOR color;
|
||||
IUnknown *unk;
|
||||
+ D3DRMBOX box;
|
||||
|
||||
hr = Direct3DRMCreate(&d3drm);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface, hr %#lx\n", hr);
|
||||
@@ -694,6 +695,13 @@ static void test_MeshBuilder(void)
|
||||
IDirect3DRMMesh_Release(mesh);
|
||||
}
|
||||
|
||||
+ memset(&box, 0, sizeof(box));
|
||||
+ hr = IDirect3DRMMeshBuilder_GetBox(pMeshBuilder, &box);
|
||||
+ ok(hr == D3DRM_OK, "got hr %#lx.\n", hr);
|
||||
+
|
||||
+ expect_vector(&box.min, 1.0, 2.0f, 3.0f, 1);
|
||||
+ expect_vector(&box.max, 6.9f, 8.0f, 8.9f, 1);
|
||||
+
|
||||
hr = IDirect3DRMMeshBuilder_Scale(pMeshBuilder, 2, 3 ,4);
|
||||
ok(hr == D3DRM_OK, "Scale failed returning hr %#lx.\n", hr);
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From cfe0cdc509a8a69d151034aa0f709bdf556983c3 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 13:01:03 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMeshBuilder2 Translate
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 2f0fe1df7ba..8f9a3cb71a7 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -612,7 +612,7 @@ static HRESULT WINAPI d3drm_mesh_builder2_Translate(IDirect3DRMMeshBuilder2 *ifa
|
||||
{
|
||||
FIXME("iface %p, tx %.8e, ty %.8e, tz %.8e stub!\n", iface, tx, ty, tz);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_SetColorSource(IDirect3DRMMeshBuilder2 *iface, D3DRMCOLORSOURCE source)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
From c210f81d3e30136dd970e9c99e6d42225743f35e Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 14:19:14 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFrame2 SetPosition
|
||||
|
||||
---
|
||||
dlls/d3drm/frame.c | 31 ++++++++++++++++++++-----------
|
||||
1 file changed, 20 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
|
||||
index 7a5bd18cd33..80d47ce7896 100644
|
||||
--- a/dlls/d3drm/frame.c
|
||||
+++ b/dlls/d3drm/frame.c
|
||||
@@ -1452,28 +1452,37 @@ static HRESULT WINAPI d3drm_frame1_GetParent(IDirect3DRMFrame *iface, IDirect3DR
|
||||
return d3drm_frame2_GetParent(&frame->IDirect3DRMFrame2_iface, parent);
|
||||
}
|
||||
|
||||
+static HRESULT frame_get_position(struct d3drm_frame *frame, struct d3drm_frame *reference, D3DVECTOR *position)
|
||||
+{
|
||||
+ // TODO
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI d3drm_frame3_GetPosition(IDirect3DRMFrame3 *iface,
|
||||
IDirect3DRMFrame3 *reference, D3DVECTOR *position)
|
||||
{
|
||||
- FIXME("iface %p, reference %p, position %p stub!\n", iface, reference, position);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
+ struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
||||
+ struct d3drm_frame *ref = impl_from_IDirect3DRMFrame3(reference);
|
||||
+ TRACE("iface %p, reference %p, position %p\n", iface, ref, position);
|
||||
+ return frame_get_position(frame, NULL, position);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_GetPosition(IDirect3DRMFrame2 *iface,
|
||||
IDirect3DRMFrame *reference, D3DVECTOR *position)
|
||||
{
|
||||
- FIXME("iface %p, reference %p, position %p stub!\n", iface, reference, position);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
+ struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
||||
+ struct d3drm_frame *ref = impl_from_IDirect3DRMFrame(reference);
|
||||
+ TRACE("iface %p, reference %p, position %p\n", iface, ref, position);
|
||||
+ return frame_get_position(frame, NULL, position);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame1_GetPosition(IDirect3DRMFrame *iface,
|
||||
IDirect3DRMFrame *reference, D3DVECTOR *position)
|
||||
{
|
||||
- FIXME("iface %p, reference %p, position %p stub!\n", iface, reference, position);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
+ struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
||||
+ struct d3drm_frame *ref = impl_from_IDirect3DRMFrame(reference);
|
||||
+ TRACE("iface %p, reference %p, position %p\n", iface, reference, position);
|
||||
+ return frame_get_position(frame, ref, position);
|
||||
}
|
||||
|
||||
|
||||
@@ -2449,7 +2458,7 @@ static HRESULT WINAPI d3drm_frame3_SetPosition(IDirect3DRMFrame3 *iface,
|
||||
{
|
||||
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_SetPosition(IDirect3DRMFrame2 *iface,
|
||||
@@ -2457,7 +2466,7 @@ static HRESULT WINAPI d3drm_frame2_SetPosition(IDirect3DRMFrame2 *iface,
|
||||
{
|
||||
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame1_SetPosition(IDirect3DRMFrame *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 15f7fb029e62d7027ab6f0d5546a40bef4630daa Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 14:24:46 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFrame2 LookAt
|
||||
|
||||
---
|
||||
dlls/d3drm/frame.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
|
||||
index 80d47ce7896..f908ea8dfdf 100644
|
||||
--- a/dlls/d3drm/frame.c
|
||||
+++ b/dlls/d3drm/frame.c
|
||||
@@ -1800,7 +1800,7 @@ static HRESULT WINAPI d3drm_frame2_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMF
|
||||
{
|
||||
FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame1_LookAt(IDirect3DRMFrame *iface, IDirect3DRMFrame *target,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 92465f0808020ded4857ff303476a4d65ad90d0a Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 14:56:56 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFrame2 GetOrientation
|
||||
|
||||
---
|
||||
dlls/d3drm/frame.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
|
||||
index f908ea8dfdf..2044ba8a2cb 100644
|
||||
--- a/dlls/d3drm/frame.c
|
||||
+++ b/dlls/d3drm/frame.c
|
||||
@@ -1680,7 +1680,7 @@ static HRESULT WINAPI d3drm_frame2_GetOrientation(IDirect3DRMFrame2 *iface,
|
||||
{
|
||||
FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface, reference, dir, up);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame1_GetOrientation(IDirect3DRMFrame *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From fd8a5b167eee739e678b7d306bc70ccab1e33e33 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 15:21:26 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFrame2 Move
|
||||
|
||||
---
|
||||
dlls/d3drm/frame.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
|
||||
index 2044ba8a2cb..375413af1d7 100644
|
||||
--- a/dlls/d3drm/frame.c
|
||||
+++ b/dlls/d3drm/frame.c
|
||||
@@ -1815,14 +1815,14 @@ static HRESULT WINAPI d3drm_frame3_Move(IDirect3DRMFrame3 *iface, D3DVALUE delta
|
||||
{
|
||||
FIXME("iface %p, delta %.8e stub!\n", iface, delta);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_Move(IDirect3DRMFrame2 *iface, D3DVALUE delta)
|
||||
{
|
||||
FIXME("iface %p, delta %.8e stub!\n", iface, delta);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame1_Move(IDirect3DRMFrame *iface, D3DVALUE delta)
|
||||
@@ -2483,7 +2483,7 @@ static HRESULT WINAPI d3drm_frame3_SetRotation(IDirect3DRMFrame3 *iface,
|
||||
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
|
||||
iface, reference, x, y, z, theta);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_SetRotation(IDirect3DRMFrame2 *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From eed9eef5f7dda1c86dd59aa284f158ba33008480 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 4 Jun 2022 14:48:54 +1000
|
||||
Subject: [PATCH] d3drm: SetBufferCount Fake success
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=43180
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3drm/device.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c
|
||||
index 1a433746224..fe85784ee63 100644
|
||||
--- a/dlls/d3drm/device.c
|
||||
+++ b/dlls/d3drm/device.c
|
||||
@@ -783,7 +783,7 @@ static HRESULT WINAPI d3drm_device3_SetBufferCount(IDirect3DRMDevice3 *iface, DW
|
||||
{
|
||||
FIXME("iface %p, count %lu stub!\n", iface, count);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_device2_SetBufferCount(IDirect3DRMDevice2 *iface, DWORD count)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
From 5da19416de998bfc236534d0e333c2c0454fdace Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 13 Jun 2022 17:21:45 +1000
|
||||
Subject: [PATCH] d3drm: AddVertext creates a Coordinates list
|
||||
|
||||
---
|
||||
dlls/d3drm/d3drm_private.h | 2 +-
|
||||
dlls/d3drm/meshbuilder.c | 6 ++++-
|
||||
dlls/d3drm/tests/d3drm.c | 48 ++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 54 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h
|
||||
index e07efa1c799..53d2d76d18a 100644
|
||||
--- a/dlls/d3drm/d3drm_private.h
|
||||
+++ b/dlls/d3drm/d3drm_private.h
|
||||
@@ -161,7 +161,7 @@ struct d3drm_mesh_builder
|
||||
DWORD nb_faces;
|
||||
DWORD face_data_size;
|
||||
void *pFaceData;
|
||||
- DWORD nb_coords2d;
|
||||
+ SIZE_T nb_coords2d;
|
||||
struct coords_2d *pCoords2d;
|
||||
D3DCOLOR color;
|
||||
IDirect3DRMMaterial2 *material;
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 8f9a3cb71a7..70ab332359c 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -1232,7 +1232,7 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData,
|
||||
|
||||
mesh_builder->nb_coords2d = *(DWORD*)ptr;
|
||||
|
||||
- TRACE("MeshTextureCoords: nb_coords2d = %ld\n", mesh_builder->nb_coords2d);
|
||||
+ TRACE("MeshTextureCoords: nb_coords2d = %Iu\n", mesh_builder->nb_coords2d);
|
||||
|
||||
mesh_builder->pCoords2d = calloc(mesh_builder->nb_coords2d, sizeof(*mesh_builder->pCoords2d));
|
||||
memcpy(mesh_builder->pCoords2d, ptr + sizeof(DWORD), mesh_builder->nb_coords2d * sizeof(*mesh_builder->pCoords2d));
|
||||
@@ -1949,6 +1949,10 @@ static int WINAPI d3drm_mesh_builder3_AddVertex(IDirect3DRMMeshBuilder3 *iface,
|
||||
mesh_builder->vertices[mesh_builder->nb_vertices].y = y;
|
||||
mesh_builder->vertices[mesh_builder->nb_vertices].z = z;
|
||||
|
||||
+ if (!d3drm_array_reserve((void **)&mesh_builder->pCoords2d, &mesh_builder->nb_coords2d,
|
||||
+ mesh_builder->nb_coords2d + 1, sizeof(*mesh_builder->pCoords2d)))
|
||||
+ return 0;
|
||||
+
|
||||
return mesh_builder->nb_vertices++;
|
||||
}
|
||||
|
||||
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
|
||||
index 72e07dde7a8..778ab2546db 100644
|
||||
--- a/dlls/d3drm/tests/d3drm.c
|
||||
+++ b/dlls/d3drm/tests/d3drm.c
|
||||
@@ -851,6 +851,53 @@ static void test_Mesh(void)
|
||||
IDirect3DRM_Release(d3drm);
|
||||
}
|
||||
|
||||
+static void test_Mesh_Vertices(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ IDirect3DRM *d3drm;
|
||||
+ IDirect3DRM2 *d3drm2;
|
||||
+ IDirect3DRMMesh *mesh;
|
||||
+ IDirect3DRMMeshBuilder2 *builder;
|
||||
+ D3DVALUE u, v;
|
||||
+ int idx;
|
||||
+
|
||||
+ hr = Direct3DRMCreate(&d3drm);
|
||||
+ ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface, hr %#lx\n", hr);
|
||||
+
|
||||
+ if (FAILED(hr = IDirect3DRM_QueryInterface(d3drm, &IID_IDirect3DRM2, (void **)&d3drm2)))
|
||||
+ {
|
||||
+ win_skip("Cannot get IDirect3DRM2 interface, hr %#lx, skipping tests\n", hr);
|
||||
+ IDirect3DRM_Release(d3drm);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ hr = IDirect3DRM_CreateMesh(d3drm, &mesh);
|
||||
+ ok(hr == D3DRM_OK, "Cannot get IDirect3DRMMesh interface, hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DRM2_CreateMeshBuilder(d3drm2, &builder);
|
||||
+ ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
+
|
||||
+ idx = IDirect3DRMMeshBuilder_AddVertex(builder, -2.95f, 0.0f, 2.95f);
|
||||
+ ok(idx == 0, "got hr %d\n", idx);
|
||||
+
|
||||
+ hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(builder, 0, 0.0f, 0.0f);
|
||||
+ ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
+
|
||||
+ idx = IDirect3DRMMeshBuilder_AddVertex(builder, -2.95f, 0.0f, 2.95f);
|
||||
+ ok(idx == 1, "got hr %d\n", idx);
|
||||
+
|
||||
+ hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(builder, idx, &u, &v);
|
||||
+ ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
+ ok(u == 0.0f, "got hr %.8e\n", u);
|
||||
+ ok(v == 0.0f, "got hr %.8e\n", v);
|
||||
+
|
||||
+ IDirect3DRMMeshBuilder_Release(builder);
|
||||
+ IDirect3DRMMesh_Release(mesh);
|
||||
+
|
||||
+ IDirect3DRM2_Release(d3drm2);
|
||||
+ IDirect3DRM_Release(d3drm);
|
||||
+}
|
||||
+
|
||||
static void test_Face(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
@@ -8243,6 +8290,7 @@ START_TEST(d3drm)
|
||||
test_MeshBuilder();
|
||||
test_MeshBuilder3();
|
||||
test_Mesh();
|
||||
+ test_Mesh_Vertices();
|
||||
test_Face();
|
||||
test_Frame();
|
||||
test_Device();
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From ca13260b9498991535cb5544cd75716055ef3c8d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 13 Jun 2022 17:53:37 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFace2 AddVertexAndNormalIndexed
|
||||
|
||||
---
|
||||
dlls/d3drm/face.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/face.c b/dlls/d3drm/face.c
|
||||
index 34810894e13..ce75c68bb59 100644
|
||||
--- a/dlls/d3drm/face.c
|
||||
+++ b/dlls/d3drm/face.c
|
||||
@@ -206,9 +206,11 @@ static HRESULT WINAPI d3drm_face1_AddVertex(IDirect3DRMFace *iface, D3DVALUE x,
|
||||
static HRESULT WINAPI d3drm_face1_AddVertexAndNormalIndexed(IDirect3DRMFace *iface,
|
||||
DWORD vertex, DWORD normal)
|
||||
{
|
||||
- FIXME("iface %p, vertex %lu, normal %lu stub!\n", iface, vertex, normal);
|
||||
+ struct d3drm_face *face = impl_from_IDirect3DRMFace(iface);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("iface %p, vertex %lu, normal %lu stub!\n", iface, vertex, normal);
|
||||
+
|
||||
+ return IDirect3DRMFace2_AddVertexAndNormalIndexed(&face->IDirect3DRMFace2_iface, vertex, normal);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_face2_SetColorRGB(IDirect3DRMFace2 *iface, D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
||||
@@ -477,7 +479,7 @@ static HRESULT WINAPI d3drm_face2_AddVertexAndNormalIndexed(IDirect3DRMFace2 *if
|
||||
{
|
||||
FIXME("iface %p, vertex %lu, normal %lu stub!\n", iface, vertex, normal);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_face2_SetTexture(IDirect3DRMFace2 *iface, IDirect3DRMTexture3 *texture)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 024440f60adfa202d2b828d7a01f22afcae8115b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 13 Jun 2022 17:57:01 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFace SetTexture
|
||||
|
||||
---
|
||||
dlls/d3drm/face.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/face.c b/dlls/d3drm/face.c
|
||||
index ce75c68bb59..d5e9c424a00 100644
|
||||
--- a/dlls/d3drm/face.c
|
||||
+++ b/dlls/d3drm/face.c
|
||||
@@ -256,9 +256,11 @@ static HRESULT WINAPI d3drm_face1_SetColor(IDirect3DRMFace *iface, D3DCOLOR colo
|
||||
|
||||
static HRESULT WINAPI d3drm_face1_SetTexture(IDirect3DRMFace *iface, IDirect3DRMTexture *texture)
|
||||
{
|
||||
- FIXME("iface %p, texture %p stub!\n", iface, texture);
|
||||
+ struct d3drm_face *face = impl_from_IDirect3DRMFace(iface);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("iface %p, texture %p\n", iface, texture);
|
||||
+
|
||||
+ return IDirect3DRMFace2_SetTexture(&face->IDirect3DRMFace2_iface, (IDirect3DRMTexture3 *)texture);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_face1_SetTextureCoordinates(IDirect3DRMFace *iface,
|
||||
@@ -486,7 +488,7 @@ static HRESULT WINAPI d3drm_face2_SetTexture(IDirect3DRMFace2 *iface, IDirect3DR
|
||||
{
|
||||
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_face2_SetTextureCoordinates(IDirect3DRMFace2 *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From bcf0490e2858412f0635564c9401525c808fca11 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 13 Jun 2022 18:00:42 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMeshBuilder2 SetPerspective
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 70ab332359c..1b9edab8559 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -761,9 +761,10 @@ static HRESULT WINAPI d3drm_mesh_builder2_SetQuality(IDirect3DRMMeshBuilder2 *if
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_SetPerspective(IDirect3DRMMeshBuilder2 *iface, BOOL enable)
|
||||
{
|
||||
- FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
||||
+ struct d3drm_mesh_builder *mesh_builder = impl_from_IDirect3DRMMeshBuilder2(iface);
|
||||
+ TRACE("iface %p, enable %#x\n", iface, enable);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return IDirect3DRMMeshBuilder3_SetPerspective(&mesh_builder->IDirect3DRMMeshBuilder3_iface, enable);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_SetVertex(IDirect3DRMMeshBuilder2 *iface,
|
||||
@@ -1847,7 +1848,7 @@ static HRESULT WINAPI d3drm_mesh_builder3_SetPerspective(IDirect3DRMMeshBuilder3
|
||||
{
|
||||
FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder3_SetVertex(IDirect3DRMMeshBuilder3 *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From d5853bbfca7e77f2218382dcd5ebe34367584e3c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 13 Jun 2022 18:05:39 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMeshBuilder2 GenerateNormals
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 1b9edab8559..1befe032c70 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -631,9 +631,10 @@ static HRESULT WINAPI d3drm_mesh_builder2_GetBox(IDirect3DRMMeshBuilder2 *iface,
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_builder2_GenerateNormals(IDirect3DRMMeshBuilder2 *iface)
|
||||
{
|
||||
- FIXME("iface %p stub!\n", iface);
|
||||
+ struct d3drm_mesh_builder *mesh_builder = impl_from_IDirect3DRMMeshBuilder2(iface);
|
||||
+ TRACE("iface %p\n", iface);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return IDirect3DRMMeshBuilder3_GenerateNormals(&mesh_builder->IDirect3DRMMeshBuilder3_iface, 0, 0);
|
||||
}
|
||||
|
||||
static D3DRMCOLORSOURCE WINAPI d3drm_mesh_builder2_GetColorSource(IDirect3DRMMeshBuilder2 *iface)
|
||||
@@ -1710,7 +1711,7 @@ static HRESULT WINAPI d3drm_mesh_builder3_GenerateNormals(IDirect3DRMMeshBuilder
|
||||
{
|
||||
FIXME("iface %p, crease %.8e, flags %#lx stub!\n", iface, crease, flags);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static D3DRMCOLORSOURCE WINAPI d3drm_mesh_builder3_GetColorSource(IDirect3DRMMeshBuilder3 *iface)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
From 4e64334180165d4a5fa44e9aa30bb301195a631f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 13 Jun 2022 19:23:43 +1000
|
||||
Subject: [PATCH] d3drm: Implement IDirect3DRMViewport Pick
|
||||
|
||||
---
|
||||
dlls/d3drm/viewport.c | 129 +++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 127 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c
|
||||
index 821eb1ff12c..f6d824b6488 100644
|
||||
--- a/dlls/d3drm/viewport.c
|
||||
+++ b/dlls/d3drm/viewport.c
|
||||
@@ -822,20 +822,145 @@ static HRESULT WINAPI d3drm_viewport1_GetPlane(IDirect3DRMViewport *iface,
|
||||
return d3drm_viewport2_GetPlane(&viewport->IDirect3DRMViewport2_iface, left, right, bottom, top);
|
||||
}
|
||||
|
||||
+struct d3drm_picked_array
|
||||
+{
|
||||
+ IDirect3DRMPickedArray IDirect3DRMPickedArray_iface;
|
||||
+ LONG ref;
|
||||
+ ULONG size;
|
||||
+};
|
||||
+
|
||||
+static inline struct d3drm_picked_array *impl_from_IDirect3DRMPickedArray(IDirect3DRMPickedArray *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct d3drm_picked_array, IDirect3DRMPickedArray_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3drm_picked_array_QueryInterface(IDirect3DRMPickedArray *iface, REFIID riid, void **out)
|
||||
+{
|
||||
+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IDirect3DRMPickedArray)
|
||||
+ || IsEqualGUID(riid, &IID_IUnknown))
|
||||
+ {
|
||||
+ IDirect3DRMPickedArray_AddRef(iface);
|
||||
+ *out = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
||||
+
|
||||
+ *out = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3drm_picked_array_AddRef(IDirect3DRMPickedArray *iface)
|
||||
+{
|
||||
+ struct d3drm_picked_array *array = impl_from_IDirect3DRMPickedArray(iface);
|
||||
+ ULONG refcount = InterlockedIncrement(&array->ref);
|
||||
+
|
||||
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3drm_picked_array_Release(IDirect3DRMPickedArray *iface)
|
||||
+{
|
||||
+ struct d3drm_picked_array *array = impl_from_IDirect3DRMPickedArray(iface);
|
||||
+ ULONG refcount = InterlockedDecrement(&array->ref);
|
||||
+// ULONG i;
|
||||
+
|
||||
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
|
||||
+
|
||||
+ if (!refcount)
|
||||
+ {
|
||||
+/* for (i = 0; i < array->size; ++i)
|
||||
+ {
|
||||
+ IDirect3DRMVisual_Release(array->visuals[i]);
|
||||
+ }*/
|
||||
+ //free(array->visuals);
|
||||
+ free(array);
|
||||
+ }
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static DWORD WINAPI d3drm_picked_array_GetSize(IDirect3DRMPickedArray *iface)
|
||||
+{
|
||||
+ struct d3drm_picked_array *array = impl_from_IDirect3DRMPickedArray(iface);
|
||||
+
|
||||
+ TRACE("iface %p.\n", iface);
|
||||
+
|
||||
+ return array->size;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3drm_picked_array_GetPick(IDirect3DRMPickedArray *iface,
|
||||
+ DWORD index, IDirect3DRMVisual **visual, IDirect3DRMFrameArray **frame_array,
|
||||
+ D3DRMPICKDESC *pick_desc)
|
||||
+{
|
||||
+ struct d3drm_picked_array *array = impl_from_IDirect3DRMPickedArray(iface);
|
||||
+
|
||||
+ TRACE("iface %p, index %lu, visual %p, frame_array %p, pick_desc %p.\n", iface, index,
|
||||
+ visual, frame_array, pick_desc);
|
||||
+
|
||||
+ //if (!visual)
|
||||
+ return D3DRMERR_BADVALUE;
|
||||
+
|
||||
+ /*if (index >= array->size)
|
||||
+ {
|
||||
+ *visual = NULL;
|
||||
+ return D3DRMERR_BADVALUE;
|
||||
+ }
|
||||
+
|
||||
+ IDirect3DRMVisual_AddRef(array->visuals[index]);
|
||||
+ *visual = array->visuals[index];
|
||||
+
|
||||
+ return D3DRM_OK;*/
|
||||
+}
|
||||
+
|
||||
+static const struct IDirect3DRMPickedArrayVtbl d3drm_picked_array_vtbl =
|
||||
+{
|
||||
+ d3drm_picked_array_QueryInterface,
|
||||
+ d3drm_picked_array_AddRef,
|
||||
+ d3drm_picked_array_Release,
|
||||
+ d3drm_picked_array_GetSize,
|
||||
+ d3drm_picked_array_GetPick,
|
||||
+};
|
||||
+
|
||||
static HRESULT WINAPI d3drm_viewport2_Pick(IDirect3DRMViewport2 *iface,
|
||||
LONG x, LONG y, IDirect3DRMPickedArray **visuals)
|
||||
{
|
||||
+ struct d3drm_picked_array *array;
|
||||
FIXME("iface %p, x %ld, y %ld, visuals %p stub!\n", iface, x, y, visuals);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (!(array = calloc(1, sizeof(*array))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ array->IDirect3DRMPickedArray_iface.lpVtbl = &d3drm_picked_array_vtbl;
|
||||
+ array->ref = 1;
|
||||
+ array->size = 0;
|
||||
+
|
||||
+ *visuals = &array->IDirect3DRMPickedArray_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_viewport1_Pick(IDirect3DRMViewport *iface,
|
||||
LONG x, LONG y, IDirect3DRMPickedArray **visuals)
|
||||
{
|
||||
+ struct d3drm_picked_array *array;
|
||||
+// unsigned int i;
|
||||
+
|
||||
FIXME("iface %p, x %ld, y %ld, visuals %p stub!\n", iface, x, y, visuals);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (!(array = calloc(1, sizeof(*array))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ array->IDirect3DRMPickedArray_iface.lpVtbl = &d3drm_picked_array_vtbl;
|
||||
+ array->ref = 1;
|
||||
+ array->size = 0;
|
||||
+
|
||||
+ *visuals = &array->IDirect3DRMPickedArray_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static BOOL WINAPI d3drm_viewport2_GetUniformScaling(IDirect3DRMViewport2 *iface)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 3e1521e42f9ba77074be3caa8041f9844ca8dc71 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 15 Sep 2023 15:14:28 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMesh SetGroupMapping fake success.
|
||||
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index 1befe032c70..ec2615a016d 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -2715,7 +2715,7 @@ static HRESULT WINAPI d3drm_mesh_SetGroupMapping(IDirect3DRMMesh *iface, D3DRMGR
|
||||
{
|
||||
FIXME("iface %p, id %#lx, value %#lx stub!\n", iface, id, value);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_SetGroupQuality(IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, D3DRMRENDERQUALITY value)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 61ed2e5563b365fb0bd4e581d03ca8300cd1b4ee Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 15 Sep 2023 15:33:13 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMMesh Clone semi-stub
|
||||
|
||||
Needs to copy all members.
|
||||
---
|
||||
dlls/d3drm/meshbuilder.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
|
||||
index ec2615a016d..3e57fa99435 100644
|
||||
--- a/dlls/d3drm/meshbuilder.c
|
||||
+++ b/dlls/d3drm/meshbuilder.c
|
||||
@@ -2508,9 +2508,20 @@ static ULONG WINAPI d3drm_mesh_Release(IDirect3DRMMesh *iface)
|
||||
static HRESULT WINAPI d3drm_mesh_Clone(IDirect3DRMMesh *iface,
|
||||
IUnknown *outer, REFIID iid, void **out)
|
||||
{
|
||||
+ struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
|
||||
+ struct d3drm_mesh *meshout;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ hr = d3drm_mesh_create(&meshout, mesh->d3drm);
|
||||
+ if (FAILED(hr))
|
||||
+ return hr;
|
||||
+
|
||||
+ hr = IDirect3DRMMesh_QueryInterface(&meshout->IDirect3DRMMesh_iface, iid, out);
|
||||
+ IDirect3DRMMesh_Release(&meshout->IDirect3DRMMesh_iface);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_mesh_AddDestroyCallback(IDirect3DRMMesh *iface,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
From ec155c69fa91896ed148f17934872b59a9809dfe Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 13 May 2022 14:56:03 +1000
|
||||
Subject: [PATCH] d3drm: IDirect3DRMFrame2 SetSceneBackgroundImage
|
||||
|
||||
---
|
||||
dlls/d3drm/d3drm_private.h | 1 +
|
||||
dlls/d3drm/frame.c | 38 +++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 32 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h
|
||||
index 2fb6bafe951..31fdd4984a1 100644
|
||||
--- a/dlls/d3drm/d3drm_private.h
|
||||
+++ b/dlls/d3drm/d3drm_private.h
|
||||
@@ -81,6 +81,7 @@ struct d3drm_frame
|
||||
IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
|
||||
IDirect3DRM *d3drm;
|
||||
LONG ref;
|
||||
+ IUnknown *backgroundimage;
|
||||
struct d3drm_frame *parent;
|
||||
SIZE_T nb_children;
|
||||
SIZE_T children_size;
|
||||
diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
|
||||
index 3e33e9e65b7..edd79996b36 100644
|
||||
--- a/dlls/d3drm/frame.c
|
||||
+++ b/dlls/d3drm/frame.c
|
||||
@@ -608,6 +608,8 @@ static ULONG WINAPI d3drm_frame3_Release(IDirect3DRMFrame3 *iface)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
+ if (frame->backgroundimage)
|
||||
+ IUnknown_Release(frame->backgroundimage);
|
||||
d3drm_object_cleanup((IDirect3DRMObject *)&frame->IDirect3DRMFrame_iface, &frame->obj);
|
||||
for (i = 0; i < frame->nb_children; ++i)
|
||||
{
|
||||
@@ -2231,25 +2233,47 @@ static HRESULT WINAPI d3drm_frame1_SetSceneBackgroundDepth(IDirect3DRMFrame *ifa
|
||||
static HRESULT WINAPI d3drm_frame3_SetSceneBackgroundImage(IDirect3DRMFrame3 *iface,
|
||||
IDirect3DRMTexture3 *texture)
|
||||
{
|
||||
- FIXME("iface %p, texture %p stub!\n", iface, texture);
|
||||
+ struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
||||
+ IUnknown *unk = NULL;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("iface %p, texture %p\n", iface, texture);
|
||||
+
|
||||
+ if (texture)
|
||||
+ IDirect3DRMTexture3_QueryInterface(texture, &IID_IUnknown, (void**)&unk);
|
||||
+
|
||||
+ if (frame->backgroundimage)
|
||||
+ IUnknown_Release(frame->backgroundimage);
|
||||
+
|
||||
+ frame->backgroundimage = unk;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_SetSceneBackgroundImage(IDirect3DRMFrame2 *iface,
|
||||
IDirect3DRMTexture *texture)
|
||||
{
|
||||
- FIXME("iface %p, texture %p stub!\n", iface, texture);
|
||||
+ struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
||||
+ IUnknown *unk = NULL;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("iface %p, texture %p\n", iface, texture);
|
||||
+
|
||||
+ if (texture)
|
||||
+ IDirect3DRMTexture_QueryInterface(texture, &IID_IUnknown, (void**)&unk);
|
||||
+
|
||||
+ if (frame->backgroundimage)
|
||||
+ IUnknown_Release(frame->backgroundimage);
|
||||
+
|
||||
+ frame->backgroundimage = unk;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame1_SetSceneBackgroundImage(IDirect3DRMFrame *iface,
|
||||
IDirect3DRMTexture *texture)
|
||||
{
|
||||
- FIXME("iface %p, texture %p stub!\n", iface, texture);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
+ struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
||||
+ TRACE("iface %p, texture %p\n", iface, texture);
|
||||
+ return d3drm_frame2_SetSceneBackgroundImage(&frame->IDirect3DRMFrame2_iface, texture);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame3_SetSceneFogEnable(IDirect3DRMFrame3 *iface, BOOL enable)
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
From 7ca327871878f4aa56e608b6436a4200a355392d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 22 Jun 2022 10:09:17 +1000
|
||||
Subject: [PATCH] d3drm: Implement IDirect3DRMViewport Render
|
||||
|
||||
This tests should that this shouldn't be background shouldn't be updated
|
||||
in Render. Code to show what needs to be done but isn't in the correct
|
||||
location for now.
|
||||
---
|
||||
dlls/d3drm/Makefile.in | 2 +-
|
||||
dlls/d3drm/d3drm_private.h | 4 ++
|
||||
dlls/d3drm/device.c | 9 +++
|
||||
dlls/d3drm/frame.c | 9 +++
|
||||
dlls/d3drm/texture.c | 9 +++
|
||||
dlls/d3drm/viewport.c | 110 +++++++++++++++++++++++++++++++++++--
|
||||
6 files changed, 138 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/Makefile.in b/dlls/d3drm/Makefile.in
|
||||
index e5381b4919c..0ae6c023081 100644
|
||||
--- a/dlls/d3drm/Makefile.in
|
||||
+++ b/dlls/d3drm/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
MODULE = d3drm.dll
|
||||
IMPORTLIB = d3drm
|
||||
-IMPORTS = d3dxof ddraw
|
||||
+IMPORTS = d3dxof ddraw gdi32
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h
|
||||
index 5d060f09493..35320adb882 100644
|
||||
--- a/dlls/d3drm/d3drm_private.h
|
||||
+++ b/dlls/d3drm/d3drm_private.h
|
||||
@@ -287,10 +287,14 @@ HRESULT d3drm_object_set_name(struct d3drm_object *object, const char *name);
|
||||
void d3drm_object_cleanup(IDirect3DRMObject *iface, struct d3drm_object *object);
|
||||
|
||||
struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame(IDirect3DRMFrame *iface);
|
||||
+struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface);
|
||||
struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
|
||||
|
||||
+struct d3drm_device *unsafe_impl_from_IDirect3DRMDevice(IDirect3DRMDevice *iface);
|
||||
struct d3drm_device *unsafe_impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface);
|
||||
|
||||
+struct d3drm_texture *unsafe_impl_from_IDirect3DRMTexture(IDirect3DRMTexture *iface);
|
||||
+
|
||||
HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm);
|
||||
HRESULT d3drm_frame_create(struct d3drm_frame **frame, IUnknown *parent_frame, IDirect3DRM *d3drm);
|
||||
HRESULT d3drm_face_create(struct d3drm_face **face);
|
||||
diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c
|
||||
index fe85784ee63..d89a062456b 100644
|
||||
--- a/dlls/d3drm/device.c
|
||||
+++ b/dlls/d3drm/device.c
|
||||
@@ -1644,6 +1644,15 @@ static const struct IDirect3DRMWinDeviceVtbl d3drm_device_win_vtbl =
|
||||
d3drm_device_win_HandleActivate,
|
||||
};
|
||||
|
||||
+struct d3drm_device *unsafe_impl_from_IDirect3DRMDevice(IDirect3DRMDevice *iface)
|
||||
+{
|
||||
+ if (!iface)
|
||||
+ return NULL;
|
||||
+ assert(iface->lpVtbl == &d3drm_device1_vtbl);
|
||||
+
|
||||
+ return impl_from_IDirect3DRMDevice(iface);
|
||||
+}
|
||||
+
|
||||
struct d3drm_device *unsafe_impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
|
||||
{
|
||||
if (!iface)
|
||||
diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
|
||||
index 07044da2aa8..c5d3c2cb55d 100644
|
||||
--- a/dlls/d3drm/frame.c
|
||||
+++ b/dlls/d3drm/frame.c
|
||||
@@ -3159,6 +3159,15 @@ struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame(IDirect3DRMFrame *iface)
|
||||
return impl_from_IDirect3DRMFrame(iface);
|
||||
}
|
||||
|
||||
+struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
|
||||
+{
|
||||
+ if (!iface)
|
||||
+ return NULL;
|
||||
+ assert(iface->lpVtbl == &d3drm_frame2_vtbl);
|
||||
+
|
||||
+ return impl_from_IDirect3DRMFrame2(iface);
|
||||
+}
|
||||
+
|
||||
HRESULT d3drm_frame_create(struct d3drm_frame **frame, IUnknown *parent_frame, IDirect3DRM *d3drm)
|
||||
{
|
||||
static const char classname[] = "Frame";
|
||||
diff --git a/dlls/d3drm/texture.c b/dlls/d3drm/texture.c
|
||||
index 0922837255c..3bd9b0da6e2 100644
|
||||
--- a/dlls/d3drm/texture.c
|
||||
+++ b/dlls/d3drm/texture.c
|
||||
@@ -1457,6 +1457,15 @@ static const struct IDirect3DRMTexture3Vtbl d3drm_texture3_vtbl =
|
||||
d3drm_texture3_SetValidationCallback,
|
||||
};
|
||||
|
||||
+struct d3drm_texture *unsafe_impl_from_IDirect3DRMTexture(IDirect3DRMTexture *iface)
|
||||
+{
|
||||
+ if (!iface)
|
||||
+ return NULL;
|
||||
+ assert(iface->lpVtbl == &d3drm_texture1_vtbl);
|
||||
+
|
||||
+ return impl_from_IDirect3DRMTexture(iface);;
|
||||
+}
|
||||
+
|
||||
HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
|
||||
{
|
||||
static const char classname[] = "Texture";
|
||||
diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c
|
||||
index f6d824b6488..64f0dd97b61 100644
|
||||
--- a/dlls/d3drm/viewport.c
|
||||
+++ b/dlls/d3drm/viewport.c
|
||||
@@ -470,18 +470,120 @@ static HRESULT WINAPI d3drm_viewport1_Clear(IDirect3DRMViewport *iface)
|
||||
return d3drm_viewport2_Clear(&viewport->IDirect3DRMViewport2_iface, D3DRMCLEAR_ALL);
|
||||
}
|
||||
|
||||
+static HRESULT create_surface_from_image(IDirectDraw *ddraw, D3DRMIMAGE *image, IDirectDrawSurface **out)
|
||||
+{
|
||||
+ IDirectDrawSurface *surface;
|
||||
+ DDSURFACEDESC desc;
|
||||
+ HRESULT hr;
|
||||
+ HBITMAP bitmap;
|
||||
+ HDC hdc, hdcImage;
|
||||
+
|
||||
+ memset(&desc, 0, sizeof(desc));
|
||||
+ desc.dwSize = sizeof(desc);
|
||||
+ desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT;
|
||||
+ desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
|
||||
+ desc.dwWidth = image->width;
|
||||
+ desc.dwHeight = image->height;
|
||||
+ desc.lPitch = 3;
|
||||
+
|
||||
+ desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
|
||||
+ desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
|
||||
+
|
||||
+ desc.ddpfPixelFormat.dwRGBBitCount = 16;
|
||||
+ desc.ddpfPixelFormat.dwRBitMask = 0x00007c00;
|
||||
+ desc.ddpfPixelFormat.dwGBitMask = 0x000003e0;
|
||||
+ desc.ddpfPixelFormat.dwBBitMask = 0x0000001f;
|
||||
+
|
||||
+ hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL);
|
||||
+ if (FAILED(hr))
|
||||
+ return hr;
|
||||
+
|
||||
+ bitmap = CreateBitmap(image->width, image->height, 1, 1, image->buffer1);
|
||||
+ if(!bitmap)
|
||||
+ {
|
||||
+ ERR("Failed to create Bitmap\n");
|
||||
+ IDirectDrawSurface_Release(surface);
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ hdcImage = CreateCompatibleDC(NULL);
|
||||
+ SelectObject(hdcImage, bitmap);
|
||||
+
|
||||
+ IDirectDrawSurface_GetDC(surface, &hdc);
|
||||
+ BitBlt(hdc, 0, 0, image->width, image->height, hdcImage, 0, 0, SRCCOPY);
|
||||
+ IDirectDrawSurface_ReleaseDC(surface, hdc);
|
||||
+ DeleteDC(hdcImage);
|
||||
+ DeleteObject(hdcImage);
|
||||
+
|
||||
+ *out = surface;
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static HRESULT viewport_render(struct d3drm_viewport *viewport, struct d3drm_frame *drmframe)
|
||||
+{
|
||||
+ HRESULT hr = S_OK;
|
||||
+
|
||||
+ if (drmframe->backgroundimage)
|
||||
+ {
|
||||
+ IDirect3DRMTexture *drmtexture;
|
||||
+
|
||||
+ hr = IUnknown_QueryInterface(drmframe->backgroundimage, &IID_IDirect3DRMTexture, (void**)&drmtexture);
|
||||
+ if (hr == S_OK)
|
||||
+ {
|
||||
+ struct d3drm_texture *texture = unsafe_impl_from_IDirect3DRMTexture(drmtexture);
|
||||
+ if (!texture)
|
||||
+ {
|
||||
+ FIXME("Unsupported IDirect3DRMTexture interface\n");
|
||||
+ return D3DRM_OK;
|
||||
+ }
|
||||
+
|
||||
+ if (!texture->surface)
|
||||
+ hr = create_surface_from_image(viewport->device->ddraw, texture->image, &texture->surface);
|
||||
+
|
||||
+ hr = IDirectDrawSurface_Blt(viewport->device->render_target, NULL, texture->surface, NULL, DDBLT_WAIT, NULL);
|
||||
+
|
||||
+ IDirect3DRMTexture_Release(drmtexture);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI d3drm_viewport2_Render(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *frame)
|
||||
{
|
||||
- FIXME("iface %p, frame %p stub!\n", iface, frame);
|
||||
+ struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
||||
+ struct d3drm_frame *drmframe = unsafe_impl_from_IDirect3DRMFrame3(frame);
|
||||
+ HRESULT hr;
|
||||
|
||||
- return D3DRM_OK;
|
||||
+ TRACE("iface %p, frame %p\n", iface, frame);
|
||||
+
|
||||
+ hr = viewport_render(viewport, drmframe);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_viewport1_Render(IDirect3DRMViewport *iface, IDirect3DRMFrame *frame)
|
||||
{
|
||||
- FIXME("iface %p, frame %p stub!\n", iface, frame);
|
||||
+ IDirect3DRMFrame2 *frame2;
|
||||
+ struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
||||
+ struct d3drm_frame *drmframe;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return D3DRM_OK;
|
||||
+ TRACE("iface %p, frame %p\n", iface, frame);
|
||||
+
|
||||
+ hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame2, (void**)&frame2);
|
||||
+ if(hr == S_OK)
|
||||
+ {
|
||||
+ drmframe = unsafe_impl_from_IDirect3DRMFrame2(frame2);
|
||||
+ IDirect3DRMFrame2_Release(frame2);
|
||||
+ }
|
||||
+ else
|
||||
+ drmframe = unsafe_impl_from_IDirect3DRMFrame(frame);
|
||||
+
|
||||
+ hr = viewport_render(viewport, drmframe);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_viewport2_SetFront(IDirect3DRMViewport2 *iface, D3DVALUE front)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user