68 |
// not stored in ~/.enigmarc : |
// not stored in ~/.enigmarc : |
69 |
|
|
70 |
bool LevelStatusChanged = false; |
bool LevelStatusChanged = false; |
71 |
|
bool MustRestart = false; |
72 |
} |
} |
73 |
|
|
74 |
namespace |
namespace |
76 |
px::Dict<LevelStatus> level_status_dict; |
px::Dict<LevelStatus> level_status_dict; |
77 |
} |
} |
78 |
|
|
79 |
|
|
80 |
|
LevelStatus::LevelStatus(int easy=-1, int hard=-1, int fin=0, time_t solv = 0) |
81 |
|
: par_easy(easy), |
82 |
|
par_hard(hard), |
83 |
|
finished(fin), |
84 |
|
solved_at(solv) |
85 |
|
{ |
86 |
|
if (!solved_at && fin>0) |
87 |
|
solved_at = time(0); // default to now |
88 |
|
} |
89 |
|
|
90 |
|
bool LevelStatus::operator != (const LevelStatus& other) const |
91 |
|
{ |
92 |
|
return !(par_easy == other.par_easy && |
93 |
|
par_hard == other.par_hard && |
94 |
|
finished == other.finished && |
95 |
|
solved_at == other.solved_at); |
96 |
|
} |
97 |
|
|
98 |
|
|
99 |
static string |
static string |
100 |
levelkey(const string &/*levelpack*/, const string &levelname) |
levelkey(const string &/*levelpack*/, const string &levelname) |
101 |
{ |
{ |