You can make a own define:
#define is_2(obj,flag) (obj.flags2 & (flag)) // Abfrage von flags2

then you can test the flag:
if is_2(Yourflag2,VISIBLE)