Commit 3288911a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use proper enum elements for FOURCC formats.

parent 5d2a46d9
......@@ -2894,4 +2894,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface,
/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
#define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"
#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
#endif
......@@ -253,27 +253,24 @@ typedef enum _WINED3DFORMAT
WINED3DFMT_B5G5R5A1_UNORM,
WINED3DFMT_B8G8R8A8_UNORM,
WINED3DFMT_B8G8R8X8_UNORM,
/* FOURCC formats. */
WINED3DFMT_UYVY = 0x59565955, /* UYVY */
WINED3DFMT_YUY2 = 0x32595559, /* YUY2 */
WINED3DFMT_YV12 = 0x32315659, /* YV12 */
WINED3DFMT_DXT1 = 0x31545844, /* DXT1 */
WINED3DFMT_DXT2 = 0x32545844, /* DXT2 */
WINED3DFMT_DXT3 = 0x33545844, /* DXT3 */
WINED3DFMT_DXT4 = 0x34545844, /* DXT4 */
WINED3DFMT_DXT5 = 0x35545844, /* DXT5 */
WINED3DFMT_MULTI2_ARGB8 = 0x3154454d, /* MET1 */
WINED3DFMT_G8R8_G8B8 = 0x42475247, /* GRGB */
WINED3DFMT_R8G8_B8G8 = 0x47424752, /* RGBG */
WINED3DFMT_ATI2N = 0x32495441, /* ATI2 */
WINED3DFMT_NVHU = 0x5548564e, /* NVHU */
WINED3DFMT_NVHS = 0x5348564e, /* NVHS */
WINED3DFMT_FORCE_DWORD = 0xffffffff
} WINED3DFORMAT;
cpp_quote("#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \\")
cpp_quote(" ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \\")
cpp_quote(" ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))")
cpp_quote("#define WINED3DFMT_UYVY WINEMAKEFOURCC('U', 'Y', 'V', 'Y')")
cpp_quote("#define WINED3DFMT_YUY2 WINEMAKEFOURCC('Y', 'U', 'Y', '2')")
cpp_quote("#define WINED3DFMT_YV12 WINEMAKEFOURCC('Y', 'V', '1', '2')")
cpp_quote("#define WINED3DFMT_DXT1 WINEMAKEFOURCC('D', 'X', 'T', '1')")
cpp_quote("#define WINED3DFMT_DXT2 WINEMAKEFOURCC('D', 'X', 'T', '2')")
cpp_quote("#define WINED3DFMT_DXT3 WINEMAKEFOURCC('D', 'X', 'T', '3')")
cpp_quote("#define WINED3DFMT_DXT4 WINEMAKEFOURCC('D', 'X', 'T', '4')")
cpp_quote("#define WINED3DFMT_DXT5 WINEMAKEFOURCC('D', 'X', 'T', '5')")
cpp_quote("#define WINED3DFMT_MULTI2_ARGB8 WINEMAKEFOURCC('M', 'E', 'T', '1')")
cpp_quote("#define WINED3DFMT_G8R8_G8B8 WINEMAKEFOURCC('G', 'R', 'G', 'B')")
cpp_quote("#define WINED3DFMT_R8G8_B8G8 WINEMAKEFOURCC('R', 'G', 'B', 'G')")
/* Vendor specific formats */
cpp_quote("#define WINED3DFMT_ATI2N WINEMAKEFOURCC('A', 'T', 'I', '2')")
cpp_quote("#define WINED3DFMT_NVHU WINEMAKEFOURCC('N', 'V', 'H', 'U')")
cpp_quote("#define WINED3DFMT_NVHS WINEMAKEFOURCC('N', 'V', 'H', 'S')")
typedef enum _WINED3DRENDERSTATETYPE
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment