FYI, I am following the current definition of D3DXCreateBox, which is in the mesh.c file.
If you think I should start a separate (shape.c) file for these functions, please let me know.
Prior patch fixed an #include which should have been present in d3dx9.h
Starting work on http://bugs.winehq.org/show_bug.cgi?id=22918
implementing D3DXCreateSphere
Thank you Misha
p.s. Actually I remember I used to be quite into game programming many years ago - "Tricks of the Game Programming Gurus", even wrote my own Mode X library at one point ;) - not 3D though
--- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/mesh.c | 8 ++++++++ dlls/d3dx9_36/tests/mesh.c | 9 +++++++++ include/d3dx9shape.h | 7 +++++++ 4 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 19406e7..b9a00da 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -87,7 +87,7 @@ @ stub D3DXCreateSkinInfo @ stub D3DXCreateSkinInfoFromBlendedMesh @ stub D3DXCreateSkinInfoFVF -@ stub D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) @ stdcall D3DXCreateSprite(ptr ptr) @ stub D3DXCreateTeapot @ stub D3DXCreateTextA diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 9691eed..5611030 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -335,3 +335,11 @@ HRESULT WINAPI D3DXCreateBox(LPDIRECT3DDEVICE9 device, FLOAT width, FLOAT height
return E_NOTIMPL; } + +HRESULT WINAPI D3DXCreateSphere(LPDIRECT3DDEVICE9 device, FLOAT radius, UINT slices, + UINT stacks, LPD3DXMESH* mesh, LPD3DXBUFFER* adjacency) +{ + FIXME("(%p, %f, %d, %d, %p, %p): stub\n", device, radius, slices, stacks, mesh, adjacency); + + return E_NOTIMPL; +} diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 8e4e26d..0086bb3 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -476,6 +476,14 @@ static void D3DXIntersectTriTest(void) ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res); }
+static void D3DXCreateSphereTest(void) +{ + HRESULT hr; + + hr = D3DXCreateSphere(NULL, 0.0, 0, 0, NULL, NULL); + todo_wine ok( hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); +} + static void test_get_decl_vertex_size(void) { static const D3DVERTEXELEMENT9 declaration1[] = @@ -556,5 +564,6 @@ START_TEST(mesh) D3DXDeclaratorFromFVFTest(); D3DXGetFVFVertexSizeTest(); D3DXIntersectTriTest(); + D3DXCreateSphereTest(); test_get_decl_vertex_size(); } diff --git a/include/d3dx9shape.h b/include/d3dx9shape.h index e1bf231..36bca6b 100644 --- a/include/d3dx9shape.h +++ b/include/d3dx9shape.h @@ -32,6 +32,13 @@ HRESULT WINAPI D3DXCreateBox(LPDIRECT3DDEVICE9 device, LPD3DXMESH* mesh, LPD3DXBUFFER* adjacency);
+HRESULT WINAPI D3DXCreateSphere(LPDIRECT3DDEVICE9 device, + FLOAT radius, + UINT slices, + UINT stacks, + LPD3DXMESH* mesh, + LPD3DXBUFFER* adjacency); + #ifdef __cplusplus } #endif
I think patch 1/2 is missing? Patches aren't picked up from wine-devel, you should send them to wine-patches. However, we're also currently in code freeze.
Oops. You know what - I'm not subscribed to wine-patches, that's why they didn't go through ;) Doh!
Misha
On Wed, 2010-06-23 at 10:15 +0200, Henri Verbeet wrote:
I think patch 1/2 is missing? Patches aren't picked up from wine-devel, you should send them to wine-patches. However, we're also currently in code freeze.
Oh, and please remind me as I do not quite recall.
If we are in code freeze, does this mean that I should (i) refrain from submitting patches until I have a large patchset that is ready for testing or (ii) submit anyway a bit at a time?
Thank you Misha
On Wed, Jun 23, 2010 at 10:19 AM, Misha Koshelev misha680@gmail.com wrote:
Oops. You know what - I'm not subscribed to wine-patches, that's why they didn't go through ;) Doh!
Misha
On Wed, 2010-06-23 at 10:15 +0200, Henri Verbeet wrote:
I think patch 1/2 is missing? Patches aren't picked up from wine-devel, you should send them to wine-patches. However, we're also currently in code freeze.
On Wed, Jun 23, 2010 at 10:29 AM, Misha Koshelev misha680@gmail.com wrote:
Oh, and please remind me as I do not quite recall.
If we are in code freeze, does this mean that I should (i) refrain from submitting patches until I have a large patchset that is ready for testing or (ii) submit anyway a bit at a time?
1) Please bottom post on wine mailing lists.
2) Avoid sending patches during code freeze, unless they fix a bug on the 1.2 list ( http://bugs.winehq.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW... ), or are very small and not intrusive.
See also: http://www.winehq.org/pipermail/wine-devel/2010-May/083439.html
On Wed, 2010-06-23 at 10:39 -0500, Austin English wrote:
On Wed, Jun 23, 2010 at 10:29 AM, Misha Koshelev misha680@gmail.com wrote:
Oh, and please remind me as I do not quite recall.
If we are in code freeze, does this mean that I should (i) refrain from submitting patches until I have a large patchset that is ready for testing or (ii) submit anyway a bit at a time?
- Please bottom post on wine mailing lists.
Oops sorry.
- Avoid sending patches during code freeze, unless they fix a bug on
the 1.2 list ( http://bugs.winehq.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW... ), or are very small and not intrusive.
See also: http://www.winehq.org/pipermail/wine-devel/2010-May/083439.html
Thank you. I appreciate the link and will do.
Misha