diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 1aaac3c4150..a3a10ec757d 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -68,7 +68,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_QueryInterface(IWineD3DBaseTexture *iface || IsEqualGUID(riid, &IID_IWineD3DBaseTexture)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -154,7 +154,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LO IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; if (This->resource.pool != WINED3DPOOL_MANAGED) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if(LODNew >= This->baseTexture.levels) @@ -170,7 +170,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) { IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; if (This->resource.pool != WINED3DPOOL_MANAGED) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } TRACE("(%p) : returning %d\n", This, This->baseTexture.LOD); @@ -189,11 +189,11 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture if (!(This->baseTexture.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { TRACE("(%p) : returning invalid call\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } This->baseTexture.filterType = FilterType; TRACE("(%p) :\n", This); - return D3D_OK; + return WINED3D_OK; } WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface) { @@ -228,7 +228,7 @@ BOOL WINAPI IWineD3DBaseTextureImpl_GetDirty(IWineD3DBaseTexture *iface) { HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) { IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; UINT textureDimensions; BOOL isNewTexture = FALSE; TRACE("(%p) : About to bind texture\n", This); @@ -287,7 +287,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) { } else { /* this only happened if we've run out of openGL textures */ WARN("This texture doesn't have an openGL texture assigned to it\n"); - hr = D3DERR_INVALIDCALL; + hr = WINED3DERR_INVALIDCALL; } LEAVE_GL(); @@ -311,13 +311,13 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_UnBindTexture(IWineD3DBaseTexture *iface) #endif LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } UINT WINAPI IWineD3DBaseTextureImpl_GetTextureDimensions(IWineD3DBaseTexture *iface){ IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; FIXME("(%p) : This shouldn't be called\n", This); - return D3D_OK; + return WINED3D_OK; } static inline GLenum warpLookupType(WINED3DSAMPLERSTATETYPE Type) { diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index f04ab42667c..ae1e294eb26 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -58,7 +58,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture *iface || IsEqualGUID(riid, &IID_IWineD3DTexture)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -270,20 +270,20 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface, return IWineD3DSurface_GetDesc(This->surfaces[0][Level], pDesc); } FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, IWineD3DSurface** ppCubeMapSurface) { IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { *ppCubeMapSurface = This->surfaces[FaceType][Level]; IWineD3DSurface_AddRef(*ppCubeMapSurface); - hr = D3D_OK; + hr = WINED3D_OK; } - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { TRACE("(%p) -> faceType(%d) level(%d) returning surface@%p\n", This, FaceType, Level, This->surfaces[FaceType][Level]); } else { WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType); @@ -293,14 +293,14 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *if } HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) { - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { hr = IWineD3DSurface_LockRect(This->surfaces[FaceType][Level], pLockedRect, pRect, Flags); } - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { TRACE("(%p) -> faceType(%d) level(%d) returning memory@%p success(%lu)\n", This, FaceType, Level, pLockedRect->pBits, hr); } else { WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType); @@ -310,14 +310,14 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, WINE } HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level) { - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) { hr = IWineD3DSurface_UnlockRect(This->surfaces[FaceType][Level]); } - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { TRACE("(%p) -> faceType(%d) level(%d) success(%lu)\n", This, FaceType, Level, hr); } else { WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType); @@ -326,7 +326,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, WI } HRESULT WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) { - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; This->baseTexture.dirty = TRUE; TRACE("(%p) : dirtyfication of faceType(%d) Level (0)\n", This, FaceType); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0085d2d24c5..94e58bcb2c3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -65,7 +65,7 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3 static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *iface, DWORD Stage, WINED3DTEXTURESTAGESTATETYPE Type); /* helper macros */ -#define D3DMEMCHECK(object, ppResult) if(NULL == object) { *ppResult = NULL; WARN("Out of memory\n"); return D3DERR_OUTOFVIDEOMEMORY;} +#define D3DMEMCHECK(object, ppResult) if(NULL == object) { *ppResult = NULL; WARN("Out of memory\n"); return WINED3DERR_OUTOFVIDEOMEMORY;} #define D3DCREATEOBJECTINSTANCE(object, type) { \ object=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3D##type##Impl)); \ @@ -95,7 +95,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac WARN("Out of 'bogus' video memory\n"); \ HeapFree(GetProcessHeap(), 0, object); \ *pp##type = NULL; \ - return D3DERR_OUTOFVIDEOMEMORY; \ + return WINED3DERR_OUTOFVIDEOMEMORY; \ } \ globalChangeGlRam(_size); \ } \ @@ -104,7 +104,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac FIXME("Out of memory!\n"); \ HeapFree(GetProcessHeap(), 0, object); \ *pp##type = NULL; \ - return D3DERR_OUTOFVIDEOMEMORY; \ + return WINED3DERR_OUTOFVIDEOMEMORY; \ } \ *pp##type = (IWineD3D##type *) object; \ IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object) ;\ @@ -339,7 +339,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface,REFIID ri || IsEqualGUID(riid, &IID_IWineD3DDevice)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; @@ -458,7 +458,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetParent(IWineD3DDevice *iface, IUnknown **pP IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; *pParent = This->parent; IUnknown_AddRef(This->parent); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage, @@ -478,7 +478,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT TRACE("(%p) : Size=%d, Usage=%ld, FVF=%lx, Pool=%d - Memory@%p, Iface@%p\n", This, Size, Usage, FVF, Pool, object->resource.allocatedMemory, object); *ppVertexBuffer = (IWineD3DVertexBuffer *)object; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage, @@ -500,7 +500,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT debug_d3dformat(Format), Pool, object, object->resource.allocatedMemory); *ppIndexBuffer = (IWineD3DIndexBuffer *) object; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, WINED3DSTATEBLOCKTYPE Type, IWineD3DStateBlock** ppStateBlock, IUnknown *parent) { @@ -517,7 +517,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, WINED3 if (Type == WINED3DSBT_INIT) { /* Don't bother increasing the reference count otherwise a device will never be freed due to circular dependencies */ - return D3D_OK; + return WINED3D_OK; } /* Otherwise, might as well set the whole state block to the appropriate values */ @@ -600,7 +600,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, WINED3 while (src) { newEl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PLIGHTINFOEL)); - if (newEl == NULL) return D3DERR_OUTOFVIDEOMEMORY; + if (newEl == NULL) return WINED3DERR_OUTOFVIDEOMEMORY; memcpy(newEl, src, sizeof(PLIGHTINFOEL)); newEl->prev = dst; newEl->changed = TRUE; @@ -621,7 +621,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, WINED3 } TRACE("(%p) returning token (ptr to stateblock) of %p\n", This, object); - return D3D_OK; + return WINED3D_OK; } @@ -648,7 +648,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid * MultisampleQuality * [in] Quality level. The valid range is between zero and one less than the level * returned by pQualityLevels used by IDirect3D9::CheckDeviceMultiSampleType. - * Passing a larger value returns the error D3DERR_INVALIDCALL. The MultisampleQuality + * Passing a larger value returns the error WINED3DERR_INVALIDCALL. The MultisampleQuality * values of paired render targets, depth stencil surfaces, and the MultiSample type * must all match. *******************************/ @@ -667,7 +667,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid if(MultisampleQuality < 0) { FIXME("Invalid multisample level %ld\n", MultisampleQuality); - return D3DERR_INVALIDCALL; /* TODO: Check that this is the case! */ + return WINED3DERR_INVALIDCALL; /* TODO: Check that this is the case! */ } if(MultisampleQuality > 0) { @@ -692,7 +692,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid || Format == WINED3DFMT_DXT4 || Format == WINED3DFMT_DXT5) { FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n", This, Width, Height); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } } @@ -701,10 +701,10 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid /* one of three options 1: Do the same as we do with nonpow 2 and scale the texture, (any texture ops would require the texture to be scaled which is potentially slow) 2: Set the texture to the maxium size (bad idea) - 3: WARN and return D3DERR_NOTAVAILABLE; + 3: WARN and return WINED3DERR_NOTAVAILABLE; */ WARN("(%p) Application requested a surface w %d, h %d, but the graphics card only supports %d\n", This, Width, Height, GL_LIMITS(texture_size)); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } @@ -812,7 +812,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid TRACE("(%p) : w(%d) h(%d) fmt(%d,%s) lockable(%d) surf@%p, surfmem@%p, %d bytes\n", This, Width, Height, Format, debug_d3dformat(Format), (WINED3DFMT_D16_LOCKABLE == Format), *ppSurface, object->resource.allocatedMemory, object->resource.size); - return D3D_OK; + return WINED3D_OK; } @@ -837,7 +837,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid that are reported as supported */ if (WINED3DFMT_UNKNOWN >= Format) { WARN("(%p) : Texture cannot be created with a format of D3DFMT_UNKNOWN\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, WINED3DRTYPE_TEXTURE, 0); @@ -878,7 +878,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid { /* use the callback to create the texture surface */ hr = D3DCB_CreateSurface(This->parent, tmpW, tmpH, Format, Usage, Pool, i, &object->surfaces[i],NULL); - if (hr!= D3D_OK) { + if (hr!= WINED3D_OK) { int j; FIXME("Failed to create surface %p\n", object); /* clean up */ @@ -900,7 +900,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid } TRACE("(%p) : Created texture %p\n", This, object); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, @@ -922,7 +922,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, that are reported as supported */ if (WINED3DFMT_UNKNOWN >= Format) { WARN("(%p) : Texture cannot be created with a format of D3DFMT_UNKNOWN\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, WINED3DRTYPE_VOLUMETEXTURE, 0); @@ -972,7 +972,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, *ppVolumeTexture = (IWineD3DVolumeTexture *) object; TRACE("(%p) : Created volume texture %p\n", This, object); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface, @@ -1022,7 +1022,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT that are reported as supported */ if (WINED3DFMT_UNKNOWN >= Format) { WARN("(%p) : Texture cannot be created with a format of D3DFMT_UNKNOWN\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } D3DCREATERESOURCEOBJECTINSTANCE(object, CubeTexture, WINED3DRTYPE_CUBETEXTURE, 0); @@ -1062,7 +1062,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT hr=D3DCB_CreateSurface(This->parent, tmpW, tmpW, Format, Usage, Pool, i /* Level */, &object->surfaces[j][i],pSharedHandle); - if(hr!= D3D_OK) { + if(hr!= WINED3D_OK) { /* clean up */ int k; int l; @@ -1088,7 +1088,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT TRACE("(%p) : Created Cube Texture %p\n", This, object); *ppCubeTexture = (IWineD3DCubeTexture *) object; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINED3DQUERYTYPE Type, IWineD3DQuery **ppQuery, IUnknown* parent) { @@ -1097,12 +1097,12 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINED3DQUER if (NULL == ppQuery) { /* Just a check to see if we support this type of query */ - HRESULT hr = D3DERR_NOTAVAILABLE; + HRESULT hr = WINED3DERR_NOTAVAILABLE; switch(Type) { case WINED3DQUERYTYPE_OCCLUSION: TRACE("(%p) occlusion query\n", This); if (GL_SUPPORT(ARB_OCCLUSION_QUERY) || GL_SUPPORT(NV_OCCLUSION_QUERY)) - hr = D3D_OK; + hr = WINED3D_OK; else WARN("Unsupported in local OpenGL implementation: ARB_OCCLUSION_QUERY/NV_OCCLUSION_QUERY\n"); break; @@ -1153,7 +1153,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINED3DQUER FIXME("(%p) Unhandled query type %d\n",This , Type); } TRACE("(%p) : Created Query %p\n", This, object); - return D3D_OK; + return WINED3D_OK; } /* example at http://www.fairyengine.com/articles/dxmultiviews.htm */ @@ -1169,7 +1169,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac XVisualInfo template; GLXContext oldContext; Drawable oldDrawable; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; TRACE("(%p) : Created Aditional Swap Chain\n", This); @@ -1196,7 +1196,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac object->win_handle = GetAncestor(object->win_handle, GA_ROOT); if ( !( object->win = (Window)GetPropA(object->win_handle, "__wine_x11_whole_window") ) ) { ERR("Can't get drawable (window), HWND:%p doesn't have the property __wine_x11_whole_window\n", object->win_handle); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } hDc = GetDC(object->win_handle); object->display = get_display(hDc); @@ -1205,12 +1205,12 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac if (NULL == object->display || NULL == hDc) { WARN("Failed to get a display and HDc for Window %p\n", object->win_handle); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } if (object->win == 0) { WARN("Failed to get a valid XVisuial ID for the window %p\n", object->win_handle); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } /** * Create an opengl context for the display visual @@ -1233,7 +1233,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac if (NULL == object->visInfo) { ERR("cannot really get XVisual\n"); LEAVE_GL(); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } else { int n, value; /* Write out some debug info about the visual/s */ @@ -1278,7 +1278,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac { IWineD3DSwapChain *implSwapChain; - if (D3D_OK != IWineD3DDevice_GetSwapChain(iface, 0, &implSwapChain)) { + if (WINED3D_OK != IWineD3DDevice_GetSwapChain(iface, 0, &implSwapChain)) { /* The first time around we create the context that is shared with all other swapchains and render targets */ object->glCtx = glXCreateContext(object->display, object->visInfo, NULL, GL_TRUE); TRACE("Creating implicit context for vis %p, hwnd %p\n", object->display, object->visInfo); @@ -1299,13 +1299,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac if (NULL == object->glCtx) { ERR("cannot create glxContext\n"); LEAVE_GL(); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } LEAVE_GL(); if (object->glCtx == NULL) { ERR("Error in context creation !\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } else { TRACE("Context created (HWND=%p, glContext=%p, Window=%ld, VisInfo=%p)\n", object->win_handle, object->glCtx, object->win, object->visInfo); @@ -1457,7 +1457,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac object->drawable = object->win; object->render_ctx = object->glCtx; - if (hr == D3D_OK) { + if (hr == WINED3D_OK) { /********************* * Setup some defaults and clear down the buffers *******************/ @@ -1569,7 +1569,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetSwapChain(IWineD3DDevice *iface, UINT iSw IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; SwapChainList *swapchain; int i = iSwapChain; - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; swapchain = This->swapchains; TRACE("(%p) : swapchain %d\n", This, iSwapChain); @@ -1587,7 +1587,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetSwapChain(IWineD3DDevice *iface, UINT iSw /** TODO: move off to a linkesList implementation **/ *pSwapChain = swapchain->swapchain; IWineD3DSwapChain_AddRef(*pSwapChain); - hr = D3D_OK; + hr = WINED3D_OK; } TRACE("(%p) returning %p\n", This, *pSwapChain); @@ -1598,7 +1598,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRESENT_PA IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; FIXME("(%p) : Stub\n",This); - return D3D_OK; + return WINED3D_OK; } @@ -1608,7 +1608,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRESENT_PA HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexDeclaration(IWineD3DDevice* iface, CONST VOID* pDeclaration, IWineD3DVertexDeclaration** ppVertexDeclaration, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DVertexDeclarationImpl *object = NULL; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; TRACE("(%p) : directXVersion=%u, pFunction=%p, ppDecl=%p\n", This, ((IWineD3DImpl *)This->wineD3D)->dxVersion, pDeclaration, ppVertexDeclaration); D3DCREATEOBJECTINSTANCE(object, VertexDeclaration) object->allFVF = 0; @@ -1622,7 +1622,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexDeclaration(IWineD3DDevice* iface, HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *iface, CONST DWORD *pDeclaration, CONST DWORD *pFunction, IWineD3DVertexShader **ppVertexShader, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DVertexShaderImpl *object; /* NOTE: impl usage is ok, this is a create */ - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; D3DCREATEOBJECTINSTANCE(object, VertexShader) object->baseShader.shader_ins = IWineD3DVertexShaderImpl_shader_ins; @@ -1633,22 +1633,22 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *iface, CONS if (pDeclaration != NULL) { IWineD3DVertexDeclaration *vertexDeclaration; hr = IWineD3DDevice_CreateVertexDeclaration(iface, pDeclaration, &vertexDeclaration ,NULL); - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { TRACE("(%p) : Setting vertex declaration to %p\n", This, vertexDeclaration); object->vertexDeclaration = vertexDeclaration; } else { - FIXME("(%p) : Failed to set the declaration, returning D3DERR_INVALIDCALL\n", iface); + FIXME("(%p) : Failed to set the declaration, returning WINED3DERR_INVALIDCALL\n", iface); IWineD3DVertexShader_Release(*ppVertexShader); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } } hr = IWineD3DVertexShader_SetFunction(*ppVertexShader, pFunction); - if (D3D_OK != hr) { - FIXME("(%p) : Failed to set the function, returning D3DERR_INVALIDCALL\n", iface); + if (WINED3D_OK != hr) { + FIXME("(%p) : Failed to set the function, returning WINED3DERR_INVALIDCALL\n", iface); IWineD3DVertexShader_Release(*ppVertexShader); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } #if 0 /* TODO: In D3D* SVP is atatched to the shader, in D3D9 it's attached to the device and isn't stored in the stateblock. */ @@ -1660,18 +1660,18 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *iface, CONS #endif - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface, CONST DWORD *pFunction, IWineD3DPixelShader **ppPixelShader, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DPixelShaderImpl *object; /* NOTE: impl allowed, this is a create */ - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; D3DCREATEOBJECTINSTANCE(object, PixelShader) object->baseShader.shader_ins = IWineD3DPixelShaderImpl_shader_ins; hr = IWineD3DPixelShader_SetFunction(*ppPixelShader, pFunction); - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { TRACE("(%p) : Created Pixel shader %p\n", This, *ppPixelShader); } else { WARN("(%p) : Failed to create pixel shader\n", This); @@ -1685,7 +1685,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetDirect3D(IWineD3DDevice *iface, IWineD3D ** *ppD3D= This->wineD3D; TRACE("(%p) : wineD3D returning %p\n", This, *ppD3D); IWineD3D_AddRef(*ppD3D); - return D3D_OK; + return WINED3D_OK; } UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *iface) { @@ -1713,7 +1713,7 @@ UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *iface) { *****/ HRESULT WINAPI IWineD3DDeviceImpl_SetFVF(IWineD3DDevice *iface, DWORD fvf) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; /* Update the current state block */ This->updateStateBlock->fvf = fvf; @@ -1738,7 +1738,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetFVF(IWineD3DDevice *iface, DWORD *pfvf) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : GetFVF returning %lx\n", This, This->stateBlock->fvf); *pfvf = This->stateBlock->fvf; - return D3D_OK; + return WINED3D_OK; } /***** @@ -1771,7 +1771,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, UINT St if (StreamNumber >= MAX_STREAMS) { WARN("Stream out of range %d\n", StreamNumber); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } oldSrc = This->stateBlock->streamSource[StreamNumber]; @@ -1787,7 +1787,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, UINT St /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } /* Not recording... */ @@ -1802,7 +1802,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, UINT St IWineD3DVertexBuffer_Release(oldSrc); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, UINT StreamNumber,IWineD3DVertexBuffer** pStream, UINT *pOffset, UINT* pStride) { @@ -1827,19 +1827,19 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, UINT St if (StreamNumber >= MAX_STREAMS) { WARN("Stream out of range %d\n", StreamNumber); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } *pStream = This->stateBlock->streamSource[StreamNumber]; *pStride = This->stateBlock->streamStride[StreamNumber]; *pOffset = This->stateBlock->streamOffset[StreamNumber]; if (*pStream == NULL) { - FIXME("Attempting to get an empty stream %d, returning D3DERR_INVALIDCALL\n", StreamNumber); - return D3DERR_INVALIDCALL; + FIXME("Attempting to get an empty stream %d, returning WINED3DERR_INVALIDCALL\n", StreamNumber); + return WINED3DERR_INVALIDCALL; } IWineD3DVertexBuffer_AddRef(*pStream); /* We have created a new reference to the VB */ - return D3D_OK; + return WINED3D_OK; } /*Should be quite easy, just an extension of vertexdata @@ -1866,7 +1866,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSourceFreq(IWineD3DDevice *iface, UI FIXME("Stream indexing not fully supported\n"); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSourceFreq(IWineD3DDevice *iface, UINT StreamNumber, UINT* Divider) { @@ -1877,7 +1877,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSourceFreq(IWineD3DDevice *iface, UI TRACE("(%p) : returning %d\n", This, *Divider); - return D3D_OK; + return WINED3D_OK; } /***** @@ -1895,7 +1895,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTransform(IWineD3DDevice *iface, D3DTRANS This->updateStateBlock->changed.transform[d3dts] = TRUE; This->updateStateBlock->set.transform[d3dts] = TRUE; memcpy(&This->updateStateBlock->transforms[d3dts], lpmatrix, sizeof(D3DMATRIX)); - return D3D_OK; + return WINED3D_OK; } /* @@ -1908,7 +1908,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTransform(IWineD3DDevice *iface, D3DTRANS */ if (!memcmp(&This->stateBlock->transforms[d3dts].u.m[0][0], lpmatrix, sizeof(D3DMATRIX))) { TRACE("The app is setting the same matrix over again\n"); - return D3D_OK; + return WINED3D_OK; } else { conv_mat(lpmatrix, &This->stateBlock->transforms[d3dts].u.m[0][0]); } @@ -1924,17 +1924,17 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTransform(IWineD3DDevice *iface, D3DTRANS /* Capture the times we can just ignore the change for now */ if (d3dts == D3DTS_WORLDMATRIX(0)) { This->modelview_valid = FALSE; - return D3D_OK; + return WINED3D_OK; } else if (d3dts == D3DTS_PROJECTION) { This->proj_valid = FALSE; - return D3D_OK; + return WINED3D_OK; } else if (d3dts >= D3DTS_WORLDMATRIX(1) && d3dts <= D3DTS_WORLDMATRIX(255)) { /* Indexed Vertex Blending Matrices 256 -> 511 */ /* Use arb_vertex_blend or NV_VERTEX_WEIGHTING? */ FIXME("D3DTS_WORLDMATRIX(1..255) not handled\n"); - return D3D_OK; + return WINED3D_OK; } /* Now we really are going to have to change a matrix */ @@ -1984,14 +1984,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTransform(IWineD3DDevice *iface, D3DTRANS /* Release lock, all done */ LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetTransform(IWineD3DDevice *iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : for Transform State %d\n", This, State); memcpy(pMatrix, &This->stateBlock->transforms[State], sizeof(D3DMATRIX)); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_MultiplyTransform(IWineD3DDevice *iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) { @@ -2075,7 +2075,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD Index, C if (This->isRecordingState) { object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PLIGHTINFOEL)); if (NULL == object) { - return D3DERR_OUTOFVIDEOMEMORY; + return WINED3DERR_OUTOFVIDEOMEMORY; } memcpy(&object->OriginalParms, pLight, sizeof(D3DLIGHT9)); object->OriginalIndex = Index; @@ -2091,7 +2091,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD Index, C temp->next = object; } TRACE("Recording... not performing anything more\n"); - return D3D_OK; + return WINED3D_OK; } /* Ok, not recording any longer so do real work */ @@ -2104,7 +2104,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD Index, C object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PLIGHTINFOEL)); if (NULL == object) { - return D3DERR_OUTOFVIDEOMEMORY; + return WINED3DERR_OUTOFVIDEOMEMORY; } object->OriginalIndex = Index; object->glIndex = -1; @@ -2208,7 +2208,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD Index, C if (object->glIndex != -1) { setup_light(iface, object->glIndex, object); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetLight(IWineD3DDevice *iface, DWORD Index, WINED3DLIGHT* pLight) { @@ -2222,11 +2222,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetLight(IWineD3DDevice *iface, DWORD Index, W if (lightInfo == NULL) { TRACE("Light information requested but light not defined\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } memcpy(pLight, &lightInfo->OriginalParms, sizeof(D3DLIGHT9)); - return D3D_OK; + return WINED3D_OK; } /***** @@ -2242,7 +2242,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In if (This->isRecordingState) { lightInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PLIGHTINFOEL)); if (NULL == lightInfo) { - return D3DERR_OUTOFVIDEOMEMORY; + return WINED3DERR_OUTOFVIDEOMEMORY; } lightInfo->OriginalIndex = Index; lightInfo->glIndex = -1; @@ -2257,7 +2257,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In temp->next = lightInfo; } TRACE("Recording... not performing anything more\n"); - return D3D_OK; + return WINED3D_OK; } /* Not recording... So, locate the light in the live lights */ @@ -2303,7 +2303,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In while (lightInfo != NULL && lightInfo->OriginalIndex != Index) lightInfo = lightInfo->next; if (lightInfo == NULL) { FIXME("Adding default lights has failed dismally\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } } @@ -2364,7 +2364,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In /* If we have too many active lights, fail the call */ if ((Index == This->maxConcurrentLights) && (bsf == NULL)) { FIXME("Program requests too many concurrent lights\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; /* If we have allocated all lights, but not all are enabled, reuse one which is not enabled */ @@ -2457,7 +2457,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In } } } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetLightEnable(IWineD3DDevice *iface, DWORD Index,BOOL* pEnable) { @@ -2472,10 +2472,10 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetLightEnable(IWineD3DDevice *iface, DWORD In if (lightInfo == NULL) { TRACE("Light enabled state requested but light not defined\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } *pEnable = lightInfo->lightEnabled; - return D3D_OK; + return WINED3D_OK; } /***** @@ -2488,7 +2488,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWORD Inde /* Validate Index */ if (Index >= GL_LIMITS(clipplanes)) { TRACE("Application has requested clipplane this device doesn't support\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } This->updateStateBlock->changed.clipplane[Index] = TRUE; @@ -2501,7 +2501,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWORD Inde /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } /* Apply it */ @@ -2524,7 +2524,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWORD Inde glPopMatrix(); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetClipPlane(IWineD3DDevice *iface, DWORD Index, float *pPlane) { @@ -2534,14 +2534,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetClipPlane(IWineD3DDevice *iface, DWORD Inde /* Validate Index */ if (Index >= GL_LIMITS(clipplanes)) { TRACE("Application has requested clipplane this device doesn't support\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } pPlane[0] = This->stateBlock->clipplane[Index][0]; pPlane[1] = This->stateBlock->clipplane[Index][1]; pPlane[2] = This->stateBlock->clipplane[Index][2]; pPlane[3] = This->stateBlock->clipplane[Index][3]; - return D3D_OK; + return WINED3D_OK; } /***** @@ -2552,22 +2552,22 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetClipStatus(IWineD3DDevice *iface, CONST W IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; FIXME("(%p) : stub\n", This); if (NULL == pClipStatus) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } This->updateStateBlock->clip_status.ClipUnion = pClipStatus->ClipUnion; This->updateStateBlock->clip_status.ClipIntersection = pClipStatus->ClipIntersection; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface, WINED3DCLIPSTATUS* pClipStatus) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; FIXME("(%p) : stub\n", This); if (NULL == pClipStatus) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } pClipStatus->ClipUnion = This->updateStateBlock->clip_status.ClipUnion; pClipStatus->ClipIntersection = This->updateStateBlock->clip_status.ClipIntersection; - return D3D_OK; + return WINED3D_OK; } /***** @@ -2584,7 +2584,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } ENTER_GL(); @@ -2618,7 +2618,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED checkGLcall("glMaterialf(GL_SHININESS"); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINED3DMATERIAL* pMaterial) { @@ -2634,7 +2634,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINED3DMATE pMaterial->Emissive.b, pMaterial->Emissive.a); TRACE("(%p) : Power (%f)\n", This, pMaterial->Power); - return D3D_OK; + return WINED3D_OK; } /***** @@ -2656,7 +2656,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWineD3DInde /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } if (NULL != pIndexData) { @@ -2665,7 +2665,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWineD3DInde if (NULL != oldIdxs) { IWineD3DIndexBuffer_Release(oldIdxs); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWineD3DIndexBuffer** ppIndexData, UINT* pBaseVertexIndex) { @@ -2683,7 +2683,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWineD3DInde } TRACE("Returning %p %d\n", *ppIndexData, *pBaseVertexIndex); - return D3D_OK; + return WINED3D_OK; } /***** @@ -2700,7 +2700,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetViewport(IWineD3DDevice *iface, CONST WINED /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } This->viewport_changed = TRUE; @@ -2721,7 +2721,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetViewport(IWineD3DDevice *iface, CONST WINED LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } @@ -2729,7 +2729,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetViewport(IWineD3DDevice *iface, WINED3DVIEW IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p)\n", This); memcpy(pViewport, &This->stateBlock->viewport, sizeof(WINED3DVIEWPORT)); - return D3D_OK; + return WINED3D_OK; } /***** @@ -2755,7 +2755,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } ENTER_GL(); @@ -2855,7 +2855,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE FIXME("D3DSHADE_PHONG isn't supported?\n"); LEAVE_GL(); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; default: FIXME("Unrecognized/Unhandled D3DSHADEMODE value %ld\n", Value); } @@ -3630,7 +3630,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE case WINED3DRS_ZVISIBLE : { LEAVE_GL(); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } case WINED3DRS_POINTSPRITEENABLE : { @@ -3923,14 +3923,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetRenderState(IWineD3DDevice *iface, D3DRENDERSTATETYPE State, DWORD *pValue) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) for State %d = %ld\n", This, State, This->stateBlock->renderState[State]); *pValue = This->stateBlock->renderState[State]; - return D3D_OK; + return WINED3D_OK; } /***** @@ -3959,7 +3959,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface, DWORD S if(Sampler > GL_LIMITS(samplers) || Sampler < 0 || Type > WINED3D_HIGHEST_SAMPLER_STATE || Type < 0) { FIXME("out of range %d %d sampler %ld type %u\n", GL_LIMITS(samplers), WINED3D_HIGHEST_SAMPLER_STATE, Sampler, Type); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } TRACE("Setting sampler %ld %d to %ld\n", Sampler, Type, Value); This->updateStateBlock->samplerState[Sampler][Type] = Value; @@ -3969,10 +3969,10 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface, DWORD S /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetSamplerState(IWineD3DDevice *iface, DWORD Sampler, WINED3DSAMPLERSTATETYPE Type, DWORD* Value) { @@ -3981,7 +3981,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetSamplerState(IWineD3DDevice *iface, DWORD S *Value = This->updateStateBlock->samplerState[Sampler][Type]; TRACE("(%p) : Sampler %ld Type %u Returning %ld\n", This, Sampler, Type, *Value); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, CONST RECT* pRect) { @@ -3993,7 +3993,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, CONST RE glScissor(pRect->left, pRect->top, pRect->right - pRect->left, pRect->bottom - pRect->top); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetScissorRect(IWineD3DDevice *iface, RECT* pRect) { @@ -4009,7 +4009,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetScissorRect(IWineD3DDevice *iface, RECT* pR pRect->bottom = scissorBox[2] + scissorBox[4]; TRACE("(%p)Returning a Scissor Rect of %ld:%ld-%ld:%ld\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* iface, IWineD3DVertexDeclaration* pDecl) { @@ -4032,7 +4032,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* iface, IW if (NULL != oldDecl) { IWineD3DVertexDeclaration_Release(oldDecl); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetVertexDeclaration(IWineD3DDevice* iface, IWineD3DVertexDeclaration** ppDecl) { @@ -4042,7 +4042,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetVertexDeclaration(IWineD3DDevice* iface, IW *ppDecl = This->stateBlock->vertexDecl; if (NULL != *ppDecl) IWineD3DVertexDeclaration_AddRef(*ppDecl); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface, IWineD3DVertexShader* pShader) { @@ -4073,21 +4073,21 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface, IWineD3 /** * TODO: merge HAL shaders context switching from prototype */ - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShader(IWineD3DDevice *iface, IWineD3DVertexShader** ppShader) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; if (NULL == ppShader) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } *ppShader = This->stateBlock->vertexShader; if( NULL != *ppShader) IWineD3DVertexShader_AddRef(*ppShader); TRACE("(%p) : returning %p\n", This, *ppShader); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) { @@ -4101,7 +4101,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstant(IWineD3DDevice *iface, if (type != WINESHADERCNST_NONE) { if (srcData == NULL || cnt < 0) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } CopyMemory((char *)dstData + (start * registersize), srcData, cnt * registersize); @@ -4113,7 +4113,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstant(IWineD3DDevice *iface, This->updateStateBlock->vertexShaderConstantT[i] = type; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) { @@ -4128,19 +4128,19 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstant(IWineD3DDevice *iface, /* Verify that the requested shader constant was populated with the correct type */ for (i = start; i < cnt + start; ++i) { if (This->updateStateBlock->vertexShaderConstantT[i] != type) { - TRACE("(%p) : Caller requested 0x%x while type is 0x%x. Returning D3DERR_INVALIDCALL\n", + TRACE("(%p) : Caller requested 0x%x while type is 0x%x. Returning WINED3DERR_INVALIDCALL\n", This, type, This->updateStateBlock->vertexShaderConstantT[i]); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } } if (dstData == NULL || cnt < 0) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } CopyMemory(dstData, (char *)srcData + (start * registersize), cnt * registersize); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount){ @@ -4249,7 +4249,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, IWineD3D /** * TODO: merge HAL shaders context switching from prototype */ - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShader(IWineD3DDevice *iface, IWineD3DPixelShader **ppShader) { @@ -4257,7 +4257,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShader(IWineD3DDevice *iface, IWineD3D if (NULL == ppShader) { WARN("(%p) : PShader is NULL, returning INVALIDCALL\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } *ppShader = This->stateBlock->pixelShader; @@ -4265,7 +4265,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShader(IWineD3DDevice *iface, IWineD3D IWineD3DPixelShader_AddRef(*ppShader); } TRACE("(%p) : returning %p\n", This, *ppShader); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) { @@ -4279,7 +4279,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstant(IWineD3DDevice *iface, if (type != WINESHADERCNST_NONE) { if (srcData == NULL || cnt < 0) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } CopyMemory((char *)dstData + (start * registersize), srcData, cnt * registersize); @@ -4291,7 +4291,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstant(IWineD3DDevice *iface, This->updateStateBlock->pixelShaderConstantT[i] = type; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) { @@ -4306,19 +4306,19 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstant(IWineD3DDevice *iface, /* Verify that the requested shader constant was populated with the correct type */ for (i = start; i < cnt + start; ++i) { if (This->updateStateBlock->pixelShaderConstantT[i] != type) { - TRACE("(%p) : Caller requested 0x%x while type is 0x%x. Returning D3DERR_INVALIDCALL\n", + TRACE("(%p) : Caller requested 0x%x while type is 0x%x. Returning WINED3DERR_INVALIDCALL\n", This, type, This->updateStateBlock->pixelShaderConstantT[i]); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } } if (dstData == NULL || cnt < 0) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } CopyMemory(dstData, (char *)srcData + (start * registersize), cnt * registersize); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount) { @@ -4406,7 +4406,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantN(IWineD3DDevice *iface, HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IWineD3DVertexBuffer* pDestBuffer, IWineD3DVertexBuffer* pVertexDecl, DWORD Flags) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } /***** @@ -4641,21 +4641,21 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *iface, DW /* Reject invalid texture units */ if (Stage >= GL_LIMITS(textures)) { TRACE("Attempt to access invalid texture rejected\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } This->updateStateBlock->changed.textureState[Stage][Type] = TRUE; This->updateStateBlock->set.textureState[Stage][Type] = TRUE; This->updateStateBlock->textureState[Stage][Type] = Value; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetTextureStageState(IWineD3DDevice *iface, DWORD Stage, WINED3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : requesting Stage %ld, Type %d getting %ld\n", This, Stage, Type, This->updateStateBlock->textureState[Stage][Type]); *pValue = This->updateStateBlock->textureState[Stage][Type]; - return D3D_OK; + return WINED3D_OK; } /***** @@ -4672,14 +4672,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage, #if 0 /* TODO: check so vertex textures */ if (Stage >= D3DVERTEXTEXTURESAMPLER && Stage <= D3DVERTEXTEXTURESAMPLER3){ This->updateStateBlock->vertexTextures[Stage - D3DVERTEXTEXTURESAMPLER] = pTexture; - return D3D_OK; + return WINED3D_OK; } #endif /* Reject invalid texture units */ if (Stage >= GL_LIMITS(textures) || Stage < 0) { WARN("Attempt to access invalid texture rejected\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if(pTexture != NULL) { @@ -4689,7 +4689,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage, */ if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH || ((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SYSTEMMEM) { WARN("(%p) Attempt to set scratch texture rejected\n", pTexture); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } } @@ -4705,7 +4705,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage, /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - return D3D_OK; + return WINED3D_OK; } /** NOTE: MSDN says that setTexture increases the reference count, @@ -4720,7 +4720,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage, IWineD3DBaseTexture_Release(oldTexture); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD Stage, IWineD3DBaseTexture** ppTexture) { @@ -4730,14 +4730,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD Stage, /* Reject invalid texture units */ if (Stage >= GL_LIMITS(textures)) { TRACE("Attempt to access invalid texture rejected\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } *ppTexture=This->updateStateBlock->textures[Stage]; if (*ppTexture) IWineD3DBaseTexture_AddRef(*ppTexture); else - return D3DERR_INVALIDCALL; - return D3D_OK; + return WINED3DERR_INVALIDCALL; + return WINED3D_OK; } /***** @@ -4752,7 +4752,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UINT iSwa TRACE("(%p) : BackBuf %d Type %d SwapChain %d returning %p\n", This, BackBuffer, Type, iSwapChain, *ppBackBuffer); hr = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapChain); - if (hr == D3D_OK) { + if (hr == WINED3D_OK) { hr = IWineD3DSwapChain_GetBackBuffer(swapChain, BackBuffer, Type, ppBackBuffer); IWineD3DSwapChain_Release(swapChain); } else { @@ -4773,7 +4773,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetDisplayMode(IWineD3DDevice *iface, UINT iSw HRESULT hr; hr = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, (IWineD3DSwapChain **)&swapChain); - if (hr == D3D_OK) { + if (hr == WINED3D_OK) { hr = IWineD3DSwapChain_GetDisplayMode(swapChain, pMode); IWineD3DSwapChain_Release(swapChain); } else { @@ -4791,7 +4791,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_BeginStateBlock(IWineD3DDevice *iface) { TRACE("(%p)", This); if (This->isRecordingState) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DStateBlockImpl)); @@ -4812,7 +4812,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_BeginStateBlock(IWineD3DDevice *iface) { This->isRecordingState = TRUE; TRACE("(%p) recording stateblock %p\n",This , object); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_EndStateBlock(IWineD3DDevice *iface, IWineD3DStateBlock** ppStateBlock) { @@ -4821,7 +4821,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_EndStateBlock(IWineD3DDevice *iface, IWineD3DS if (!This->isRecordingState) { FIXME("(%p) not recording! returning error\n", This); *ppStateBlock = NULL; - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } *ppStateBlock = (IWineD3DStateBlock*)This->updateStateBlock; @@ -4830,7 +4830,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_EndStateBlock(IWineD3DDevice *iface, IWineD3DS IWineD3DStateBlock_AddRef((IWineD3DStateBlock*)This->updateStateBlock); /* IWineD3DStateBlock_AddRef(*ppStateBlock); don't need to do this, since we should really just release UpdateStateBlock first */ TRACE("(%p) returning token (ptr to stateblock) of %p\n", This, *ppStateBlock); - return D3D_OK; + return WINED3D_OK; } /***** @@ -4841,7 +4841,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_BeginScene(IWineD3DDevice *iface) { of a scene */ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_EndScene(IWineD3DDevice *iface) { @@ -4857,8 +4857,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_EndScene(IWineD3DDevice *iface) { /* If the container of the rendertarget is a texture then we need to save the data from the pbuffer */ IUnknown *targetContainer = NULL; - if (D3D_OK == IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DBaseTexture, (void **)&targetContainer) - || D3D_OK == IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DDevice, (void **)&targetContainer)) { + if (WINED3D_OK == IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DBaseTexture, (void **)&targetContainer) + || WINED3D_OK == IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DDevice, (void **)&targetContainer)) { TRACE("(%p) : Texture rendertarget %p\n", This ,This->renderTarget); /** always dirtify for now. we must find a better way to see that surface have been modified (Modifications should will only occur via draw-primitive, but we do need better locking @@ -4873,7 +4873,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_EndScene(IWineD3DDevice *iface) { } This->sceneEnded = TRUE; LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_Present(IWineD3DDevice *iface, @@ -4894,7 +4894,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Present(IWineD3DDevice *iface, IWineD3DSwapChain_Release(swapChain); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Count, CONST D3DRECT* pRects, @@ -5011,7 +5011,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Count, CONS checkGLcall("glDisable"); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } /***** @@ -5030,7 +5030,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, D3DPRIMIT 0 /* indxSize */, NULL /* indxData */, 0 /* minIndex */); - return D3D_OK; + return WINED3D_OK; } /* TODO: baseVIndex needs to be provided from This->stateBlock->baseVertexIndex when called from d3d8 */ @@ -5061,7 +5061,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *iface, drawPrimitive(iface, PrimitiveType, primCount, baseVIndex, NumVertices, startIndex, idxStride, ((IWineD3DIndexBufferImpl *) pIB)->resource.allocatedMemory, minIndex); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, D3DPRIMITIVETYPE PrimitiveType, @@ -5092,7 +5092,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, D3DPRIM This->stateBlock->streamSource[0] = NULL; /*stream zero settings set to null at end, as per the msdn */ - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface, D3DPRIMITIVETYPE PrimitiveType, @@ -5136,13 +5136,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface, This->stateBlock->streamSource[0] = NULL; This->stateBlock->streamStride[0] = 0; - return D3D_OK; + return WINED3D_OK; } /* Yet another way to update a texture, some apps use this to load default textures instead of using surface/texture lock/unlock */ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3DBaseTexture *pSourceTexture, IWineD3DBaseTexture *pDestinationTexture){ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; WINED3DRESOURCETYPE sourceType; WINED3DRESOURCETYPE destinationType; int i ,levels; @@ -5153,33 +5153,33 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D /* verify that the source and destination textures aren't NULL */ if (NULL == pSourceTexture || NULL == pDestinationTexture) { - WARN("(%p) : source (%p) and destination (%p) textures must not be NULL, returning D3DERR_INVALIDCALL\n", + WARN("(%p) : source (%p) and destination (%p) textures must not be NULL, returning WINED3DERR_INVALIDCALL\n", This, pSourceTexture, pDestinationTexture); - hr = D3DERR_INVALIDCALL; + hr = WINED3DERR_INVALIDCALL; } if (pSourceTexture == pDestinationTexture) { - WARN("(%p) : source (%p) and destination (%p) textures must be different, returning D3DERR_INVALIDCALL\n", + WARN("(%p) : source (%p) and destination (%p) textures must be different, returning WINED3DERR_INVALIDCALL\n", This, pSourceTexture, pDestinationTexture); - hr = D3DERR_INVALIDCALL; + hr = WINED3DERR_INVALIDCALL; } /* Verify that the source and destination textures are the same type */ sourceType = IWineD3DBaseTexture_GetType(pSourceTexture); destinationType = IWineD3DBaseTexture_GetType(pDestinationTexture); if (sourceType != destinationType) { - WARN("(%p) Sorce and destination types must match, returning D3DERR_INVALIDCALL\n", + WARN("(%p) Sorce and destination types must match, returning WINED3DERR_INVALIDCALL\n", This); - hr = D3DERR_INVALIDCALL; + hr = WINED3DERR_INVALIDCALL; } /* check that both textures have the identical numbers of levels */ if (IWineD3DBaseTexture_GetLevelCount(pDestinationTexture) != IWineD3DBaseTexture_GetLevelCount(pSourceTexture)) { - WARN("(%p) : source (%p) and destination (%p) textures must have identicle numbers of levels, returning D3DERR_INVALIDCALL\n", This, pSourceTexture, pDestinationTexture); - hr = D3DERR_INVALIDCALL; + WARN("(%p) : source (%p) and destination (%p) textures must have identicle numbers of levels, returning WINED3DERR_INVALIDCALL\n", This, pSourceTexture, pDestinationTexture); + hr = WINED3DERR_INVALIDCALL; } - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { /* Make sure that the destination texture is loaded */ IWineD3DBaseTexture_PreLoad(pDestinationTexture); @@ -5199,7 +5199,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D hr = IWineD3DDevice_UpdateSurface(iface, srcSurface, NULL, destSurface, NULL); IWineD3DSurface_Release(srcSurface); IWineD3DSurface_Release(destSurface); - if (D3D_OK != hr) { + if (WINED3D_OK != hr) { WARN("(%p) : Call to update surface failed\n", This); return hr; } @@ -5216,13 +5216,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D /* Update each cube face */ for (faceType = D3DCUBEMAP_FACE_POSITIVE_X; faceType <= D3DCUBEMAP_FACE_NEGATIVE_Z; ++faceType){ hr = IWineD3DCubeTexture_GetCubeMapSurface((IWineD3DCubeTexture *)pSourceTexture, faceType, i, &srcSurface); - if (D3D_OK != hr) { + if (WINED3D_OK != hr) { FIXME("(%p) : Failed to get src cube surface facetype %d, level %d\n", This, faceType, i); } else { TRACE("Got srcSurface %p\n", srcSurface); } hr = IWineD3DCubeTexture_GetCubeMapSurface((IWineD3DCubeTexture *)pDestinationTexture, faceType, i, &destSurface); - if (D3D_OK != hr) { + if (WINED3D_OK != hr) { FIXME("(%p) : Failed to get src cube surface facetype %d, level %d\n", This, faceType, i); } else { TRACE("Got desrSurface %p\n", destSurface); @@ -5230,7 +5230,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D hr = IWineD3DDevice_UpdateSurface(iface, srcSurface, NULL, destSurface, NULL); IWineD3DSurface_Release(srcSurface); IWineD3DSurface_Release(destSurface); - if (D3D_OK != hr) { + if (WINED3D_OK != hr) { WARN("(%p) : Call to update surface failed\n", This); return hr; } @@ -5250,7 +5250,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D hr = IWineD3DFoo_UpdateVolume(iface, srcVolume, NULL, destVolume, NULL); IWineD3DVolume_Release(srcSurface); IWineD3DVolume_Release(destSurface); - if (D3D_OK != hr) { + if (WINED3D_OK != hr) { WARN("(%p) : Call to update volume failed\n", This); return hr; } @@ -5260,7 +5260,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D #endif default: FIXME("(%p) : Unsupported source and destination type\n", This); - hr = D3DERR_INVALIDCALL; + hr = WINED3DERR_INVALIDCALL; } } @@ -5273,7 +5273,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_StretchRect(IWineD3DDevice *iface, IWineD3DS IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTargetData(IWineD3DDevice *iface, IWineD3DSurface *pRenderTarget, IWineD3DSurface *pSurface) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; @@ -5326,7 +5326,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTargetData(IWineD3DDevice *iface, I IWineD3DBaseTexture *container; GLenum textureDimensions = GL_TEXTURE_2D; - if (D3D_OK == IWineD3DSurface_GetContainer(pSurface, &IID_IWineD3DBaseTexture, (void **)&container)) { + if (WINED3D_OK == IWineD3DSurface_GetContainer(pSurface, &IID_IWineD3DBaseTexture, (void **)&container)) { textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(container); IWineD3DBaseTexture_Release(container); } @@ -5349,14 +5349,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTargetData(IWineD3DDevice *iface, I } LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetFrontBufferData(IWineD3DDevice *iface,UINT iSwapChain, IWineD3DSurface *pDestSurface) { IWineD3DSwapChain *swapChain; HRESULT hr; hr = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, (IWineD3DSwapChain **)&swapChain); - if(hr == D3D_OK) { + if(hr == WINED3D_OK) { hr = IWineD3DSwapChain_GetFrontBufferData(swapChain, pDestSurface); IWineD3DSwapChain_Release(swapChain); } @@ -5367,9 +5367,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_ValidateDevice(IWineD3DDevice *iface, DWORD* IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; /* return a sensible default */ *pNumPasses = 1; - /* TODO: If the window is minimized then validate device should return something other than d3d_ok */ + /* TODO: If the window is minimized then validate device should return something other than WINED3D_OK */ FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetPaletteEntries(IWineD3DDevice *iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) { @@ -5378,7 +5378,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetPaletteEntries(IWineD3DDevice *iface, UIN TRACE("(%p) : PaletteNumber %u\n", This, PaletteNumber); if ( PaletteNumber < 0 || PaletteNumber >= MAX_PALETTES) { WARN("(%p) : (%u) Out of range 0-%u, returning Invalid Call\n", This, PaletteNumber, MAX_PALETTES); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } for (j = 0; j < 256; ++j) { This->palettes[PaletteNumber][j].peRed = pEntries[j].peRed; @@ -5387,7 +5387,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetPaletteEntries(IWineD3DDevice *iface, UIN This->palettes[PaletteNumber][j].peFlags = pEntries[j].peFlags; } TRACE("(%p) : returning\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetPaletteEntries(IWineD3DDevice *iface, UINT PaletteNumber, PALETTEENTRY* pEntries) { @@ -5396,7 +5396,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPaletteEntries(IWineD3DDevice *iface, UIN TRACE("(%p) : PaletteNumber %u\n", This, PaletteNumber); if ( PaletteNumber < 0 || PaletteNumber >= MAX_PALETTES) { WARN("(%p) : (%u) Out of range 0-%u, returning Invalid Call\n", This, PaletteNumber, MAX_PALETTES); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } for (j = 0; j < 256; ++j) { pEntries[j].peRed = This->palettes[PaletteNumber][j].peRed; @@ -5405,7 +5405,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPaletteEntries(IWineD3DDevice *iface, UIN pEntries[j].peFlags = This->palettes[PaletteNumber][j].peFlags; } TRACE("(%p) : returning\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetCurrentTexturePalette(IWineD3DDevice *iface, UINT PaletteNumber) { @@ -5413,24 +5413,24 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetCurrentTexturePalette(IWineD3DDevice *ifa TRACE("(%p) : PaletteNumber %u\n", This, PaletteNumber); if ( PaletteNumber < 0 || PaletteNumber >= MAX_PALETTES) { WARN("(%p) : (%u) Out of range 0-%u, returning Invalid Call\n", This, PaletteNumber, MAX_PALETTES); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /*TODO: stateblocks */ This->currentPalette = PaletteNumber; TRACE("(%p) : returning\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetCurrentTexturePalette(IWineD3DDevice *iface, UINT* PaletteNumber) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; if (PaletteNumber == NULL) { WARN("(%p) : returning Invalid Call\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /*TODO: stateblocks */ *PaletteNumber = This->currentPalette; TRACE("(%p) : returning %u\n", This, *PaletteNumber); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetSoftwareVertexProcessing(IWineD3DDevice *iface, BOOL bSoftware) { @@ -5442,7 +5442,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetSoftwareVertexProcessing(IWineD3DDevice * } This->softwareVertexProcessing = bSoftware; - return D3D_OK; + return WINED3D_OK; } @@ -5465,7 +5465,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetRasterStatus(IWineD3DDevice *iface, UINT TRACE("(%p) : SwapChain %d returning %p\n", This, iSwapChain, pRasterStatus); hr = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, (IWineD3DSwapChain **)&swapChain); - if(hr == D3D_OK){ + if(hr == WINED3D_OK){ hr = IWineD3DSwapChain_GetRasterStatus(swapChain, pRasterStatus); IWineD3DSwapChain_Release(swapChain); }else{ @@ -5484,7 +5484,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetNPatchMode(IWineD3DDevice *iface, float n showfixmes = FALSE; } } - return D3D_OK; + return WINED3D_OK; } float WINAPI IWineD3DDeviceImpl_GetNPatchMode(IWineD3DDevice *iface) { @@ -5535,8 +5535,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3 IWineD3DSurface_GetDesc(pDestinationSurface, &winedesc); if(srcPool != WINED3DPOOL_SYSTEMMEM || destPool != WINED3DPOOL_DEFAULT){ - WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning D3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface); - return D3DERR_INVALIDCALL; + WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning WINED3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface); + return WINED3DERR_INVALIDCALL; } if (destFormat == WINED3DFMT_UNKNOWN) { @@ -5683,7 +5683,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3 /* I only need to look up baseTexture here, so it may be a good idea to hava a GL_TARGET -> * GL_DIMENSIONS lookup, or maybe store the dimensions on the surface (but that's making the * surface bigger than it needs to be hmm.. */ - if (D3D_OK == IWineD3DSurface_GetContainer(pDestinationSurface, &IID_IWineD3DBaseTexture, (void **)&baseTexture)) { + if (WINED3D_OK == IWineD3DSurface_GetContainer(pDestinationSurface, &IID_IWineD3DBaseTexture, (void **)&baseTexture)) { textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(baseTexture); IWineD3DBaseTexture_Release(baseTexture); } @@ -5691,7 +5691,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3 glDisable(textureDimensions); /* This needs to be managed better.... */ LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } /* Used by DirectX 8 */ @@ -5700,7 +5700,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, IWineD3DSurface* pDestinationSurface, CONST POINT* pDestPointsArray) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; WINED3DFORMAT srcFormat, destFormat; UINT srcWidth, destWidth; UINT srcHeight, destHeight; @@ -5728,8 +5728,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, /* Check that the source and destination formats match */ if (srcFormat != destFormat && WINED3DFMT_UNKNOWN != destFormat) { - WARN("(%p) source %p format must match the dest %p format, returning D3DERR_INVALIDCALL\n", This, pSourceSurface, pDestinationSurface); - return D3DERR_INVALIDCALL; + WARN("(%p) source %p format must match the dest %p format, returning WINED3DERR_INVALIDCALL\n", This, pSourceSurface, pDestinationSurface); + return WINED3DERR_INVALIDCALL; } else if (WINED3DFMT_UNKNOWN == destFormat) { TRACE("(%p) : Converting destination surface from WINED3DFMT_UNKNOWN to the source format\n", This); IWineD3DSurface_SetFormat(pDestinationSurface, srcFormat); @@ -5754,8 +5754,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, } else { - FIXME("Wanted to copy all surfaces but size not compatible, returning D3DERR_INVALIDCALL\n"); - hr = D3DERR_INVALIDCALL; + FIXME("Wanted to copy all surfaces but size not compatible, returning WINED3DERR_INVALIDCALL\n"); + hr = WINED3DERR_INVALIDCALL; } } else { @@ -5799,8 +5799,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, TRACE("Unlocked src and dst\n"); } } else { - FIXME("Wanted to copy partial surfaces not implemented, returning D3DERR_INVALIDCALL\n"); - hr = D3DERR_INVALIDCALL; + FIXME("Wanted to copy partial surfaces not implemented, returning WINED3DERR_INVALIDCALL\n"); + hr = WINED3DERR_INVALIDCALL; } } @@ -5819,7 +5819,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawRectPatch(IWineD3DDevice *iface, UINT Hand IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) Handle(%d) noSegs(%p) rectpatch(%p)\n", This, Handle, pNumSegs, pRectPatchInfo); FIXME("(%p) : Stub\n", This); - return D3D_OK; + return WINED3D_OK; } @@ -5828,14 +5828,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawTriPatch(IWineD3DDevice *iface, UINT Handl IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) Handle(%d) noSegs(%p) tripatch(%p)\n", This, Handle, pNumSegs, pTriPatchInfo); FIXME("(%p) : Stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_DeletePatch(IWineD3DDevice *iface, UINT Handle) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) Handle(%d)\n", This, Handle); FIXME("(%p) : Stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurface *pSurface, CONST D3DRECT* pRect, D3DCOLOR color) { @@ -5854,11 +5854,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa if (surface->resource.pool != WINED3DPOOL_DEFAULT) { FIXME("call to colorfill with non WINED3DPOOL_DEFAULT surface\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* TODO: get rid of IWineD3DSwapChainImpl reference, a 'context' manager may help with this */ - if (D3D_OK == IWineD3DSurface_GetContainer(pSurface, &IID_IWineD3DSwapChain, (void **)&container) || pSurface == This->renderTarget) { + if (WINED3D_OK == IWineD3DSurface_GetContainer(pSurface, &IID_IWineD3DSwapChain, (void **)&container) || pSurface == This->renderTarget) { if (WINED3DUSAGE_RENDERTARGET & surface->resource.usage) { /* TODO: make sure we set everything back to the way it was, and context management! glGetIntegerv(GL_READ_BUFFER, &prev_read); @@ -5882,7 +5882,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa IWineD3DSwapChain_Release((IWineD3DSwapChain *)container); } /* we can use GL_STENCIL_INDEX etc...*/ - return D3D_OK; + return WINED3D_OK; } if (container != NULL) { IWineD3DSwapChain_Release((IWineD3DSwapChain *)container); @@ -5941,7 +5941,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa } HeapFree(GetProcessHeap(), 0, data); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } @@ -5958,7 +5958,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface,DWORD /* Note inc ref on returned surface */ if(*ppRenderTarget != NULL) IWineD3DSurface_AddRef(*ppRenderTarget); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_GetDepthStencilSurface(IWineD3DDevice* iface, IWineD3DSurface **ppZStencilSurface) { @@ -5970,7 +5970,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetDepthStencilSurface(IWineD3DDevice* iface /* Note inc ref on returned surface */ IWineD3DSurface_AddRef(*ppZStencilSurface); } - return D3D_OK; + return WINED3D_OK; } /* internal static helper functions */ @@ -5979,7 +5979,7 @@ HRESULT WINAPI static IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface, HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, DWORD RenderTargetIndex, IWineD3DSurface *pRenderTarget) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; WINED3DVIEWPORT viewport; TRACE("(%p) Swapping rendertarget\n",This); @@ -5997,12 +5997,12 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, DWORD R */ if (RenderTargetIndex == 0 && pRenderTarget == NULL) { FIXME("Trying to set render target 0 to NULL\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* TODO: replace Impl* usage with interface usage */ if (!((IWineD3DSurfaceImpl *)pRenderTarget)->resource.usage & WINED3DUSAGE_RENDERTARGET) { FIXME("(%p)Trying to set the render target to a surface(%p) that wasn't created with a usage of WINED3DUSAGE_RENDERTARGET\n",This ,pRenderTarget); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /** TODO: check that the depth stencil format matches the render target, this is only done in debug * builds, but I think wine counts as a 'debug' build for now. @@ -6045,7 +6045,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, DWORD R HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *iface, IWineD3DSurface *pNewZStencil) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; IWineD3DSurface *tmp; TRACE("(%p) Swapping z-buffer\n",This); @@ -6066,7 +6066,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *iface, /* should we be calling the parent or the wined3d surface? */ if (NULL != This->stencilBufferTarget) IWineD3DSurface_AddRef(This->stencilBufferTarget); if (NULL != tmp) IWineD3DSurface_Release(tmp); - hr = D3D_OK; + hr = WINED3D_OK; /** TODO: glEnable/glDisable on depth/stencil depending on * pNewZStencil is NULL and the depth/stencil is enabled in d3d **********************************************************/ @@ -6093,7 +6093,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CleanRender(IWineD3DDevice* iface, IWineD3DSwa swapchain->render_ctx = swapchain->glCtx; swapchain->drawable = swapchain->win; } - return D3D_OK; + return WINED3D_OK; } /* TODO: move this off into a context manager so that GLX_ATI_render_texture and other types of surface can be used. */ @@ -6154,7 +6154,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_FindGLContext(IWineD3DDevice *iface, IWineD3DS } } if (*context != NULL) - return D3D_OK; + return WINED3D_OK; else return E_OUTOFMEMORY; } @@ -6166,7 +6166,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_FindGLContext(IWineD3DDevice *iface, IWineD3DS ******************************/ HRESULT WINAPI IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface, IWineD3DSurface *RenderSurface) { - HRESULT ret = D3DERR_INVALIDCALL; + HRESULT ret = WINED3DERR_INVALIDCALL; /** * Currently only active for GLX >= 1.3 @@ -6272,7 +6272,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface, #endif } - if (IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DSwapChain, (void **)¤tSwapchain) != D3D_OK) { + if (IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DSwapChain, (void **)¤tSwapchain) != WINED3D_OK) { /* the selected render target doesn't belong to a swapchain, so use the devices implicit swapchain */ IWineD3DDevice_GetSwapChain(iface, 0, ¤tSwapchain); } @@ -6281,7 +6281,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface, * TODO: remove the use of IWineD3DSwapChainImpl, a context manager will help since it will replace the * renderTarget = swapchain->backBuffer bit and anything to do with *glContexts **********************************************************************/ - if (IWineD3DSurface_GetContainer(RenderSurface, &IID_IWineD3DSwapChain, (void **)&swapchain) == D3D_OK) { + if (IWineD3DSurface_GetContainer(RenderSurface, &IID_IWineD3DSwapChain, (void **)&swapchain) == WINED3D_OK) { /* We also need to make sure that the lights &co are also in the context of the swapchains */ /* FIXME: If the render target gets sent to the frontBuffer should be be presenting it raw? */ TRACE("making swapchain active\n"); @@ -6327,7 +6327,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface, glContext *newContext; /* Here were using a shared context model */ - if (D3D_OK != IWineD3DDeviceImpl_FindGLContext(iface, RenderSurface, &newContext)) { + if (WINED3D_OK != IWineD3DDeviceImpl_FindGLContext(iface, RenderSurface, &newContext)) { FIXME("(%p) : Failed to find a context for surface %p\n", iface, RenderSurface); } @@ -6414,7 +6414,7 @@ the directX current directX state should then be applied to the context */ /* Check that the container is not a swapchain member */ IWineD3DSwapChain *tmpSwapChain; - if (D3D_OK != IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmpSwapChain)) { + if (WINED3D_OK != IWineD3DSurface_GetContainer(This->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmpSwapChain)) { This->renderUpsideDown = TRUE; }else{ This->renderUpsideDown = FALSE; @@ -6430,7 +6430,7 @@ the directX current directX state should then be applied to the context */ This->proj_valid = FALSE; } - ret = D3D_OK; + ret = WINED3D_OK; if (cfgs != NULL) { XFree(cfgs); @@ -6461,18 +6461,18 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* iface, U if (WINED3DFMT_A8R8G8B8 != pSur->resource.format) { ERR("(%p) : surface(%p) has an invalid format\n", This, pCursorBitmap); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (32 != pSur->currentDesc.Height || 32 != pSur->currentDesc.Width) { ERR("(%p) : surface(%p) has an invalid size\n", This, pCursorBitmap); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* TODO: make the cursor 'real' */ This->xHotSpot = XHotSpot; This->yHotSpot = YHotSpot; - return D3D_OK; + return WINED3D_OK; } void WINAPI IWineD3DDeviceImpl_SetCursorPosition(IWineD3DDevice* iface, int XScreenSpace, int YScreenSpace, DWORD Flags) { @@ -6492,7 +6492,7 @@ BOOL WINAPI IWineD3DDeviceImpl_ShowCursor(IWineD3DDevice* iface, BOOL bShow This->bCursorVisible = bShow; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice* iface) { @@ -6500,24 +6500,24 @@ HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice* iface) TRACE("(%p) : state (%lu)\n", This, This->state); /* TODO: Implement wrapping of the WndProc so that mimimize and maxamise can be monitored and the states adjusted. */ switch (This->state) { - case D3D_OK: - return D3D_OK; - case D3DERR_DEVICELOST: + case WINED3D_OK: + return WINED3D_OK; + case WINED3DERR_DEVICELOST: { ResourceList *resourceList = This->resources; while (NULL != resourceList) { if (((IWineD3DResourceImpl *)resourceList->resource)->resource.pool == WINED3DPOOL_DEFAULT /* TODO: IWineD3DResource_GetPool(resourceList->resource)*/) - return D3DERR_DEVICENOTRESET; + return WINED3DERR_DEVICENOTRESET; resourceList = resourceList->next; } - return D3DERR_DEVICELOST; + return WINED3DERR_DEVICELOST; } - case D3DERR_DRIVERINTERNALERROR: - return D3DERR_DRIVERINTERNALERROR; + case WINED3DERR_DRIVERINTERNALERROR: + return WINED3DERR_DRIVERINTERNALERROR; } /* Unknown state */ - return D3DERR_DRIVERINTERNALERROR; + return WINED3DERR_DRIVERINTERNALERROR; } @@ -6528,7 +6528,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_EvictManagedResources(IWineD3DDevice* iface) * and then reset them. ***********************************************************/ FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_Rest(IWineD3DDevice* iface, D3DPRESENT_PARAMETERS* pPresentationParameters) { @@ -6539,7 +6539,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Rest(IWineD3DDevice* iface, D3DPRESENT_PARAM * and should clear down the context and set it up according to pPresentationParameters ***********************************************************/ FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DDeviceImpl_SetDialogBoxMode(IWineD3DDevice *iface, BOOL bEnableDialogs) { @@ -6548,7 +6548,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetDialogBoxMode(IWineD3DDevice *iface, BOOL b if(bEnableDialogs == FALSE) { FIXME("(%p) Dialogs cannot be disabled yet\n", This); } - return D3D_OK; + return WINED3D_OK; } @@ -6557,16 +6557,16 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetCreationParameters(IWineD3DDevice *iface, TRACE("(%p) : pParameters %p\n", This, pParameters); *pParameters = This->createParms; - return D3D_OK; + return WINED3D_OK; } void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) { IWineD3DSwapChain *swapchain; - HRESULT hrc = D3D_OK; + HRESULT hrc = WINED3D_OK; TRACE("Relaying to swapchain\n"); - if ((hrc = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain)) == D3D_OK) { + if ((hrc = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain)) == WINED3D_OK) { IWineD3DSwapChain_SetGammaRamp(swapchain, Flags, (WINED3DGAMMARAMP *)pRamp); IWineD3DSwapChain_Release(swapchain); } @@ -6575,11 +6575,11 @@ void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT iSwapCh void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT iSwapChain, WINED3DGAMMARAMP* pRamp) { IWineD3DSwapChain *swapchain; - HRESULT hrc = D3D_OK; + HRESULT hrc = WINED3D_OK; TRACE("Relaying to swapchain\n"); - if ((hrc = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain)) == D3D_OK) { + if ((hrc = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain)) == WINED3D_OK) { hrc =IWineD3DSwapChain_GetGammaRamp(swapchain, pRamp); IWineD3DSwapChain_Release(swapchain); } diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c6994d88167..056c6fb76dd 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -173,7 +173,7 @@ HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *p || IsEqualGUID(riid, &IID_IWineD3DDevice)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; @@ -766,7 +766,7 @@ UINT WINAPI IWineD3DImpl_GetAdapterCount (IWineD3D *iface) { HRESULT WINAPI IWineD3DImpl_RegisterSoftwareDevice(IWineD3D *iface, void* pInitializeFunction) { IWineD3DImpl *This = (IWineD3DImpl *)iface; FIXME("(%p)->(%p): stub\n", This, pInitializeFunction); - return D3D_OK; + return WINED3D_OK; } HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adapter) { @@ -775,7 +775,7 @@ HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adapter) { if (Adapter >= IWineD3DImpl_GetAdapterCount(iface)) { return NULL; } - return D3D_OK; + return WINED3D_OK; } /* FIXME: GetAdapterModeCount and EnumAdapterModes currently only returns modes @@ -844,7 +844,7 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE if (NULL == pMode || Adapter >= IWineD3DImpl_GetAdapterCount(iface) || Mode >= IWineD3DImpl_GetAdapterModeCount(iface, Adapter, Format)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (Adapter == 0) { /* Display */ @@ -921,12 +921,12 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE else { TRACE_(d3d_caps)("Requested mode out of range %d\n", Mode); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } #else /* Return one setting of the format requested */ - if (Mode > 0) return D3DERR_INVALIDCALL; + if (Mode > 0) return WINED3DERR_INVALIDCALL; pMode->Width = 800; pMode->Height = 600; pMode->RefreshRate = D3DADAPTER_DEFAULT; @@ -940,7 +940,7 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE FIXME_(d3d_caps)("Adapter not primary display\n"); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter, WINED3DDISPLAYMODE* pMode) { @@ -949,7 +949,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter, if (NULL == pMode || Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (Adapter == 0) { /* Display */ @@ -980,7 +980,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter, TRACE_(d3d_caps)("returning w:%d, h:%d, ref:%d, fmt:%s\n", pMode->Width, pMode->Height, pMode->RefreshRate, debug_d3dformat(pMode->Format)); - return D3D_OK; + return WINED3D_OK; } static Display * WINAPI IWineD3DImpl_GetAdapterDisplay(IWineD3D *iface, UINT Adapter) { @@ -1004,7 +1004,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, TRACE_(d3d_caps)("(%p}->(Adapter: %d, Flags: %lx, pId=%p)\n", This, Adapter, Flags, pIdentifier); if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (Adapter == 0) { /* Display - only device supported for now */ @@ -1066,7 +1066,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, FIXME_(d3d_caps)("Adapter not primary display\n"); } - return D3D_OK; + return WINED3D_OK; } static BOOL IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(WineD3D_Context* ctx, GLXFBConfig cfgs, WINED3DFORMAT Format) { @@ -1203,7 +1203,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter WINED3DFORMAT RenderTargetFormat, WINED3DFORMAT DepthStencilFormat) { IWineD3DImpl *This = (IWineD3DImpl *)iface; - HRESULT hr = D3DERR_NOTAVAILABLE; + HRESULT hr = WINED3DERR_NOTAVAILABLE; WineD3D_Context* ctx = NULL; GLXFBConfig* cfgs = NULL; int nCfgs = 0; @@ -1217,8 +1217,8 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter DepthStencilFormat, debug_d3dformat(DepthStencilFormat)); if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - TRACE("(%p) Failed: Atapter (%u) higher than supported adapters (%u) returning D3DERR_INVALIDCALL\n", This, Adapter, IWineD3D_GetAdapterCount(iface)); - return D3DERR_INVALIDCALL; + TRACE("(%p) Failed: Atapter (%u) higher than supported adapters (%u) returning WINED3DERR_INVALIDCALL\n", This, Adapter, IWineD3D_GetAdapterCount(iface)); + return WINED3DERR_INVALIDCALL; } /* TODO: use the real context if it's available */ ctx = WineD3D_CreateFakeGLContext(); @@ -1232,7 +1232,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter for (it = 0; it < nCfgs; ++it) { if (IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(ctx, cfgs[it], RenderTargetFormat)) { if (IWineD3DImpl_IsGLXFBConfigCompatibleWithDepthFmt(ctx, cfgs[it], DepthStencilFormat)) { - hr = D3D_OK; + hr = WINED3D_OK; break ; } } @@ -1241,13 +1241,13 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter cfgs = NULL; } else { /* If there's a corrent context then we cannot create a fake one so pass everything */ - hr = D3D_OK; + hr = WINED3D_OK; } if (ctx != NULL) WineD3D_ReleaseFakeGLContext(ctx); - if (hr != D3D_OK) + if (hr != WINED3D_OK) TRACE_(d3d_caps)("Failed to match stencil format to device\b"); TRACE_(d3d_caps)("(%p) : Returning %lx\n", This, hr); @@ -1269,7 +1269,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Ada pQualityLevels); if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (pQualityLevels != NULL) { @@ -1281,8 +1281,8 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Ada *pQualityLevels = 1; /* Guess at a value! */ } - if (WINED3DMULTISAMPLE_NONE == MultiSampleType) return D3D_OK; - return D3DERR_NOTAVAILABLE; + if (WINED3DMULTISAMPLE_NONE == MultiSampleType) return WINED3D_OK; + return WINED3DERR_NOTAVAILABLE; } HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE CheckType, @@ -1298,21 +1298,21 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, WINED Windowed); if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } { GLXFBConfig* cfgs = NULL; int nCfgs = 0; int it; - HRESULT hr = D3DERR_NOTAVAILABLE; + HRESULT hr = WINED3DERR_NOTAVAILABLE; WineD3D_Context* ctx = WineD3D_CreateFakeGLContext(); if (NULL != ctx) { cfgs = glXGetFBConfigs(ctx->display, DefaultScreen(ctx->display), &nCfgs); for (it = 0; it < nCfgs; ++it) { if (IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(ctx, cfgs[it], DisplayFormat)) { - hr = D3D_OK; + hr = WINED3D_OK; break ; } } @@ -1323,7 +1323,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, WINED } } - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType, @@ -1339,7 +1339,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WIN CheckFormat, debug_d3dformat(CheckFormat)); if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) { @@ -1350,7 +1350,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WIN case D3DFMT_DXT4: case D3DFMT_DXT5: TRACE_(d3d_caps)("[OK]\n"); - return D3D_OK; + return WINED3D_OK; default: break; /* Avoid compiler warnings */ } @@ -1409,13 +1409,13 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WIN /* Since we do not support these formats right now, don't pretend to. */ TRACE_(d3d_caps)("[FAILED]\n"); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; default: break; } TRACE_(d3d_caps)("[OK]\n"); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DImpl_CheckDeviceFormatConversion(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType, @@ -1428,7 +1428,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormatConversion(IWineD3D *iface, UINT DeviceType, debug_d3ddevicetype(DeviceType), SourceFormat, debug_d3dformat(SourceFormat), TargetFormat, debug_d3dformat(TargetFormat)); - return D3D_OK; + return WINED3D_OK; } /* Note: d3d8 passes in a pointer to a D3DCAPS8 structure, which is a true @@ -1441,7 +1441,7 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D TRACE_(d3d_caps)("(%p)->(Adptr:%d, DevType: %x, pCaps: %p)\n", This, Adapter, DeviceType, pCaps); if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* If we don't know the device settings, go query them now */ @@ -1737,7 +1737,7 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D *pCaps->MaxPixelShader30InstructionSlots = 0; } - return D3D_OK; + return WINED3D_OK; } @@ -1754,7 +1754,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3 /* Validate the adapter number */ if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* Create a WineD3DDevice object */ @@ -1762,7 +1762,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3 *ppReturnedDeviceInterface = (IWineD3DDevice *)object; TRACE("Created WineD3DDevice object @ %p\n", object); if (NULL == object) { - return D3DERR_OUTOFVIDEOMEMORY; + return WINED3DERR_OUTOFVIDEOMEMORY; } /* Set up initial COM information */ @@ -1773,7 +1773,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3 object->parent = parent; /* Set the state up as invalid until the device is fully created */ - object->state = D3DERR_DRIVERINTERNALERROR; + object->state = WINED3DERR_DRIVERINTERNALERROR; TRACE("(%p)->(Adptr:%d, DevType: %x, FocusHwnd: %p, BehFlags: %lx, PresParms: %p, RetDevInt: %p)\n", This, Adapter, DeviceType, hFocusWindow, BehaviourFlags, pPresentationParameters, ppReturnedDeviceInterface); @@ -1796,7 +1796,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3 if (This->dxVersion >= 8) { TRACE("(%p) : Creating stateblock\n", This); /* Creating the startup stateBlock - Note Special Case: 0 => Don't fill in yet! */ - if (D3D_OK != IWineD3DDevice_CreateStateBlock((IWineD3DDevice *)object, + if (WINED3D_OK != IWineD3DDevice_CreateStateBlock((IWineD3DDevice *)object, WINED3DSBT_INIT, (IWineD3DStateBlock **)&object->stateBlock, NULL) || NULL == object->stateBlock) { /* Note: No parent needed for initial internal stateblock */ @@ -1815,7 +1815,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3 /* Setup the implicit swapchain */ TRACE("Creating implicit swapchain\n"); - if (D3D_OK != D3DCB_CreateAdditionalSwapChain((IUnknown *) object->parent, pPresentationParameters, (IWineD3DSwapChain **)&swapchain) || swapchain == NULL) { + if (WINED3D_OK != D3DCB_CreateAdditionalSwapChain((IUnknown *) object->parent, pPresentationParameters, (IWineD3DSwapChain **)&swapchain) || swapchain == NULL) { WARN("Failed to create implicit swapchain\n"); goto create_device_error; } @@ -1873,13 +1873,13 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3 } /* set the state of the device to valid */ - object->state = D3D_OK; + object->state = WINED3D_OK; - return D3D_OK; + return WINED3D_OK; create_device_error: /* Set the device state to error */ - object->state = D3DERR_DRIVERINTERNALERROR; + object->state = WINED3DERR_DRIVERINTERNALERROR; if (object->updateStateBlock != NULL) { IWineD3DStateBlock_Release((IWineD3DStateBlock *)object->updateStateBlock); @@ -1907,7 +1907,7 @@ create_device_error: } HeapFree(GetProcessHeap(), 0, object); *ppReturnedDeviceInterface = NULL; - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } @@ -1915,7 +1915,7 @@ HRESULT WINAPI IWineD3DImpl_GetParent(IWineD3D *iface, IUnknown **pParent) { IWineD3DImpl *This = (IWineD3DImpl *)iface; IUnknown_AddRef(This->parent); *pParent = This->parent; - return D3D_OK; + return WINED3D_OK; } /********************************************************** diff --git a/dlls/wined3d/indexbuffer.c b/dlls/wined3d/indexbuffer.c index ffa55ce1b5d..9794367d4d9 100644 --- a/dlls/wined3d/indexbuffer.c +++ b/dlls/wined3d/indexbuffer.c @@ -40,7 +40,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_QueryInterface(IWineD3DIndexBuffer *iface || IsEqualGUID(riid, &IID_IWineD3DIndexBuffer)){ IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -109,12 +109,12 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface, IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface; TRACE("(%p) : no real locking yet, offset %d, size %d, Flags=%lx\n", This, OffsetToLock, SizeToLock, Flags); *ppbData = (BYTE *)This->resource.allocatedMemory + OffsetToLock; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface) { IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface; TRACE("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DIndexBufferImpl_GetDesc(IWineD3DIndexBuffer *iface, WINED3DINDEXBUFFER_DESC *pDesc) { IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface; @@ -125,7 +125,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_GetDesc(IWineD3DIndexBuffer *ifac pDesc->Usage = This->resource.usage; pDesc->Pool = This->resource.pool; pDesc->Size = This->resource.size; - return D3D_OK; + return WINED3D_OK; } const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl = diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 2952982c6e4..d35e6ecbb05 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -56,7 +56,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_QueryInterface(IWineD3DPixelShader *iface || IsEqualGUID(riid, &IID_IWineD3DPixelShader)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -94,7 +94,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetParent(IWineD3DPixelShader *iface, IUn *parent = This->parent; IUnknown_AddRef(*parent); TRACE("(%p) : returning %p\n", This, *parent); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DPixelShaderImpl_GetDevice(IWineD3DPixelShader* iface, IWineD3DDevice **pDevice){ @@ -102,7 +102,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetDevice(IWineD3DPixelShader* iface, IWi IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice); *pDevice = (IWineD3DDevice *)This->wineD3DDevice; TRACE("(%p) returning %p\n", This, *pDevice); - return D3D_OK; + return WINED3D_OK; } @@ -112,11 +112,11 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader* impl, VO if (NULL == pData) { *pSizeOfData = This->baseShader.functionLength; - return D3D_OK; + return WINED3D_OK; } if (*pSizeOfData < This->baseShader.functionLength) { *pSizeOfData = This->baseShader.functionLength; - return D3DERR_MOREDATA; + return WINED3DERR_MOREDATA; } if (NULL == This->baseShader.function) { /* no function defined */ TRACE("(%p) : GetFunction no User Function defined using NULL to %p\n", This, pData); @@ -128,7 +128,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader* impl, VO TRACE("(%p) : GetFunction copying to %p\n", This, pData); memcpy(pData, This->baseShader.function, This->baseShader.functionLength); } - return D3D_OK; + return WINED3D_OK; } /******************************* @@ -1816,8 +1816,8 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *iface, C } /* TODO: Some proper return values for failures */ - TRACE("(%p) : Returning D3D_OK\n", This); - return D3D_OK; + TRACE("(%p) : Returning WINED3D_OK\n", This); + return WINED3D_OK; } const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl = diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index af0baaac23d..4fc53b253d6 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -42,7 +42,7 @@ HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID rii || IsEqualGUID(riid, &IID_IWineD3DQuery)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -76,7 +76,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetParent(IWineD3DQuery *iface, IUnknown** pare *parent= (IUnknown*) parent; IUnknown_AddRef(*parent); TRACE("(%p) : returning %p\n", This, *parent); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice **pDevice){ @@ -84,7 +84,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice); *pDevice = (IWineD3DDevice *)This->wineD3DDevice; TRACE("(%p) returning %p\n", This, *pDevice); - return D3D_OK; + return WINED3D_OK; } @@ -238,7 +238,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWOR }; /*dwGetDataFlags = 0 || D3DGETDATA_FLUSH - D3DGETDATA_FLUSH may return D3DERR_DEVICELOST if the device is lost + D3DGETDATA_FLUSH may return WINED3DERR_DEVICELOST if the device is lost */ FIXME("(%p) : stub\n", This); return S_OK; /* S_OK if the query data is available*/ @@ -314,7 +314,7 @@ WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){ HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags){ IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; FIXME("(%p) : stub\n", This); - return D3D_OK; /* can be D3DERR_INVALIDCALL. */ + return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */ } diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 56efcb7b6b7..78537e866e9 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -37,7 +37,7 @@ HRESULT WINAPI IWineD3DResourceImpl_QueryInterface(IWineD3DResource *iface, REFI || IsEqualGUID(riid, &IID_IWineD3DResource)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -84,7 +84,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetDevice(IWineD3DResource *iface, IWineD3DD TRACE("(%p) : returning %p\n", This, This->resource.wineD3DDevice); *ppDevice = (IWineD3DDevice *) This->resource.wineD3DDevice; IWineD3DDevice_AddRef(*ppDevice); - return D3D_OK; + return WINED3D_OK; } static PrivateData** IWineD3DResourceImpl_FindPrivateData(IWineD3DResourceImpl *This, @@ -130,7 +130,7 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG /* link it in */ (*data)->next = This->resource.privateData; This->resource.privateData = *data; - return D3D_OK; + return WINED3D_OK; } else { /* I don't actually know how windows handles this case. The only @@ -141,7 +141,7 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { @@ -150,7 +150,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG TRACE("(%p) : %p %p %p\n", This, refguid, pData, pSizeOfData); data = IWineD3DResourceImpl_FindPrivateData(This, refguid); - if (*data == NULL) return D3DERR_NOTFOUND; + if (*data == NULL) return WINED3DERR_NOTFOUND; #if 0 /* This may not be right. */ @@ -160,7 +160,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG #endif if (*pSizeOfData < (*data)->size) { *pSizeOfData = (*data)->size; - return D3DERR_MOREDATA; + return WINED3DERR_MOREDATA; } if ((*data)->flags & D3DSPD_IUNKNOWN) { @@ -171,7 +171,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG memcpy(pData, (*data)->ptr.data, (*data)->size); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REFGUID refguid) { IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; @@ -180,7 +180,7 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF TRACE("(%p) : %p\n", This, refguid); /* TODO: move this code off into a linked list class */ data = IWineD3DResourceImpl_FindPrivateData(This, refguid); - if (*data == NULL) return D3DERR_NOTFOUND; + if (*data == NULL) return WINED3DERR_NOTFOUND; *data = (*data)->next; @@ -194,7 +194,7 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF HeapFree(GetProcessHeap(), 0, *data); - return D3D_OK; + return WINED3D_OK; } /* Priority support is not implemented yet */ @@ -225,7 +225,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetParent(IWineD3DResource *iface, IUnknown IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; IUnknown_AddRef(This->resource.parent); *pParent = This->resource.parent; - return D3D_OK; + return WINED3D_OK; } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 4183b81b849..c0d3a369ca4 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -38,7 +38,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,R || IsEqualGUID(riid, &IID_IWineD3DStateBlock)){ IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -111,7 +111,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_GetParent(IWineD3DStateBlock *iface, IUnkn IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; IUnknown_AddRef(This->parent); *pParent = This->parent; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DStateBlockImpl_GetDevice(IWineD3DStateBlock *iface, IWineD3DDevice** ppDevice){ @@ -120,7 +120,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_GetDevice(IWineD3DStateBlock *iface, IWine *ppDevice = (IWineD3DDevice*)This->wineD3DDevice; IWineD3DDevice_AddRef(*ppDevice); - return D3D_OK; + return WINED3D_OK; } @@ -370,7 +370,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface){ TRACE("(%p) : Updated state block %p ------------------^\n", targetStateBlock, This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface){ @@ -581,7 +581,7 @@ should really perform a delta so that only the changes get updated*/ memcpy(&((IWineD3DDeviceImpl*)pDevice)->stateBlock->changed, &This->changed, sizeof(((IWineD3DDeviceImpl*)pDevice)->stateBlock->changed)); TRACE("(%p) : Applied state block %p ------------------^\n", This, pDevice); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock* iface) { @@ -852,7 +852,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock* This->wineD3DDevice->currentPalette = 0; TRACE("-----------------------> Device defaults now set up...\n"); - return D3D_OK; + return WINED3D_OK; } /********************************************************** diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 846130634e8..f1868cdb3de 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -45,7 +45,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID || IsEqualGUID(riid, &IID_IWineD3DSurface)) { IUnknown_AddRef((IUnknown*)iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -114,7 +114,7 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; IWineD3DBaseTexture *baseTexture = NULL; TRACE("(%p)Checking to see if the container is a base texture\n", This); - if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == D3D_OK) { + if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) { TRACE("Passing to conatiner\n"); IWineD3DBaseTexture_PreLoad(baseTexture); IWineD3DBaseTexture_Release(baseTexture); @@ -193,7 +193,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetContainerParent(IWineD3DSurface* iface, IU *ppContainerParent = NULL; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSurfaceImpl_GetContainer(IWineD3DSurface* iface, REFIID riid, void** ppContainer) { @@ -234,7 +234,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFAC if(pDesc->MultiSampleQuality != NULL) *(pDesc->MultiSampleQuality) = This->currentDesc.MultiSampleQuality; if(pDesc->Width != NULL) *(pDesc->Width) = This->currentDesc.Width; if(pDesc->Height != NULL) *(pDesc->Height) = This->currentDesc.Height; - return D3D_OK; + return WINED3D_OK; } void WINAPI IWineD3DSurfaceImpl_SetGlTextureDesc(IWineD3DSurface *iface, UINT textureName, int target) { @@ -282,7 +282,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE texture regions, and since the destination is an unlockable region we need to tolerate this */ TRACE("Warning: trying to lock unlockable surf@%p\n", This); - /*return D3DERR_INVALIDCALL; */ + /*return WINED3DERR_INVALIDCALL; */ } if (This->resource.usage & WINED3DUSAGE_RENDERTARGET) { @@ -642,7 +642,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE IWineD3DSurface_AddDirtyRect(iface, &This->lockedRect); /** Dirtify Container if needed */ - if (D3D_OK == IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&pBaseTexture) && pBaseTexture != NULL) { + if (WINED3D_OK == IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&pBaseTexture) && pBaseTexture != NULL) { TRACE("Making container dirty\n"); IWineD3DBaseTexture_SetDirty(pBaseTexture, TRUE); IWineD3DBaseTexture_Release(pBaseTexture); @@ -654,7 +654,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE TRACE("returning memory@%p, pitch(%d) dirtyfied(%d)\n", pLockedRect->pBits, pLockedRect->Pitch, This->Dirty); This->locked = TRUE; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { @@ -666,7 +666,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { if (FALSE == This->locked) { WARN("trying to Unlock an unlocked surf@%p\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (WINED3DUSAGE_RENDERTARGET & This->resource.usage) { @@ -912,19 +912,19 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { unlock_end: This->locked = FALSE; memset(&This->lockedRect, 0, sizeof(RECT)); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; FIXME("No support for GetDC yet for surface %p\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; FIXME("No support for ReleaseDC yet for surface %p\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* ****************************************************** @@ -935,11 +935,11 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { if (This->inTexture) { TRACE("Surface already in texture\n"); - return D3D_OK; + return WINED3D_OK; } if (This->Dirty == FALSE) { TRACE("surface isn't dirty\n"); - return D3D_OK; + return WINED3D_OK; } This->Dirty = FALSE; @@ -954,7 +954,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { if (This->resource.pool == WINED3DPOOL_SCRATCH || This->resource.pool == WINED3DPOOL_SYSTEMMEM) { FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (This->inPBuffer) { @@ -990,7 +990,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { This->inTexture = TRUE; } LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } if ((This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8) && @@ -1042,7 +1042,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } /* TODO: Compressed non-power 2 support */ @@ -1186,7 +1186,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { } - return D3D_OK; + return WINED3D_OK; } #include @@ -1277,7 +1277,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, const ch f = fopen(filename, "w+"); if (NULL == f) { ERR("opening of %s failed with: %s\n", filename, strerror(errno)); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* Save the dat out to a TGA file because 1: it's an easy raw format, 2: it supports an alpha chanel*/ TRACE("(%p) opened %s with format %s\n", This, filename, debug_d3dformat(This->resource.format)); @@ -1328,7 +1328,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, const ch IWineD3DSwapChain_Release(swapChain); } HeapFree(GetProcessHeap(), 0, allocatedMemory); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface) { @@ -1340,7 +1340,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface) { This->dirtyRect.bottom = 0; TRACE("(%p) : Dirty?%d, Rect:(%ld,%ld,%ld,%ld)\n", This, This->Dirty, This->dirtyRect.left, This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom); - return D3D_OK; + return WINED3D_OK; } /** @@ -1364,12 +1364,12 @@ extern HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, C TRACE("(%p) : Dirty?%d, Rect:(%ld,%ld,%ld,%ld)\n", This, This->Dirty, This->dirtyRect.left, This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom); /* if the container is a basetexture then mark it dirty. */ - if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == D3D_OK) { + if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) { TRACE("Passing to conatiner\n"); IWineD3DBaseTexture_SetDirty(baseTexture, TRUE); IWineD3DBaseTexture_Release(baseTexture); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container) { @@ -1382,7 +1382,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3D TRACE("Setting container to %p from %p\n", container, This->container); This->container = container; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) { @@ -1390,7 +1390,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORM if (This->resource.format != WINED3DFMT_UNKNOWN) { FIXME("(%p) : The foramt of the surface must be WINED3DFORMAT_UNKNOWN\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } TRACE("(%p) : Setting texture foramt to (%d,%s)\n", This, format, debug_d3dformat(format)); @@ -1433,7 +1433,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORM TRACE("(%p) : Size %d, pow2Size %d, bytesPerPixel %d, glFormat %d, glFotmatInternal %d, glType %d\n", This, This->resource.size, This->pow2Size, This->bytesPerPixel, This->glDescription.glFormat, This->glDescription.glFormatInternal, This->glDescription.glType); - return D3D_OK; + return WINED3D_OK; } /* TODO: replace this function with context management routines */ @@ -1442,7 +1442,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPBufferState(IWineD3DSurface *iface, BOOL This->inPBuffer = inPBuffer; This->inTexture = inTexture; - return D3D_OK; + return WINED3D_OK; } const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index ef4e4bd8227..8f67220b0a4 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -75,7 +75,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, RE return E_NOINTERFACE; } *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -126,7 +126,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetParent(IWineD3DSwapChain *iface, IUnknow *ppParent = This->parent; IUnknown_AddRef(*ppParent); TRACE("(%p) returning %p\n", This , *ppParent); - return D3D_OK; + return WINED3D_OK; } /*IWineD3DSwapChain parts follow: */ @@ -183,7 +183,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC if (NULL == This->visInfo) { ERR("cannot really get XVisual\n"); LEAVE_GL(); - return D3DERR_NOTAVAILABLE; + return WINED3DERR_NOTAVAILABLE; } /* Now we have problems? well not really we just need to know what the implicit context is */ /* now destroy the old context and create a new one (we should really copy the buffers over, and do the whole make current thing! */ @@ -233,7 +233,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC checkGLcall("glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);"); /* If this swapchain is currently the active context then make this swapchain active */ - if(IWineD3DSurface_GetContainer(This->wineD3DDevice->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmp) == D3D_OK){ + if(IWineD3DSurface_GetContainer(This->wineD3DDevice->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmp) == WINED3D_OK){ if(tmp != (IUnknown *)This){ glXMakeCurrent(This->display, currentDrawable, currentContext); checkGLcall("glXMakeCurrent"); @@ -327,7 +327,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC } TRACE("returning\n"); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, IWineD3DSurface *pDestSurface) { @@ -360,7 +360,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface glDescription->glType, (void *)IWineD3DSurface_GetData(pDestSurface)); LEAVE_GL(); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) { @@ -372,12 +372,12 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UIN if (iBackBuffer > This->presentParms.BackBufferCount - 1) { FIXME("Only one backBuffer currently supported\n"); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } /* Note inc ref on returned surface */ IWineD3DSurface_AddRef(*ppBackBuffer); - return D3D_OK; + return WINED3D_OK; } @@ -391,7 +391,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, W FIXME("(%p) : stub (once)\n", This); showFixmes = FALSE; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WINED3DDISPLAYMODE*pMode) { @@ -419,7 +419,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WI TRACE("(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)\n", This, pMode->Width, pMode->Height, pMode->RefreshRate, pMode->Format, debug_d3dformat(pMode->Format)); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice**ppDevice) { @@ -431,7 +431,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3 on the IDirect3DDevice9 interface. */ IWineD3DDevice_AddRef(*ppDevice); TRACE("(%p) : returning %p\n", This, *ppDevice); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters) { @@ -450,7 +450,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *ifa *pPresentationParameters->Flags = This->presentParms.Flags; *pPresentationParameters->FullScreen_RefreshRateInHz = This->presentParms.FullScreen_RefreshRateInHz; *pPresentationParameters->PresentationInterval = This->presentParms.PresentationInterval; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWORD Flags, CONST WINED3DGAMMARAMP *pRamp){ @@ -461,7 +461,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWOR hDC = GetDC(This->win_handle); SetDeviceGammaRamp(hDC, (LPVOID)pRamp); ReleaseDC(This->win_handle, hDC); - return D3D_OK; + return WINED3D_OK; } @@ -473,7 +473,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, WINE hDC = GetDC(This->win_handle); GetDeviceGammaRamp(hDC, pRamp); ReleaseDC(This->win_handle, hDC); - return D3D_OK; + return WINED3D_OK; } diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index ab07df4c096..66df5b8fb44 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -40,7 +40,7 @@ HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DTexture *iface, REFIID || IsEqualGUID(riid, &IID_IWineD3DTexture)){ IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -253,20 +253,20 @@ HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, UINT Lev return IWineD3DSurface_GetDesc(This->surfaces[Level], pDesc); } FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } HRESULT WINAPI IWineD3DTextureImpl_GetSurfaceLevel(IWineD3DTexture *iface, UINT Level, IWineD3DSurface** ppSurfaceLevel) { IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; if (Level < This->baseTexture.levels) { *ppSurfaceLevel = This->surfaces[Level]; IWineD3DSurface_AddRef((IWineD3DSurface*) This->surfaces[Level]); - hr = D3D_OK; + hr = WINED3D_OK; TRACE("(%p) : returning %p for level %d\n", This, *ppSurfaceLevel, Level); } - if (D3D_OK != hr) { + if (WINED3D_OK != hr) { WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); *ppSurfaceLevel = NULL; /* Just to be on the safe side.. */ } @@ -276,12 +276,12 @@ HRESULT WINAPI IWineD3DTextureImpl_GetSurfaceLevel(IWineD3DTexture *iface, UINT HRESULT WINAPI IWineD3DTextureImpl_LockRect(IWineD3DTexture *iface, UINT Level, WINED3DLOCKED_RECT *pLockedRect, CONST RECT *pRect, DWORD Flags) { IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; if (Level < This->baseTexture.levels) { hr = IWineD3DSurface_LockRect(This->surfaces[Level], pLockedRect, pRect, Flags); } - if (D3D_OK == hr) { + if (WINED3D_OK == hr) { TRACE("(%p) Level (%d) success\n", This, Level); } else { WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); @@ -292,12 +292,12 @@ HRESULT WINAPI IWineD3DTextureImpl_LockRect(IWineD3DTexture *iface, UINT Level, HRESULT WINAPI IWineD3DTextureImpl_UnlockRect(IWineD3DTexture *iface, UINT Level) { IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - HRESULT hr = D3DERR_INVALIDCALL; + HRESULT hr = WINED3DERR_INVALIDCALL; if (Level < This->baseTexture.levels) { hr = IWineD3DSurface_UnlockRect(This->surfaces[Level]); } - if ( D3D_OK == hr) { + if ( WINED3D_OK == hr) { TRACE("(%p) Level (%d) success\n", This, Level); } else { WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c index 607338ab508..d432cfd84ec 100644 --- a/dlls/wined3d/vertexbuffer.c +++ b/dlls/wined3d/vertexbuffer.c @@ -39,7 +39,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_QueryInterface(IWineD3DVertexBuffer *ifa || IsEqualGUID(riid, &IID_IWineD3DVertexBuffer)){ IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -109,12 +109,12 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_Lock(IWineD3DVertexBuffer *iface TRACE("(%p) : returning memory of %p (base:%p,offset:%u)\n", This, This->resource.allocatedMemory + OffsetToLock, This->resource.allocatedMemory, OffsetToLock); /* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */ *ppbData = This->resource.allocatedMemory + OffsetToLock; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexBufferImpl_Unlock(IWineD3DVertexBuffer *iface) { IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface; TRACE("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexBufferImpl_GetDesc(IWineD3DVertexBuffer *iface, WINED3DVERTEXBUFFER_DESC *pDesc) { IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface; @@ -126,7 +126,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_GetDesc(IWineD3DVertexBuffer *if pDesc->Pool = This->resource.pool; pDesc->Size = This->resource.size; pDesc->FVF = This->fvf; - return D3D_OK; + return WINED3D_OK; } const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl = @@ -158,5 +158,5 @@ BYTE* WINAPI IWineD3DVertexBufferImpl_GetMemory(IWineD3DVertexBuffer* iface, DWO } HRESULT WINAPI IWineD3DVertexBufferImpl_ReleaseMemory(IWineD3DVertexBuffer* iface) { - return D3D_OK; + return WINED3D_OK; } diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index e45f440dbe9..78c07c55fed 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -356,7 +356,7 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; memcpy(This->pDeclarationWine, convToW, nTokens * sizeof(WINED3DVERTEXELEMENT)); /* returns */ - return D3D_OK; + return WINED3D_OK; } static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDeclaration* iface, const D3DVERTEXELEMENT9* pDecl) { @@ -371,7 +371,7 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec if (This->declaration9NumElements == 128) { FIXME("?(%p) Error parsing vertex declaration\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } @@ -388,7 +388,7 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec This->declarationWNumElements = This->declaration9NumElements; - return D3D_OK; + return WINED3D_OK; } /* ******************************************* @@ -403,7 +403,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_QueryInterface(IWineD3DVertexDeclar || IsEqualGUID(riid, &IID_IWineD3DVertexDeclaration)){ IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -439,7 +439,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetParent(IWineD3DVertexDeclaration *parent= This->parent; IUnknown_AddRef(*parent); TRACE("(%p) : returning %p\n", This, *parent); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDevice(IWineD3DVertexDeclaration *iface, IWineD3DDevice** ppDevice) { @@ -449,14 +449,14 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDevice(IWineD3DVertexDeclaration *ppDevice = (IWineD3DDevice *) This->wineD3DDevice; IWineD3DDevice_AddRef(*ppDevice); - return D3D_OK; + return WINED3D_OK; } static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration8(IWineD3DVertexDeclaration* iface, DWORD* pData, DWORD* pSizeOfData) { IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; if (NULL == pData) { *pSizeOfData = This->declaration8Length; - return D3D_OK; + return WINED3D_OK; } /* The Incredibles and Teenage Mutant Ninja Turtles require this in d3d9 for NumElements == 0, @@ -465,17 +465,17 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration8(IWineD3DVert TRACE("(%p) : Requested the vertex declaration without specefying the size of the return buffer\n", This); *pSizeOfData = This->declaration8Length; memcpy(pData, This->pDeclaration8, This->declaration8Length); - return D3D_OK; + return WINED3D_OK; } if (*pSizeOfData < This->declaration8Length) { - FIXME("(%p) : Returning D3DERR_MOREDATA numElements %ld expected %ld\n", iface, *pSizeOfData, This->declaration8Length); + FIXME("(%p) : Returning WINED3DERR_MOREDATA numElements %ld expected %ld\n", iface, *pSizeOfData, This->declaration8Length); *pSizeOfData = This->declaration8Length; - return D3DERR_MOREDATA; + return WINED3DERR_MOREDATA; } TRACE("(%p) : GetVertexDeclaration8 copying to %p\n", This, pData); memcpy(pData, This->pDeclaration8, This->declaration8Length); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration9(IWineD3DVertexDeclaration* iface, D3DVERTEXELEMENT9* pData, DWORD* pNumElements) { @@ -488,18 +488,18 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration9(IWineD3DVertexDecla /* Passing a NULL pData is used to just retrieve the number of elements */ if (!pData) { - TRACE("NULL pData passed. Returning D3D_OK.\n"); - return D3D_OK; + TRACE("NULL pData passed. Returning WINED3D_OK.\n"); + return WINED3D_OK; } TRACE("Copying %p to %p\n", This->pDeclaration9, pData); memcpy(pData, This->pDeclaration9, This->declaration9NumElements * sizeof(*pData)); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration(IWineD3DVertexDeclaration *iface, VOID *pData, DWORD *pSize) { IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; TRACE("(%p) : d3d version %d r\n", This, ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion); switch (((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion) { @@ -518,7 +518,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration(IWineD3DVertexDeclar HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVertexDeclaration *iface, VOID *pDecl) { IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; - HRESULT hr = D3D_OK; + HRESULT hr = WINED3D_OK; TRACE("(%p) : d3d version %d\n", This, ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion); switch (((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion) { diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index 26701f66fef..ad7291f1304 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -1964,64 +1964,64 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_ExecuteSW(IWineD3DVertexShader* iface, W TRACE_VSVECTOR(output->oT[0]); TRACE_VSVECTOR(output->oT[1]); #endif - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_SetConstantF(IWineD3DVertexShader *iface, UINT StartRegister, CONST FLOAT *pConstantData, UINT Vector4fCount) { IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_GetConstantF(IWineD3DVertexShader *iface, UINT StartRegister, FLOAT *pConstantData, UINT Vector4fCount) { IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_SetConstantI(IWineD3DVertexShader *iface, UINT StartRegister, CONST int *pConstantData, UINT Vector4iCount) { IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; if (StartRegister + Vector4iCount > WINED3D_VSHADER_MAX_CONSTANTS) { ERR("(%p) : SetVertexShaderConstantI C[%u] invalid\n", This, StartRegister); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (NULL == pConstantData) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_GetConstantI(IWineD3DVertexShader *iface, UINT StartRegister, int *pConstantData, UINT Vector4iCount) { IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; TRACE("(%p) : C[%u] count=%u\n", This, StartRegister, Vector4iCount); if (StartRegister + Vector4iCount > WINED3D_VSHADER_MAX_CONSTANTS) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (NULL == pConstantData) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_SetConstantB(IWineD3DVertexShader *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount) { IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; if (StartRegister + BoolCount > WINED3D_VSHADER_MAX_CONSTANTS) { ERR("(%p) : SetVertexShaderConstantB C[%u] invalid\n", This, StartRegister); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } if (NULL == pConstantData) { - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_GetConstantB(IWineD3DVertexShader *iface, UINT StartRegister, BOOL *pConstantData, UINT BoolCount) { IWineD3DVertexShaderImpl* This = (IWineD3DVertexShaderImpl *)iface; FIXME("(%p) : stub\n", This); - return D3D_OK; + return WINED3D_OK; } #endif @@ -2039,7 +2039,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShader *ifa || IsEqualGUID(riid, &IID_IWineD3DVertexShader)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -2072,7 +2072,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetParent(IWineD3DVertexShader *iface, I *parent = This->parent; IUnknown_AddRef(*parent); TRACE("(%p) : returning %p\n", This, *parent); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_GetDevice(IWineD3DVertexShader* iface, IWineD3DDevice **pDevice){ @@ -2080,7 +2080,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetDevice(IWineD3DVertexShader* iface, I IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice); *pDevice = (IWineD3DDevice *)This->wineD3DDevice; TRACE("(%p) returning %p\n", This, *pDevice); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl, VOID* pData, UINT* pSizeOfData) { @@ -2089,11 +2089,11 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl, if (NULL == pData) { *pSizeOfData = This->baseShader.functionLength; - return D3D_OK; + return WINED3D_OK; } if (*pSizeOfData < This->baseShader.functionLength) { *pSizeOfData = This->baseShader.functionLength; - return D3DERR_MOREDATA; + return WINED3DERR_MOREDATA; } if (NULL == This->baseShader.function) { /* no function defined */ TRACE("(%p) : GetFunction no User Function defined using NULL to %p\n", This, pData); @@ -2105,7 +2105,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl, TRACE("(%p) : GetFunction copying to %p\n", This, pData); memcpy(pData, This->baseShader.function, This->baseShader.functionLength); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader *iface, CONST DWORD *pFunction) { @@ -2206,7 +2206,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader *iface, } else { This->baseShader.function = NULL; } - return D3D_OK; + return WINED3D_OK; } const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl = diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 25a50c9a8ed..61f20dcea78 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -38,7 +38,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_QueryInterface(IWineD3DVolume *iface, REFIID r || IsEqualGUID(riid, &IID_IWineD3DVolume)){ IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -123,7 +123,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_GetContainerParent(IWineD3DVolume *iface, IUnk *ppContainerParent = NULL; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeImpl_GetContainer(IWineD3DVolume *iface, REFIID riid, void** ppContainer) { @@ -156,7 +156,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, WINED3DVOLUME_D *(pDesc->Width) = This->currentDesc.Width; *(pDesc->Height) = This->currentDesc.Height; *(pDesc->Depth) = This->currentDesc.Depth; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) { @@ -217,19 +217,19 @@ HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DLOCKED_B This->locked = TRUE; TRACE("returning memory@%p rpitch(%d) spitch(%d)\n", pLockedVolume->pBits, pLockedVolume->RowPitch, pLockedVolume->SlicePitch); - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeImpl_UnlockBox(IWineD3DVolume *iface) { IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; if (FALSE == This->locked) { ERR("trying to lock unlocked volume@%p\n", This); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } TRACE("(%p) : unlocking volume\n", This); This->locked = FALSE; memset(&This->lockedBox, 0, sizeof(RECT)); - return D3D_OK; + return WINED3D_OK; } /* Internal use functions follow : */ @@ -243,7 +243,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_CleanDirtyBox(IWineD3DVolume *iface) { This->lockedBox.Right = 0; This->lockedBox.Bottom = 0; This->lockedBox.Back = 0; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeImpl_AddDirtyBox(IWineD3DVolume *iface, CONST D3DBOX* pDirtyBox) { @@ -264,7 +264,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_AddDirtyBox(IWineD3DVolume *iface, CONST D3DBO This->lockedBox.Bottom = This->currentDesc.Height; This->lockedBox.Back = This->currentDesc.Depth; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBase* container) { @@ -277,7 +277,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBa TRACE("Setting container to %p from %p\n", container, This->container); This->container = container; - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_level) { @@ -306,7 +306,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_l D3DFmt2GLType(myDevice, This->currentDesc.Format), This->resource.allocatedMemory); checkGLcall("glTexImage3D"); - return D3D_OK; + return WINED3D_OK; } diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 850b7e057b3..b5f1ffcd39b 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -40,7 +40,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *i || IsEqualGUID(riid, &IID_IWineD3DVolumeTexture)) { IUnknown_AddRef(iface); *ppobj = This; - return D3D_OK; + return WINED3D_OK; } return E_NOINTERFACE; } @@ -214,7 +214,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTexture *ifa } else { FIXME("(%p) Level (%d)\n", This, Level); } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *iface, UINT Level, IWineD3DVolume** ppVolumeLevel) { IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; @@ -224,9 +224,9 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *i TRACE("(%p) -> level(%d) returning volume@%p\n", This, Level, *ppVolumeLevel); } else { FIXME("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } - return D3D_OK; + return WINED3D_OK; } HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *iface, UINT Level, WINED3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) { @@ -239,7 +239,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *iface, U } else { FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } return hr; } @@ -254,7 +254,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_UnlockBox(IWineD3DVolumeTexture *iface, } else { FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); - return D3DERR_INVALIDCALL; + return WINED3DERR_INVALIDCALL; } return hr; } diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 6c0dc153588..fc2fac73db0 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -37,6 +37,40 @@ * PLEASE USE wine/wined3d_gl.h INSTEAD */ +/***************************************************************************** + * #defines and error codes + */ +#define _FACWINED3D 0x876 +#define MAKE_WINED3DHRESULT( code ) MAKE_HRESULT( 1, _FACWINED3D, code ) +#define MAKE_WINED3DSTATUS( code ) MAKE_HRESULT( 0, _FACWINED3D, code ) + +/***************************************************************************** + * Direct3D Errors + */ +#define WINED3D_OK S_OK +#define WINED3DERR_WRONGTEXTUREFORMAT MAKE_WINED3DHRESULT(2072) +#define WINED3DERR_UNSUPPORTEDCOLOROPERATION MAKE_WINED3DHRESULT(2073) +#define WINED3DERR_UNSUPPORTEDCOLORARG MAKE_WINED3DHRESULT(2074) +#define WINED3DERR_UNSUPPORTEDALPHAOPERATION MAKE_WINED3DHRESULT(2075) +#define WINED3DERR_UNSUPPORTEDALPHAARG MAKE_WINED3DHRESULT(2076) +#define WINED3DERR_TOOMANYOPERATIONS MAKE_WINED3DHRESULT(2077) +#define WINED3DERR_CONFLICTINGTEXTUREFILTER MAKE_WINED3DHRESULT(2078) +#define WINED3DERR_UNSUPPORTEDFACTORVALUE MAKE_WINED3DHRESULT(2079) +#define WINED3DERR_CONFLICTINGRENDERSTATE MAKE_WINED3DHRESULT(2081) +#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_WINED3DHRESULT(2082) +#define WINED3DERR_CONFLICTINGTEXTUREPALETTE MAKE_WINED3DHRESULT(2086) +#define WINED3DERR_DRIVERINTERNALERROR MAKE_WINED3DHRESULT(2087) +#define WINED3DERR_NOTFOUND MAKE_WINED3DHRESULT(2150) +#define WINED3DERR_MOREDATA MAKE_WINED3DHRESULT(2151) +#define WINED3DERR_DEVICELOST MAKE_WINED3DHRESULT(2152) +#define WINED3DERR_DEVICENOTRESET MAKE_WINED3DHRESULT(2153) +#define WINED3DERR_NOTAVAILABLE MAKE_WINED3DHRESULT(2154) +#define WINED3DERR_OUTOFVIDEOMEMORY MAKE_WINED3DHRESULT(380) +#define WINED3DERR_INVALIDDEVICE MAKE_WINED3DHRESULT(2155) +#define WINED3DERR_INVALIDCALL MAKE_WINED3DHRESULT(2156) +#define WINED3DERR_DRIVERINVALIDCALL MAKE_WINED3DHRESULT(2157) +#define WINED3DERR_WASSTILLDRAWING MAKE_WINED3DHRESULT(540) +#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159) /***************************************************************************** * Predeclare the interfaces