mirror of
https://github.com/zeldaret/ss
synced 2026-05-31 17:32:02 -04:00
12 lines
431 B
C++
12 lines
431 B
C++
#include "types.h"
|
|
#include "toBeSorted/bitwise_flag_helper.h"
|
|
|
|
bool BitwiseFlagHelper::checkFlag(u16 slot, u16 shift, const u16 *pData, u16 flagCount) {
|
|
return (pData[slot] >> shift) & 1;
|
|
}
|
|
void BitwiseFlagHelper::setFlag(u16 slot, u16 shift, u16 *pData, u16 flagCount) {
|
|
pData[slot] |= (1 << shift);
|
|
}
|
|
void BitwiseFlagHelper::unsetFlag(u16 slot, u16 shift, u16 *pData, u16 flagCount) {
|
|
pData[slot] &= ~(1 << shift);
|
|
} |