[PATCH 3/3] d3dx9_36: Add support for D3DFMT_P8 and conversion to other ARGB formats + tests.
Alexandre Julliard
julliard at winehq.org
Tue May 14 15:06:39 CDT 2013
Christian Costa <titan.costa at gmail.com> writes:
> @@ -36,6 +36,16 @@ static void la_to_rgba(const struct vec4 *la, struct vec4 *rgba)
> rgba->w = la->w;
> }
>
> +static void index_to_rgba(const struct vec4 *index, struct vec4 *rgba, const PALETTEENTRY *palette)
> +{
> + ULONG idx = (ULONG)(index->x * 255.0f + 0.5f);
> +
> + rgba->x = palette[idx].peBlue / 255.0f;
> + rgba->y = palette[idx].peGreen / 255.0f;
> + rgba->z = palette[idx].peRed / 255.0f;
> + rgba->w = palette[idx].peFlags / 255.0f;
> +}
PALETTEENTRY doesn't seem to be the right type for what you need.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list