138 |
assert(difficulty==enigma::DIFFICULTY_EASY || difficulty==enigma::DIFFICULTY_HARD); |
assert(difficulty==enigma::DIFFICULTY_EASY || difficulty==enigma::DIFFICULTY_HARD); |
139 |
|
|
140 |
if (LevelStatus *stat = GetLevelStatus(pack, level)) { |
if (LevelStatus *stat = GetLevelStatus(pack, level)) { |
141 |
if ((stat->finished & difficulty) == 0) { |
stat->finished |= difficulty; |
142 |
stat->finished |= difficulty; |
stat->solved_at = time(0); |
|
LevelStatusChanged = true; |
|
|
} |
|
143 |
} |
} |
144 |
else { |
else { |
145 |
SetLevelStatus(pack, level, LevelStatus(-1, -1, difficulty)); |
SetLevelStatus(pack, level, LevelStatus(-1, -1, difficulty)); |
|
LevelStatusChanged = true; |
|
146 |
} |
} |
147 |
|
|
148 |
|
LevelStatusChanged = true; |
149 |
} |
} |
150 |
|
|
151 |
/* Determine name of the user's personal configuration file. */ |
/* Determine name of the user's personal configuration file. */ |