code/_macros.dm

to_target | General I/O helpers |
---|---|
legacy_chat | Common use |
EMPTY_BITFIELD | Semantic define for a 0 int intended for use as a bitfield |
SHIFTR | Right-shift of INT by BITS |
SHIFTL | Left-shift of INT by BITS |
FLAG | Convenience define for nth-bit flags, 0-indexed |
GET_BIT | Test bit at index BIT is set in FIELD |
HAS_BIT | Test bit at index BIT is set in FIELD; semantic alias of GET_BIT |
SET_BIT | Set bit at index BIT in FIELD |
CLEAR_BIT | Unset bit at index BIT in FIELD |
FLIP_BIT | Flip bit at index BIT in FIELD |
GET_FLAGS | Test any bits of MASK are set in FIELD |
HAS_FLAGS | Test all bits of MASK are set in FIELD |
SET_FLAGS | Set bits of MASK in FIELD |
CLEAR_FLAGS | Unset bits of MASK in FIELD |
FLIP_FLAGS | Flip bits of MASK in FIELD |
Define Details
CLEAR_BIT
Unset bit at index BIT in FIELD
CLEAR_FLAGS
Unset bits of MASK in FIELD
EMPTY_BITFIELD
Semantic define for a 0 int intended for use as a bitfield
FLAG
Convenience define for nth-bit flags, 0-indexed
FLIP_BIT
Flip bit at index BIT in FIELD
FLIP_FLAGS
Flip bits of MASK in FIELD
GET_BIT
Test bit at index BIT is set in FIELD
GET_FLAGS
Test any bits of MASK are set in FIELD
HAS_BIT
Test bit at index BIT is set in FIELD; semantic alias of GET_BIT
HAS_FLAGS
Test all bits of MASK are set in FIELD
SET_BIT
Set bit at index BIT in FIELD
SET_FLAGS
Set bits of MASK in FIELD
SHIFTL
Left-shift of INT by BITS
SHIFTR
Right-shift of INT by BITS
legacy_chat
Common use
to_target
General I/O helpers