NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
lyt_types.hpp
1
// https://raw.githubusercontent.com/doldecomp/ogws/d5505bee60a51db06eab3800421bdb1237c45e92/include/nw4r/lyt/lyt_types.h
2
3
#pragma once
4
5
namespace
nw4r {
6
namespace
lyt
{
7
namespace
detail {
8
9
/******************************************************************************
10
*
11
* Bit operations
12
*
13
******************************************************************************/
14
template
<
typename
T>
inline
void
SetBit(T* pBits,
int
pos,
bool
value) {
15
T mask = ~(1 << pos);
16
*pBits &= mask;
17
*pBits |= (value ? 1 : 0) << pos;
18
}
19
template
<
typename
T>
inline
bool
TestBit(T bits,
int
pos) {
20
T mask = 1 << pos;
21
return
(bits & mask) != 0;
22
}
23
template
<
typename
T>
inline
T GetBits(T bits,
int
pos,
int
len) {
24
T mask = ~(
static_cast<
T
>
(-1) << len);
25
return
bits >> pos & mask;
26
}
27
28
}
// namespace detail
29
}
// namespace lyt
30
}
// namespace nw4r
nw4r::lyt
2D graphics drawing library.
Definition
_dummy_classes.hpp:9
include
lib
nw4r
lyt
lyt_types.hpp
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2