There's a pixelformat table that describes bitmasks and sizes in utils.c, you 
can access it with a function that is next to it. I think you can infer the 
shifting information from this table, if not please add it there instead of 
creating your own table.

Also please do not use C++ comments("//"), and watch out regarding tabs and 
spaces

Your patch still adds the x8r8g8b8_to_x5r6g5 function, and I think it is a bit 
ugly to bypass the existing format conversion table entirely and add the 
convert_unsigned_pixels function. I think it would be better to access this 
function using the conversion table. One reason is that we could use the table 
in directx.c in CheckDeviceFormatConversion, so the information is all in one 
place.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:wine-patches-
> [EMAIL PROTECTED] On Behalf Of Victor Eremin
> Sent: Sunday, July 13, 2008 5:52 PM
> To: [EMAIL PROTECTED]
> Subject: wined3d: universal surface convertor function for unsigned
> integer color formats
> 
> 
> Converter function supports conversion between most of "unsigned color"
> argb/xrgb surface formats (like D3DFMT_A8R8G8B8, D3DFMT_A8R3G3B2, and
> so on), and between "luminosity" color formats  (D3DFMT_L8, etc),
> excluding D3DFMT_A16R16G16B16, D3DFMT_A8P8,
> D3DFMT_P8 and D3DFMT_A1.
> 
> Conversion from rgba to luminosity (and vice versa) is not currently
> implemented.
> 
> The patch removes "Cannot find coverter" FIXMEs from "Ancient Evil" and
> "Stranded 2" games.
> 
> Patch also fixes water glitches in "Stranded 2" game.
> ---
>  dlls/wined3d/surface_base.c |  215
> +++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 209 insertions(+), 6 deletions(-)



Reply via email to