mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-02-05 11:28:32 -06:00
* Fix DLC info message always being displayed * Use uint32_t for version numbers * Make AchievementManager follow the same naming convention as PersistentStorageManager * persistent_data: remove header size field * Make status success by default or on file not existing
35 lines
757 B
C++
35 lines
757 B
C++
#pragma once
|
|
|
|
#include <user/achievement_data.h>
|
|
|
|
enum class EAchBinStatus
|
|
{
|
|
Success,
|
|
IOError,
|
|
BadFileSize,
|
|
BadSignature,
|
|
BadVersion,
|
|
BadChecksum
|
|
};
|
|
|
|
class AchievementManager
|
|
{
|
|
public:
|
|
static inline AchievementData Data{};
|
|
static inline EAchBinStatus BinStatus{ EAchBinStatus::Success };
|
|
|
|
static std::filesystem::path GetDataPath(bool checkForMods)
|
|
{
|
|
return GetSavePath(checkForMods) / ACH_FILENAME;
|
|
}
|
|
|
|
static time_t GetTimestamp(uint16_t id);
|
|
static size_t GetTotalRecords();
|
|
static bool IsUnlocked(uint16_t id);
|
|
static void Unlock(uint16_t id);
|
|
static void UnlockAll();
|
|
static void Reset();
|
|
static bool LoadBinary();
|
|
static bool SaveBinary(bool ignoreStatus = false);
|
|
};
|