mirror of
https://github.com/zeldaret/ss
synced 2026-09-09 11:44:32 -04:00
Minor Fixups and SetVisible Fixed
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#ifndef NW4R_LYT_TYPES_H
|
||||
#define NW4R_LYT_TYPES_H
|
||||
|
||||
#include "nw4r/math.h" // IWYU pragma: export
|
||||
#include "nw4r/ut/ut_LinkList.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/math.h" // IWYU pragma: export
|
||||
|
||||
#include "rvl/GX.h" // IWYU pragma: export
|
||||
|
||||
namespace nw4r {
|
||||
@@ -31,8 +33,10 @@ inline bool TestBit(T bits, int index) {
|
||||
}
|
||||
template <typename T>
|
||||
inline void SetBit(T *bits, int pos, bool val) {
|
||||
T mask = ~T(1 << pos);
|
||||
*bits = T((*bits & mask)) | (val << pos);
|
||||
T mask = 1 << pos;
|
||||
|
||||
*bits &= ~mask;
|
||||
*bits |= val ? mask : 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user