The goal is to change any initializations of the flags
value from a 32-bit write to a 16-bit write; this frees
up the upper 16 bits for our use. When setting/clearing
flags in lower bit positions, the game won't delete whatever
we've stored in the upper 16 bits.