Il 19 aprile 2012 19:37, Józef Kucia joseph.kucia@gmail.com ha scritto:
dlls/d3dx9_36/tests/surface.c | 65 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 87aa03e..51d6ebd 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -22,6 +22,8 @@ #include "wine/test.h" #include "d3dx9tex.h" #include "resources.h" +#undef MAKE_DDHRESULT +#include "ddraw.h"
I'm not sure that's a good idea. ddraw.h is not included in recent DirectX SDKs and the relevant definitions are "gone", as far as I know. So I think d3dx9 or its tests should not depend on that header.
I'd just (re)declare the stuff you need privately in the test source file instead. You don't even need to use the same types/defines/variables names as those from ddraw.h, you just have to keep them compatible.
On that point, I see that MSDN mentions the equivalent DDS_HEADER and DDS_PIXELFORMAT structures (http://msdn.microsoft.com/en-us/library/windows/desktop/bb943991%28v=vs.85%2...), except those don't seem to be defined in the MS headers either. I guess you are free to use whatever names you like...
Am Donnerstag, 19. April 2012, 20:23:36 schrieb Matteo Bruni:
I'm not sure that's a good idea. ddraw.h is not included in recent DirectX SDKs and the relevant definitions are "gone", as far as I know. So I think d3dx9 or its tests should not depend on that header.
Furthermore the ddraw.h types do not support volume textures, but d3dx9's .dds support does. So one more reason to declare your own structures.
On Thu, Apr 19, 2012 at 9:22 PM, Stefan Dösinger stefandoesinger@gmx.at wrote:
Am Donnerstag, 19. April 2012, 20:23:36 schrieb Matteo Bruni:
I'm not sure that's a good idea. ddraw.h is not included in recent DirectX SDKs and the relevant definitions are "gone", as far as I know. So I think d3dx9 or its tests should not depend on that header.
Furthermore the ddraw.h types do not support volume textures, but d3dx9's .dds support does. So one more reason to declare your own structures.
Yes, the DDS header has a field named dwDepth in place of dwBackBufferCount.
On Thu, Apr 19, 2012 at 8:23 PM, Matteo Bruni matteo.mystral@gmail.com wrote:
Il 19 aprile 2012 19:37, Józef Kucia joseph.kucia@gmail.com ha scritto:
dlls/d3dx9_36/tests/surface.c | 65 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 87aa03e..51d6ebd 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -22,6 +22,8 @@ #include "wine/test.h" #include "d3dx9tex.h" #include "resources.h" +#undef MAKE_DDHRESULT +#include "ddraw.h"
I'm not sure that's a good idea. ddraw.h is not included in recent DirectX SDKs and the relevant definitions are "gone", as far as I know. So I think d3dx9 or its tests should not depend on that header.
I'd just (re)declare the stuff you need privately in the test source file instead. You don't even need to use the same types/defines/variables names as those from ddraw.h, you just have to keep them compatible.
On that point, I see that MSDN mentions the equivalent DDS_HEADER and DDS_PIXELFORMAT structures (http://msdn.microsoft.com/en-us/library/windows/desktop/bb943991%28v=vs.85%2...), except those don't seem to be defined in the MS headers either. I guess you are free to use whatever names you like...
I also had doubts about including ddraw.h but I was reluctant to duplicate the code. Thanks.