Stefan Dösinger : wined3d: Add WINED3DCUBEMAP_FACES to wined3d_types.h.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 4 16:15:32 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: be720179b66470693cdc4c66c007cf75bb390d18
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=be720179b66470693cdc4c66c007cf75bb390d18

Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date:   Tue Apr  4 15:51:28 2006 +0200

wined3d: Add WINED3DCUBEMAP_FACES to wined3d_types.h.

---

 dlls/d3d8/cubetexture.c          |    8 ++++----
 dlls/d3d9/cubetexture.c          |    8 ++++----
 dlls/wined3d/cubetexture.c       |    8 ++++----
 dlls/wined3d/device.c            |    2 +-
 include/wine/wined3d_interface.h |    8 ++++----
 include/wine/wined3d_types.h     |   11 +++++++++++
 6 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/dlls/d3d8/cubetexture.c b/dlls/d3d8/cubetexture.c
index c43bfc3..3be24fe 100644
--- a/dlls/d3d8/cubetexture.c
+++ b/dlls/d3d8/cubetexture.c
@@ -159,7 +159,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl
 
     TRACE("(%p) Relay\n", This);
 
-    hrc = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, FaceType, Level, &mySurface);
+    hrc = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level, &mySurface);
     if (hrc == D3D_OK && NULL != ppCubeMapSurface) {
        IWineD3DCubeTexture_GetParent(mySurface, (IUnknown **)ppCubeMapSurface);
        IWineD3DCubeTexture_Release(mySurface);
@@ -170,19 +170,19 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl
 HRESULT WINAPI IDirect3DCubeTexture8Impl_LockRect(LPDIRECT3DCUBETEXTURE8 iface, D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT *pRect, DWORD Flags) {
     IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface;
     TRACE("(%p) Relay\n", This);
-    return IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, FaceType, Level, pLockedRect, pRect, Flags);
+    return IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level, pLockedRect, pRect, Flags);
 }
 
 HRESULT WINAPI IDirect3DCubeTexture8Impl_UnlockRect(LPDIRECT3DCUBETEXTURE8 iface, D3DCUBEMAP_FACES FaceType, UINT Level) {
     IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface;
     TRACE("(%p) Relay\n", This);
-    return IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, FaceType, Level);
+    return IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level);
 }
 
 HRESULT  WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE8 iface, D3DCUBEMAP_FACES FaceType, CONST RECT *pDirtyRect) {
     IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface;
     TRACE("(%p) Relay\n", This);
-    return IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, FaceType, pDirtyRect);
+    return IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, pDirtyRect);
 }
 
 
diff --git a/dlls/d3d9/cubetexture.c b/dlls/d3d9/cubetexture.c
index 0c3d3c5..4b4ab53 100644
--- a/dlls/d3d9/cubetexture.c
+++ b/dlls/d3d9/cubetexture.c
@@ -180,7 +180,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl
 
     TRACE("(%p) Relay\n", This);
 
-    hrc = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, FaceType, Level, &mySurface);
+    hrc = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level, &mySurface);
     if (hrc == D3D_OK && NULL != ppCubeMapSurface) {
        IWineD3DCubeTexture_GetParent(mySurface, (IUnknown **)ppCubeMapSurface);
        IWineD3DCubeTexture_Release(mySurface);
@@ -191,19 +191,19 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl
 HRESULT WINAPI IDirect3DCubeTexture9Impl_LockRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
     IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
     TRACE("(%p) Relay\n", This);
-    return IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, FaceType, Level, pLockedRect, pRect, Flags);
+    return IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level, pLockedRect, pRect, Flags);
 }
 
 HRESULT WINAPI IDirect3DCubeTexture9Impl_UnlockRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level) {
     IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
     TRACE("(%p) Relay\n", This);
-    return IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, FaceType, Level);
+    return IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level);
 }
 
 HRESULT  WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) {
     IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
     TRACE("(%p) Relay\n", This);
-    return IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, FaceType, pDirtyRect);
+    return IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, pDirtyRect);
 }
 
 
diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c
index 392d116..f07c58b 100644
--- a/dlls/wined3d/cubetexture.c
+++ b/dlls/wined3d/cubetexture.c
@@ -273,7 +273,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_G
     return D3DERR_INVALIDCALL;
 }
 
-HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *iface, D3DCUBEMAP_FACES FaceType, UINT Level, IWineD3DSurface** ppCubeMapSurface) {
+HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, IWineD3DSurface** ppCubeMapSurface) {
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
     HRESULT hr = D3DERR_INVALIDCALL;
 
@@ -292,7 +292,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_G
     return hr;
 }
 
-HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
+HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
     HRESULT hr = D3DERR_INVALIDCALL;
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
 
@@ -309,7 +309,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_L
     return hr;
 }
 
-HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, D3DCUBEMAP_FACES FaceType, UINT Level) {
+HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level) {
     HRESULT hr = D3DERR_INVALIDCALL;
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
 
@@ -325,7 +325,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_U
     return hr;
 }
 
-HRESULT  WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) {
+HRESULT  WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) {
     HRESULT hr = D3DERR_INVALIDCALL;
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
     This->baseTexture.dirty = TRUE;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 60e044b..03a7ec3 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5207,7 +5207,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Update
             {
                 IWineD3DSurface *srcSurface;
                 IWineD3DSurface *destSurface;
-                D3DCUBEMAP_FACES faceType;
+                WINED3DCUBEMAP_FACES faceType;
 
                 for (i = 0 ; i < levels ; ++i) {
                     /* Update each cube face */
diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h
index 34bbd8f..101f530 100644
--- a/include/wine/wined3d_interface.h
+++ b/include/wine/wined3d_interface.h
@@ -907,10 +907,10 @@ DECLARE_INTERFACE_(IWineD3DCubeTexture,I
     STDMETHOD_(void, ApplyStateChanges)(THIS_ DWORD const textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) PURE;
     /*** IWineD3DCubeTexture methods ***/
     STDMETHOD(GetLevelDesc)(THIS_ UINT Level,WINED3DSURFACE_DESC* pDesc) PURE;
-    STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level, struct IWineD3DSurface** ppCubeMapSurface) PURE;
-    STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE;
-    STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level) PURE;
-    STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) PURE;
+    STDMETHOD(GetCubeMapSurface)(THIS_ WINED3DCUBEMAP_FACES FaceType, UINT Level, struct IWineD3DSurface** ppCubeMapSurface) PURE;
+    STDMETHOD(LockRect)(THIS_ WINED3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE;
+    STDMETHOD(UnlockRect)(THIS_ WINED3DCUBEMAP_FACES FaceType, UINT Level) PURE;
+    STDMETHOD(AddDirtyRect)(THIS_ WINED3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) PURE;
 };
 #undef INTERFACE
 
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h
index 60fa601..ed7dd94 100644
--- a/include/wine/wined3d_types.h
+++ b/include/wine/wined3d_types.h
@@ -461,6 +461,17 @@ typedef enum _WINED3DBASISTYPE {
    WINED3DBASIS_FORCE_DWORD   = 0x7fffffff
 } WINED3DBASISTYPE;
 
+typedef enum _WINED3DCUBEMAP_FACES {
+    WINED3DCUBEMAP_FACE_POSITIVE_X     = 0,
+    WINED3DCUBEMAP_FACE_NEGATIVE_X     = 1,
+    WINED3DCUBEMAP_FACE_POSITIVE_Y     = 2,
+    WINED3DCUBEMAP_FACE_NEGATIVE_Y     = 3,
+    WINED3DCUBEMAP_FACE_POSITIVE_Z     = 4,
+    WINED3DCUBEMAP_FACE_NEGATIVE_Z     = 5,
+
+    WINED3DCUBEMAP_FACE_FORCE_DWORD    = 0xffffffff
+} WINED3DCUBEMAP_FACES;
+
 typedef struct _WINEDD3DRECTPATCH_INFO {
     UINT                StartVertexOffsetWidth;
     UINT                StartVertexOffsetHeight;




More information about the wine-cvs mailing list