[3/3] d3dx9: Implement conversion from DDS pixel format to D3DFORMAT.

Matteo Bruni matteo.mystral at gmail.com
Thu Apr 26 05:48:31 CDT 2012


Il 26 aprile 2012 11:47, Józef Kucia <joseph.kucia at gmail.com> ha scritto:
>  static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format)
>  {
> -    FIXME("Pixel format conversion not implemented.\n");
> +    if (pixel_format->flags & DDS_PF_FOURCC)
> +        return dds_fourcc_to_d3dformat(pixel_format->fourcc);
> +    else if (pixel_format->flags & DDS_PF_RGB)
> +        return dds_rgb_to_d3dformat(pixel_format);
> +    else if (pixel_format->flags & DDS_PF_LUMINANCE)
> +        return dds_luminance_to_d3dformat(pixel_format);
> +    else if (pixel_format->flags & DDS_PF_ALPHA_ONLY)
> +        return dds_alpha_to_d3dformat(pixel_format);

You don't need all those 'else's, the 'return's imply that you get
there only when the 'if' condition isn't true.
The same applies in other areas of this patch.

I don't mind much, but since you have to resend the series anyway...



More information about the wine-devel mailing list