mirror of
https://github.com/zeldaret/ss
synced 2026-05-24 15:20:58 -04:00
27 lines
706 B
C++
27 lines
706 B
C++
#ifndef UNK_FLAG_STUFF_H
|
|
#define UNK_FLAG_STUFF_H
|
|
|
|
#include <common.h>
|
|
|
|
struct UnkFlagDefinition {
|
|
u8 mIndex;
|
|
u8 mShiftMask;
|
|
};
|
|
|
|
class UnkFlagStuff {
|
|
u16 mDefinitionsCount;
|
|
UnkFlagDefinition *mpDefinitions;
|
|
|
|
public:
|
|
u16 calculateMask(s32 shift);
|
|
void doNothing(u32 unused);
|
|
UnkFlagStuff(u16 count, UnkFlagDefinition *definitions);
|
|
void prepareIndexShiftMask(u16 counterIdx, u32 flagCount, u16 *pIndex, u8 *pShift, u16 *pMask);
|
|
u16 maskForIdx(u16 index);
|
|
u32 getCounterOrFlag(u16 counterIdx, u16 *pData, u32 flagCount);
|
|
void setCounterOrFlag(u16 counterIdx, u16 *pData, u32 flagCount, u32 value);
|
|
u32 checkFlagValid(u16 counterIdx, u32 flagCount);
|
|
};
|
|
|
|
#endif
|