BOOL tex_alpha = FALSE;
IWineD3DBaseTexture *tex = NULL;
WINED3DSURFACE_DESC desc;
- WINED3DFORMAT fmt;
DDPIXELFORMAT ddfmt;
hr = IWineD3DDevice_GetTexture(This->wineD3DDevice,
if(hr == WINED3D_OK && tex)
{
- memset(&desc, 0, sizeof(desc));
- desc.Format = &fmt;
hr = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc);
if (SUCCEEDED(hr))
{
ddfmt.dwSize = sizeof(ddfmt);
- PixelFormat_WineD3DtoDD(&ddfmt, fmt);
+ PixelFormat_WineD3DtoDD(&ddfmt, desc.format);
if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE;
}
{
case D3DRENDERSTATE_TEXTUREMAG:
{
- WINED3DTEXTUREFILTERTYPE tex_mag = WINED3DTEXF_NONE;
+ WINED3DTEXTUREFILTERTYPE tex_mag = WINED3DTEXF_POINT;
switch ((D3DTEXTUREFILTER) Value)
{
case D3DRENDERSTATE_TEXTUREMIN:
{
- WINED3DTEXTUREFILTERTYPE tex_min = WINED3DTEXF_NONE;
+ WINED3DTEXTUREFILTERTYPE tex_min = WINED3DTEXF_POINT;
WINED3DTEXTUREFILTERTYPE tex_mip = WINED3DTEXF_NONE;
switch ((D3DTEXTUREFILTER) Value)
tex_min = WINED3DTEXF_LINEAR;
break;
case D3DFILTER_MIPNEAREST:
- tex_min = WINED3DTEXF_NONE;
+ tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_POINT;
break;
case D3DFILTER_MIPLINEAR:
- tex_min = WINED3DTEXF_NONE;
+ tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_LINEAR;
break;
case D3DFILTER_LINEARMIPNEAREST:
BOOL tex_alpha = FALSE;
IWineD3DBaseTexture *tex = NULL;
WINED3DSURFACE_DESC desc;
- WINED3DFORMAT fmt;
DDPIXELFORMAT ddfmt;
hr = IWineD3DDevice_GetTexture(This->wineD3DDevice,
if(hr == WINED3D_OK && tex)
{
memset(&desc, 0, sizeof(desc));
- desc.Format = &fmt;
hr = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc);
if (SUCCEEDED(hr))
{
ddfmt.dwSize = sizeof(ddfmt);
- PixelFormat_WineD3DtoDD(&ddfmt, fmt);
+ PixelFormat_WineD3DtoDD(&ddfmt, desc.format);
if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE;
}
TRACE("(%p)->(%08x,%08x)\n", This, LightStateType, Value);
- if (!LightStateType && (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
+ if (!LightStateType || (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
{
TRACE("Unexpected Light State Type\n");
return DDERR_INVALIDPARAMS;
TRACE("(%p)->(%08x,%p)\n", This, LightStateType, Value);
- if (!LightStateType && (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
+ if (!LightStateType || (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
{
TRACE("Unexpected Light State Type\n");
return DDERR_INVALIDPARAMS;
BOOL tex_alpha = FALSE;
IWineD3DBaseTexture *tex = NULL;
WINED3DSURFACE_DESC desc;
- WINED3DFORMAT fmt;
DDPIXELFORMAT ddfmt;
HRESULT result;
if(result == WINED3D_OK && tex)
{
memset(&desc, 0, sizeof(desc));
- desc.Format = &fmt;
result = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc);
if (SUCCEEDED(result))
{
ddfmt.dwSize = sizeof(ddfmt);
- PixelFormat_WineD3DtoDD(&ddfmt, fmt);
+ PixelFormat_WineD3DtoDD(&ddfmt, desc.format);
if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE;
}
static void copy_mipmap_chain(IDirect3DDeviceImpl *device,
IDirectDrawSurfaceImpl *dest,
IDirectDrawSurfaceImpl *src,
- POINT *DestPoint,
- RECT *SrcRect)
+ const POINT *DestPoint,
+ const RECT *SrcRect)
{
IDirectDrawSurfaceImpl *src_level, *dest_level;
IDirectDrawSurface7 *temp;
{
IDirectDrawSurface7 *depthStencil = NULL;
IDirectDrawSurfaceImpl *dsi;
- static DDSCAPS2 depthcaps = { DDSCAPS_ZBUFFER, 0, 0, {0} };
+ static DDSCAPS2 depthcaps = { DDSCAPS_ZBUFFER, 0, 0, 0 };
IDirectDrawSurface7_GetAttachedSurface((IDirectDrawSurface7 *)This->target, &depthcaps, &depthStencil);
if(!depthStencil)