Porytiles
Loading...
Searching...
No Matches
color_set.cpp
Go to the documentation of this file.
2
3namespace porytiles2 {
4
5bool ColorSet::test(ColorIndex index) const
6{
7 return colors_.test(index.index());
8}
9
10void ColorSet::set(ColorIndex index, bool value)
11{
12 colors_.set(index.index(), value);
13}
14
16{
17 colors_.reset(index.index());
18}
19
20} // namespace porytiles2
Represents a color index value for palette operations.
unsigned int index() const
Returns the underlying unsigned integer index value.
bool test(ColorIndex index) const
Tests whether a bit at the given index is set.
Definition color_set.cpp:5
void reset(ColorIndex index)
Resets a bit at the given index to false.
Definition color_set.cpp:15
void set(ColorIndex index, bool value=true)
Sets a bit at the given index.
Definition color_set.cpp:10