Commit 5b680d60 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Get rid of the flag_info typedef.

parent 6b9f151c
......@@ -563,11 +563,11 @@ void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
void multiply_matrix(LPD3DMATRIX dest, const D3DMATRIX *src1, const D3DMATRIX *src2) DECLSPEC_HIDDEN;
/* Used for generic dumping */
typedef struct
struct flag_info
{
DWORD val;
const char* name;
} flag_info;
const char *name;
};
#define FE(x) { x, #x }
......
......@@ -625,8 +625,7 @@ DDRAW_dump_DDCOLORKEY(const DDCOLORKEY *ddck)
TRACE("Low : 0x%08x - High : 0x%08x\n", ddck->dwColorSpaceLowValue, ddck->dwColorSpaceHighValue);
}
static void DDRAW_dump_flags_nolf(DWORD flags, const flag_info* names,
size_t num_names)
static void DDRAW_dump_flags_nolf(DWORD flags, const struct flag_info *names, size_t num_names)
{
unsigned int i;
......@@ -636,7 +635,7 @@ static void DDRAW_dump_flags_nolf(DWORD flags, const flag_info* names,
TRACE("%s ", names[i].name);
}
static void DDRAW_dump_flags(DWORD flags, const flag_info* names, size_t num_names)
static void DDRAW_dump_flags(DWORD flags, const struct flag_info *names, size_t num_names)
{
DDRAW_dump_flags_nolf(flags, names, num_names);
TRACE("\n");
......@@ -644,7 +643,8 @@ static void DDRAW_dump_flags(DWORD flags, const flag_info* names, size_t num_nam
void DDRAW_dump_DDSCAPS2(const DDSCAPS2 *in)
{
static const flag_info flags[] = {
static const struct flag_info flags[] =
{
FE(DDSCAPS_RESERVED1),
FE(DDSCAPS_ALPHA),
FE(DDSCAPS_BACKBUFFER),
......@@ -676,7 +676,8 @@ void DDRAW_dump_DDSCAPS2(const DDSCAPS2 *in)
FE(DDSCAPS_STANDARDVGAMODE),
FE(DDSCAPS_OPTIMIZED)
};
static const flag_info flags2[] = {
static const struct flag_info flags2[] =
{
FE(DDSCAPS2_HARDWAREDEINTERLACE),
FE(DDSCAPS2_HINTDYNAMIC),
FE(DDSCAPS2_HINTSTATIC),
......@@ -718,22 +719,22 @@ DDRAW_dump_DDSCAPS(const DDSCAPS *in)
static void
DDRAW_dump_pixelformat_flag(DWORD flagmask)
{
static const flag_info flags[] =
{
FE(DDPF_ALPHAPIXELS),
FE(DDPF_ALPHA),
FE(DDPF_FOURCC),
FE(DDPF_PALETTEINDEXED4),
FE(DDPF_PALETTEINDEXEDTO8),
FE(DDPF_PALETTEINDEXED8),
FE(DDPF_RGB),
FE(DDPF_COMPRESSED),
FE(DDPF_RGBTOYUV),
FE(DDPF_YUV),
FE(DDPF_ZBUFFER),
FE(DDPF_PALETTEINDEXED1),
FE(DDPF_PALETTEINDEXED2),
FE(DDPF_ZPIXELS)
static const struct flag_info flags[] =
{
FE(DDPF_ALPHAPIXELS),
FE(DDPF_ALPHA),
FE(DDPF_FOURCC),
FE(DDPF_PALETTEINDEXED4),
FE(DDPF_PALETTEINDEXEDTO8),
FE(DDPF_PALETTEINDEXED8),
FE(DDPF_RGB),
FE(DDPF_COMPRESSED),
FE(DDPF_RGBTOYUV),
FE(DDPF_YUV),
FE(DDPF_ZBUFFER),
FE(DDPF_PALETTEINDEXED1),
FE(DDPF_PALETTEINDEXED2),
FE(DDPF_ZPIXELS)
};
DDRAW_dump_flags_nolf(flagmask, flags, sizeof(flags)/sizeof(flags[0]));
......@@ -924,17 +925,17 @@ void DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(const DDDEVICEIDENTIFIER2* pIn, DDD
void DDRAW_dump_cooperativelevel(DWORD cooplevel)
{
static const flag_info flags[] =
{
FE(DDSCL_FULLSCREEN),
FE(DDSCL_ALLOWREBOOT),
FE(DDSCL_NOWINDOWCHANGES),
FE(DDSCL_NORMAL),
FE(DDSCL_ALLOWMODEX),
FE(DDSCL_EXCLUSIVE),
FE(DDSCL_SETFOCUSWINDOW),
FE(DDSCL_SETDEVICEWINDOW),
FE(DDSCL_CREATEDEVICEWINDOW)
static const struct flag_info flags[] =
{
FE(DDSCL_FULLSCREEN),
FE(DDSCL_ALLOWREBOOT),
FE(DDSCL_NOWINDOWCHANGES),
FE(DDSCL_NORMAL),
FE(DDSCL_ALLOWMODEX),
FE(DDSCL_EXCLUSIVE),
FE(DDSCL_SETFOCUSWINDOW),
FE(DDSCL_SETDEVICEWINDOW),
FE(DDSCL_CREATEDEVICEWINDOW)
};
if (TRACE_ON(ddraw))
......@@ -946,156 +947,156 @@ void DDRAW_dump_cooperativelevel(DWORD cooplevel)
void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps)
{
static const flag_info flags1[] =
static const struct flag_info flags1[] =
{
FE(DDCAPS_3D),
FE(DDCAPS_ALIGNBOUNDARYDEST),
FE(DDCAPS_ALIGNSIZEDEST),
FE(DDCAPS_ALIGNBOUNDARYSRC),
FE(DDCAPS_ALIGNSIZESRC),
FE(DDCAPS_ALIGNSTRIDE),
FE(DDCAPS_BLT),
FE(DDCAPS_BLTQUEUE),
FE(DDCAPS_BLTFOURCC),
FE(DDCAPS_BLTSTRETCH),
FE(DDCAPS_GDI),
FE(DDCAPS_OVERLAY),
FE(DDCAPS_OVERLAYCANTCLIP),
FE(DDCAPS_OVERLAYFOURCC),
FE(DDCAPS_OVERLAYSTRETCH),
FE(DDCAPS_PALETTE),
FE(DDCAPS_PALETTEVSYNC),
FE(DDCAPS_READSCANLINE),
FE(DDCAPS_STEREOVIEW),
FE(DDCAPS_VBI),
FE(DDCAPS_ZBLTS),
FE(DDCAPS_ZOVERLAYS),
FE(DDCAPS_COLORKEY),
FE(DDCAPS_ALPHA),
FE(DDCAPS_COLORKEYHWASSIST),
FE(DDCAPS_NOHARDWARE),
FE(DDCAPS_BLTCOLORFILL),
FE(DDCAPS_BANKSWITCHED),
FE(DDCAPS_BLTDEPTHFILL),
FE(DDCAPS_CANCLIP),
FE(DDCAPS_CANCLIPSTRETCHED),
FE(DDCAPS_CANBLTSYSMEM)
FE(DDCAPS_3D),
FE(DDCAPS_ALIGNBOUNDARYDEST),
FE(DDCAPS_ALIGNSIZEDEST),
FE(DDCAPS_ALIGNBOUNDARYSRC),
FE(DDCAPS_ALIGNSIZESRC),
FE(DDCAPS_ALIGNSTRIDE),
FE(DDCAPS_BLT),
FE(DDCAPS_BLTQUEUE),
FE(DDCAPS_BLTFOURCC),
FE(DDCAPS_BLTSTRETCH),
FE(DDCAPS_GDI),
FE(DDCAPS_OVERLAY),
FE(DDCAPS_OVERLAYCANTCLIP),
FE(DDCAPS_OVERLAYFOURCC),
FE(DDCAPS_OVERLAYSTRETCH),
FE(DDCAPS_PALETTE),
FE(DDCAPS_PALETTEVSYNC),
FE(DDCAPS_READSCANLINE),
FE(DDCAPS_STEREOVIEW),
FE(DDCAPS_VBI),
FE(DDCAPS_ZBLTS),
FE(DDCAPS_ZOVERLAYS),
FE(DDCAPS_COLORKEY),
FE(DDCAPS_ALPHA),
FE(DDCAPS_COLORKEYHWASSIST),
FE(DDCAPS_NOHARDWARE),
FE(DDCAPS_BLTCOLORFILL),
FE(DDCAPS_BANKSWITCHED),
FE(DDCAPS_BLTDEPTHFILL),
FE(DDCAPS_CANCLIP),
FE(DDCAPS_CANCLIPSTRETCHED),
FE(DDCAPS_CANBLTSYSMEM)
};
static const flag_info flags2[] =
static const struct flag_info flags2[] =
{
FE(DDCAPS2_CERTIFIED),
FE(DDCAPS2_NO2DDURING3DSCENE),
FE(DDCAPS2_VIDEOPORT),
FE(DDCAPS2_AUTOFLIPOVERLAY),
FE(DDCAPS2_CANBOBINTERLEAVED),
FE(DDCAPS2_CANBOBNONINTERLEAVED),
FE(DDCAPS2_COLORCONTROLOVERLAY),
FE(DDCAPS2_COLORCONTROLPRIMARY),
FE(DDCAPS2_CANDROPZ16BIT),
FE(DDCAPS2_NONLOCALVIDMEM),
FE(DDCAPS2_NONLOCALVIDMEMCAPS),
FE(DDCAPS2_NOPAGELOCKREQUIRED),
FE(DDCAPS2_WIDESURFACES),
FE(DDCAPS2_CANFLIPODDEVEN),
FE(DDCAPS2_CANBOBHARDWARE),
FE(DDCAPS2_COPYFOURCC),
FE(DDCAPS2_PRIMARYGAMMA),
FE(DDCAPS2_CANRENDERWINDOWED),
FE(DDCAPS2_CANCALIBRATEGAMMA),
FE(DDCAPS2_FLIPINTERVAL),
FE(DDCAPS2_FLIPNOVSYNC),
FE(DDCAPS2_CANMANAGETEXTURE),
FE(DDCAPS2_TEXMANINNONLOCALVIDMEM),
FE(DDCAPS2_STEREO),
FE(DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL)
FE(DDCAPS2_CERTIFIED),
FE(DDCAPS2_NO2DDURING3DSCENE),
FE(DDCAPS2_VIDEOPORT),
FE(DDCAPS2_AUTOFLIPOVERLAY),
FE(DDCAPS2_CANBOBINTERLEAVED),
FE(DDCAPS2_CANBOBNONINTERLEAVED),
FE(DDCAPS2_COLORCONTROLOVERLAY),
FE(DDCAPS2_COLORCONTROLPRIMARY),
FE(DDCAPS2_CANDROPZ16BIT),
FE(DDCAPS2_NONLOCALVIDMEM),
FE(DDCAPS2_NONLOCALVIDMEMCAPS),
FE(DDCAPS2_NOPAGELOCKREQUIRED),
FE(DDCAPS2_WIDESURFACES),
FE(DDCAPS2_CANFLIPODDEVEN),
FE(DDCAPS2_CANBOBHARDWARE),
FE(DDCAPS2_COPYFOURCC),
FE(DDCAPS2_PRIMARYGAMMA),
FE(DDCAPS2_CANRENDERWINDOWED),
FE(DDCAPS2_CANCALIBRATEGAMMA),
FE(DDCAPS2_FLIPINTERVAL),
FE(DDCAPS2_FLIPNOVSYNC),
FE(DDCAPS2_CANMANAGETEXTURE),
FE(DDCAPS2_TEXMANINNONLOCALVIDMEM),
FE(DDCAPS2_STEREO),
FE(DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL)
};
static const flag_info flags3[] =
static const struct flag_info flags3[] =
{
FE(DDCKEYCAPS_DESTBLT),
FE(DDCKEYCAPS_DESTBLTCLRSPACE),
FE(DDCKEYCAPS_DESTBLTCLRSPACEYUV),
FE(DDCKEYCAPS_DESTBLTYUV),
FE(DDCKEYCAPS_DESTOVERLAY),
FE(DDCKEYCAPS_DESTOVERLAYCLRSPACE),
FE(DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV),
FE(DDCKEYCAPS_DESTOVERLAYONEACTIVE),
FE(DDCKEYCAPS_DESTOVERLAYYUV),
FE(DDCKEYCAPS_SRCBLT),
FE(DDCKEYCAPS_SRCBLTCLRSPACE),
FE(DDCKEYCAPS_SRCBLTCLRSPACEYUV),
FE(DDCKEYCAPS_SRCBLTYUV),
FE(DDCKEYCAPS_SRCOVERLAY),
FE(DDCKEYCAPS_SRCOVERLAYCLRSPACE),
FE(DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV),
FE(DDCKEYCAPS_SRCOVERLAYONEACTIVE),
FE(DDCKEYCAPS_SRCOVERLAYYUV),
FE(DDCKEYCAPS_NOCOSTOVERLAY)
FE(DDCKEYCAPS_DESTBLT),
FE(DDCKEYCAPS_DESTBLTCLRSPACE),
FE(DDCKEYCAPS_DESTBLTCLRSPACEYUV),
FE(DDCKEYCAPS_DESTBLTYUV),
FE(DDCKEYCAPS_DESTOVERLAY),
FE(DDCKEYCAPS_DESTOVERLAYCLRSPACE),
FE(DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV),
FE(DDCKEYCAPS_DESTOVERLAYONEACTIVE),
FE(DDCKEYCAPS_DESTOVERLAYYUV),
FE(DDCKEYCAPS_SRCBLT),
FE(DDCKEYCAPS_SRCBLTCLRSPACE),
FE(DDCKEYCAPS_SRCBLTCLRSPACEYUV),
FE(DDCKEYCAPS_SRCBLTYUV),
FE(DDCKEYCAPS_SRCOVERLAY),
FE(DDCKEYCAPS_SRCOVERLAYCLRSPACE),
FE(DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV),
FE(DDCKEYCAPS_SRCOVERLAYONEACTIVE),
FE(DDCKEYCAPS_SRCOVERLAYYUV),
FE(DDCKEYCAPS_NOCOSTOVERLAY)
};
static const flag_info flags4[] =
static const struct flag_info flags4[] =
{
FE(DDFXCAPS_BLTALPHA),
FE(DDFXCAPS_OVERLAYALPHA),
FE(DDFXCAPS_BLTARITHSTRETCHYN),
FE(DDFXCAPS_BLTARITHSTRETCHY),
FE(DDFXCAPS_BLTMIRRORLEFTRIGHT),
FE(DDFXCAPS_BLTMIRRORUPDOWN),
FE(DDFXCAPS_BLTROTATION),
FE(DDFXCAPS_BLTROTATION90),
FE(DDFXCAPS_BLTSHRINKX),
FE(DDFXCAPS_BLTSHRINKXN),
FE(DDFXCAPS_BLTSHRINKY),
FE(DDFXCAPS_BLTSHRINKYN),
FE(DDFXCAPS_BLTSTRETCHX),
FE(DDFXCAPS_BLTSTRETCHXN),
FE(DDFXCAPS_BLTSTRETCHY),
FE(DDFXCAPS_BLTSTRETCHYN),
FE(DDFXCAPS_OVERLAYARITHSTRETCHY),
FE(DDFXCAPS_OVERLAYARITHSTRETCHYN),
FE(DDFXCAPS_OVERLAYSHRINKX),
FE(DDFXCAPS_OVERLAYSHRINKXN),
FE(DDFXCAPS_OVERLAYSHRINKY),
FE(DDFXCAPS_OVERLAYSHRINKYN),
FE(DDFXCAPS_OVERLAYSTRETCHX),
FE(DDFXCAPS_OVERLAYSTRETCHXN),
FE(DDFXCAPS_OVERLAYSTRETCHY),
FE(DDFXCAPS_OVERLAYSTRETCHYN),
FE(DDFXCAPS_OVERLAYMIRRORLEFTRIGHT),
FE(DDFXCAPS_OVERLAYMIRRORUPDOWN)
FE(DDFXCAPS_BLTALPHA),
FE(DDFXCAPS_OVERLAYALPHA),
FE(DDFXCAPS_BLTARITHSTRETCHYN),
FE(DDFXCAPS_BLTARITHSTRETCHY),
FE(DDFXCAPS_BLTMIRRORLEFTRIGHT),
FE(DDFXCAPS_BLTMIRRORUPDOWN),
FE(DDFXCAPS_BLTROTATION),
FE(DDFXCAPS_BLTROTATION90),
FE(DDFXCAPS_BLTSHRINKX),
FE(DDFXCAPS_BLTSHRINKXN),
FE(DDFXCAPS_BLTSHRINKY),
FE(DDFXCAPS_BLTSHRINKYN),
FE(DDFXCAPS_BLTSTRETCHX),
FE(DDFXCAPS_BLTSTRETCHXN),
FE(DDFXCAPS_BLTSTRETCHY),
FE(DDFXCAPS_BLTSTRETCHYN),
FE(DDFXCAPS_OVERLAYARITHSTRETCHY),
FE(DDFXCAPS_OVERLAYARITHSTRETCHYN),
FE(DDFXCAPS_OVERLAYSHRINKX),
FE(DDFXCAPS_OVERLAYSHRINKXN),
FE(DDFXCAPS_OVERLAYSHRINKY),
FE(DDFXCAPS_OVERLAYSHRINKYN),
FE(DDFXCAPS_OVERLAYSTRETCHX),
FE(DDFXCAPS_OVERLAYSTRETCHXN),
FE(DDFXCAPS_OVERLAYSTRETCHY),
FE(DDFXCAPS_OVERLAYSTRETCHYN),
FE(DDFXCAPS_OVERLAYMIRRORLEFTRIGHT),
FE(DDFXCAPS_OVERLAYMIRRORUPDOWN)
};
static const flag_info flags5[] =
static const struct flag_info flags5[] =
{
FE(DDFXALPHACAPS_BLTALPHAEDGEBLEND),
FE(DDFXALPHACAPS_BLTALPHAPIXELS),
FE(DDFXALPHACAPS_BLTALPHAPIXELSNEG),
FE(DDFXALPHACAPS_BLTALPHASURFACES),
FE(DDFXALPHACAPS_BLTALPHASURFACESNEG),
FE(DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND),
FE(DDFXALPHACAPS_OVERLAYALPHAPIXELS),
FE(DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG),
FE(DDFXALPHACAPS_OVERLAYALPHASURFACES),
FE(DDFXALPHACAPS_OVERLAYALPHASURFACESNEG)
FE(DDFXALPHACAPS_BLTALPHAEDGEBLEND),
FE(DDFXALPHACAPS_BLTALPHAPIXELS),
FE(DDFXALPHACAPS_BLTALPHAPIXELSNEG),
FE(DDFXALPHACAPS_BLTALPHASURFACES),
FE(DDFXALPHACAPS_BLTALPHASURFACESNEG),
FE(DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND),
FE(DDFXALPHACAPS_OVERLAYALPHAPIXELS),
FE(DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG),
FE(DDFXALPHACAPS_OVERLAYALPHASURFACES),
FE(DDFXALPHACAPS_OVERLAYALPHASURFACESNEG)
};
static const flag_info flags6[] =
static const struct flag_info flags6[] =
{
FE(DDPCAPS_4BIT),
FE(DDPCAPS_8BITENTRIES),
FE(DDPCAPS_8BIT),
FE(DDPCAPS_INITIALIZE),
FE(DDPCAPS_PRIMARYSURFACE),
FE(DDPCAPS_PRIMARYSURFACELEFT),
FE(DDPCAPS_ALLOW256),
FE(DDPCAPS_VSYNC),
FE(DDPCAPS_1BIT),
FE(DDPCAPS_2BIT),
FE(DDPCAPS_ALPHA),
FE(DDPCAPS_4BIT),
FE(DDPCAPS_8BITENTRIES),
FE(DDPCAPS_8BIT),
FE(DDPCAPS_INITIALIZE),
FE(DDPCAPS_PRIMARYSURFACE),
FE(DDPCAPS_PRIMARYSURFACELEFT),
FE(DDPCAPS_ALLOW256),
FE(DDPCAPS_VSYNC),
FE(DDPCAPS_1BIT),
FE(DDPCAPS_2BIT),
FE(DDPCAPS_ALPHA),
};
static const flag_info flags7[] =
static const struct flag_info flags7[] =
{
FE(DDSVCAPS_RESERVED1),
FE(DDSVCAPS_RESERVED2),
FE(DDSVCAPS_RESERVED3),
FE(DDSVCAPS_RESERVED4),
FE(DDSVCAPS_STEREOSEQUENTIAL),
FE(DDSVCAPS_RESERVED1),
FE(DDSVCAPS_RESERVED2),
FE(DDSVCAPS_RESERVED3),
FE(DDSVCAPS_RESERVED4),
FE(DDSVCAPS_STEREOSEQUENTIAL),
};
TRACE(" - dwSize : %d\n", lpcaps->dwSize);
......
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