repo.or.cz
/
k8-jellyphysics.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
cosmetix
[k8-jellyphysics.git]
/
src
/
jelly
/
Bitmask.h
blob
a3ed656aa8dfd8123582f4f2e5805b90dfaa138c
1
#ifndef _BITMASK_H
2
#define _BITMASK_H
3
4
5
namespace
JellyPhysics
{
6
7
struct
Bitmask
{
8
int
mask
;
9
10
void
clear
() {
mask
=
0x00
; }
11
void
setOn
(
int
bit
) {
mask
|= (
0x01
<<
bit
); }
12
void
setOff
(
int
bit
) {
mask
&= ~(
0x01
<<
bit
); }
13
bool
getBit
(
int
bit
)
const
{
return
((
mask
&(
0x01
<<
bit
)) !=
0
); }
14
};
15
16
}
17
18
19
#endif