mirror of
https://github.com/zeldaret/ss
synced 2026-06-23 00:49:51 -04:00
14 lines
434 B
C++
14 lines
434 B
C++
#include "toBeSorted/bitwise_flag_helper.h"
|
|
#include <common.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);
|
|
}
|