Re: [PATCH 3/3] d3dx9_36: Add support for D3DFMT_P8 and conversion to other ARGB formats + tests.
14 May
2013
14 May
'13
8:06 p.m.
Christian Costa <titan.costa(a)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(a)winehq.org
4596
Age (days ago)
4596
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard