Fix bitflags enum emeraldflags_t for C++

This commit is contained in:
Eidolon 2026-03-15 15:28:24 -05:00
parent 0cd45e5982
commit f97c3a7340

View file

@ -746,28 +746,26 @@ extern UINT32 lastcustomtol;
extern UINT8 stagefailed; extern UINT8 stagefailed;
// Emeralds stored as bits to throw savegame hackers off. // Emeralds stored as bits to throw savegame hackers off.
typedef enum typedef INT32 emeraldflags_t;
{ #define EMERALD_CHAOS1 (1)
EMERALD_CHAOS1 = 1, #define EMERALD_CHAOS2 (1<<1)
EMERALD_CHAOS2 = 1<<1, #define EMERALD_CHAOS3 (1<<2)
EMERALD_CHAOS3 = 1<<2, #define EMERALD_CHAOS4 (1<<3)
EMERALD_CHAOS4 = 1<<3, #define EMERALD_CHAOS5 (1<<4)
EMERALD_CHAOS5 = 1<<4, #define EMERALD_CHAOS6 (1<<5)
EMERALD_CHAOS6 = 1<<5, #define EMERALD_CHAOS7 (1<<6)
EMERALD_CHAOS7 = 1<<6, #define EMERALD_ALLCHAOS ((EMERALD_CHAOS1)|(EMERALD_CHAOS2)|(EMERALD_CHAOS3)|(EMERALD_CHAOS4)|(EMERALD_CHAOS5)|(EMERALD_CHAOS6)|(EMERALD_CHAOS7))
EMERALD_ALLCHAOS = EMERALD_CHAOS1|EMERALD_CHAOS2|EMERALD_CHAOS3|EMERALD_CHAOS4|EMERALD_CHAOS5|EMERALD_CHAOS6|EMERALD_CHAOS7,
EMERALD_SUPER1 = 1<<7, #define EMERALD_SUPER1 (1<<7)
EMERALD_SUPER2 = 1<<8, #define EMERALD_SUPER2 (1<<8)
EMERALD_SUPER3 = 1<<9, #define EMERALD_SUPER3 (1<<9)
EMERALD_SUPER4 = 1<<10, #define EMERALD_SUPER4 (1<<10)
EMERALD_SUPER5 = 1<<11, #define EMERALD_SUPER5 (1<<11)
EMERALD_SUPER6 = 1<<12, #define EMERALD_SUPER6 (1<<12)
EMERALD_SUPER7 = 1<<13, #define EMERALD_SUPER7 (1<<13)
EMERALD_ALLSUPER = EMERALD_SUPER1|EMERALD_SUPER2|EMERALD_SUPER3|EMERALD_SUPER4|EMERALD_SUPER5|EMERALD_SUPER6|EMERALD_SUPER7, #define EMERALD_ALLSUPER ((EMERALD_SUPER1)|(EMERALD_SUPER2)|(EMERALD_SUPER3)|(EMERALD_SUPER4)|(EMERALD_SUPER5)|(EMERALD_SUPER6)|(EMERALD_SUPER7))
EMERALD_ALL = EMERALD_ALLCHAOS|EMERALD_ALLSUPER #define EMERALD_ALL ((EMERALD_ALLCHAOS)|(EMERALD_ALLSUPER))
} emeraldflags_t;
#define ALLCHAOSEMERALDS(v) ((v & EMERALD_ALLCHAOS) == EMERALD_ALLCHAOS) #define ALLCHAOSEMERALDS(v) ((v & EMERALD_ALLCHAOS) == EMERALD_ALLCHAOS)
#define ALLSUPEREMERALDS(v) ((v & EMERALD_ALLSUPER) == EMERALD_ALLSUPER) #define ALLSUPEREMERALDS(v) ((v & EMERALD_ALLSUPER) == EMERALD_ALLSUPER)