[FL-2083] Bring Passport back (#868)
* [FL-2083] Bring Passport back * Move Passport to Settings * Hide icounter editing Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -102,6 +102,18 @@ uint8_t dolphin_get_level(uint32_t icounter) {
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t dolphin_state_xp_above_last_levelup(uint32_t icounter) {
|
||||
uint32_t threshold = 0;
|
||||
if(icounter <= LEVEL2_THRESHOLD) {
|
||||
threshold = 0;
|
||||
} else if(icounter <= LEVEL3_THRESHOLD) {
|
||||
threshold = LEVEL2_THRESHOLD + 1;
|
||||
} else {
|
||||
threshold = LEVEL3_THRESHOLD + 1;
|
||||
}
|
||||
return icounter - threshold;
|
||||
}
|
||||
|
||||
uint32_t dolphin_state_xp_to_levelup(uint32_t icounter) {
|
||||
uint32_t threshold = 0;
|
||||
if(icounter <= LEVEL2_THRESHOLD) {
|
||||
|
@@ -42,6 +42,8 @@ void dolphin_state_butthurted(DolphinState* dolphin_state);
|
||||
|
||||
uint32_t dolphin_state_xp_to_levelup(uint32_t icounter);
|
||||
|
||||
uint32_t dolphin_state_xp_above_last_levelup(uint32_t icounter);
|
||||
|
||||
bool dolphin_state_is_levelup(uint32_t icounter);
|
||||
|
||||
void dolphin_state_increase_level(DolphinState* dolphin_state);
|
||||
|
Reference in New Issue
Block a user