SW: Deal with how C++ does not implicitly convert enums to or from ints

Typedef Voc3D_Flags and Voc_Flags to int, and turn typedef'd enums into normal enums.

Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@7504 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-04-08 06:26:03 +00:00 committed by Christoph Oelckers
parent f3a223914f
commit 38e55f1a8b
3 changed files with 11 additions and 8 deletions

View file

@ -221,14 +221,15 @@ typedef enum
btn_max
} BTNType;
typedef enum
enum
{
mf_normal = BIT(0),
mf_pushed = BIT(1),
mf_selected = BIT(2),
mf_disabled = BIT(3),
mf_separated = BIT(4)
} MenuFlags;
};
typedef int MenuFlags;
#define MenuSelectFlags (mf_pushed | mf_selected | mf_disabled)
#define MenuDrawFlags (ROTATE_SPRITE_SCREEN_CLIP)
@ -327,7 +328,7 @@ SWBOOL MNU_LoadClassicDefaults(void);
#define DefLayer(key,text,child) mt_layer,mf_normal,sldr_none,btn_none,key,text,child
#define DefDisabled(key,text,child) mt_layer,mf_disabled,sldr_none,btn_none,key,text,child
#define DefNone mt_none,0,0,0,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL
#define DefNone mt_none,(MenuFlags)0,(SLDRType)0,(BTNType)0,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL
#define OPT_XS 30
#define OPT_YS 30