flipperzero-firmware/applications/dolphin/dolphin_state.h
あく aa24484b99
[FL-977] Internal Storage (#455)
* Add littlefs submodule
* Furi: add mutex in logging, fix issues with corrupted printf
* ApiHal: disable debug traces in ble glue
* App-loader: more logs
* Passport: fix invalid DolphinState usage
* ApiHal, linker script: flash API is now aware of free space, complete abstraction layer for storage
* Internal Storage: littlefs based storage services with key value API. Migrate dolphin state to new storage API.
2021-05-11 11:29:44 +03:00

27 lines
756 B
C

#pragma once
#include "dolphin_deed.h"
#include <stdbool.h>
#include <stdint.h>
typedef struct DolphinState DolphinState;
DolphinState* dolphin_state_alloc();
void dolphin_state_free(DolphinState* dolphin_state);
bool dolphin_state_save(DolphinState* dolphin_state);
bool dolphin_state_load(DolphinState* dolphin_state);
void dolphin_state_clear(DolphinState* dolphin_state);
void dolphin_state_on_deed(DolphinState* dolphin_state, DolphinDeed deed);
uint32_t dolphin_state_get_icounter(DolphinState* dolphin_state);
uint32_t dolphin_state_get_butthurt(DolphinState* dolphin_state);
uint32_t dolphin_state_get_level(DolphinState* dolphin_state);
uint32_t dolphin_state_xp_to_levelup(DolphinState* dolphin_state, uint32_t level, bool remaining);