Adonthell
0.4
|
Data for a single achievement. More...
#include <achievements.h>
Public Member Functions | |
achievement_data (const u_int8 &id, const u_int32 &expected) | |
Create a new achievement with the given id and the bitmask that will eventually unlock it. More... | |
u_int8 | id () const |
Get the unique id of the achievement. More... | |
bool | update (const u_int8 &bit) |
Set the nth bit of the given achievement to 1. More... | |
bool | is_unlocked () const |
Check whether the achievement is permanently unlocked. More... | |
Friends | |
class | achievements |
Data for a single achievement.
This contains of a unique id, the state that will unlock the achievement, whether the achievement has already been unlocked and the state of the achievement in the current game.
Definition at line 43 of file achievements.h.
Create a new achievement with the given id and the bitmask that will eventually unlock it.
id | the unique achievement id |
expected | the value that will unlock the achievement |
Definition at line 277 of file achievements.cc.
|
inline |
Get the unique id of the achievement.
Definition at line 60 of file achievements.h.
bool achievement_data::update | ( | const u_int8 & | bit | ) |
Set the nth bit of the given achievement to 1.
bit | the index of the bit to set to 1 |
Definition at line 286 of file achievements.cc.
|
inline |
Check whether the achievement is permanently unlocked.
Definition at line 74 of file achievements.h.