Closed Arose-Niazi closed 7 years ago
Because the first value of an enumerator is 0 (0 is basically no flag, as bits are bitwise, and 0 means that there's no flag set), so for it to work you would need to do, at least:
enum
{
ANIMATIONS = 1
}
If you plan to add more flags in the future in that enumerator, it is recommended to do
enum ( <<= 1 )
{
ANIMATIONS = 1,
FLAG_2,
FLAG_3,
}
So the first flag (ANIMATIONS) will have the value 0b1, the next will be 0b10, then the next will be 0b100.
Thanks for the info and help :)
It's fixed now.
I tried setting a flag ANIMATIONS and it won't work, the enum for it is
enum { ANIMATIONS }