diff --git a/dlls/d3d8/cubetexture.c b/dlls/d3d8/cubetexture.c index c43bfc398d2..3be24fea078 100644 --- a/dlls/d3d8/cubetexture.c +++ b/dlls/d3d8/cubetexture.c @@ -159,7 +159,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE 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_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE 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 0c3d3c5121a..4b4ab531b1d 100644 --- a/dlls/d3d9/cubetexture.c +++ b/dlls/d3d9/cubetexture.c @@ -180,7 +180,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE 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_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE 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 392d1168db7..f07c58bb4cb 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -273,7 +273,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface, 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_GetCubeMapSurface(IWineD3DCubeTexture *if 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_LockRect(IWineD3DCubeTexture *iface, D3DC 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_UnlockRect(IWineD3DCubeTexture *iface, D3 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 60e044b97ef..03a7ec39151 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5207,7 +5207,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D { 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 34bbd8f1ebd..101f5307bb4 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -907,10 +907,10 @@ DECLARE_INTERFACE_(IWineD3DCubeTexture,IWineD3DBaseTexture) 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 60fa6010936..ed7dd94d968 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;