Expand description
oot_bitset – “Ocarina-style” compact bit-flags, ported from C
Each flag is a 16-bit ID where • upper 12 bits → word index • lower 4 bits → bit index inside that word
The slice you pass in must be an array of u16 words large enough
to hold the highest word index you will touch.
Functions§
- bitset_
clear - Clear (disable) a flag.
- bitset_
get - Test whether a given flag is set.
- bitset_
index - Extract the
wordpart of an encoded flag (upper 12 bits). - bitset_
mask - Convert an encoded flag to a one-bit mask (lower 4 bits → 0–15).
- bitset_
set - Set (enable) a flag.
- bitset_
word_ mut - Borrow the underlying 16-bit word for direct fiddling, mirroring the C macro.