diff options
author | german77 <juangerman-13@hotmail.com> | 2023-09-11 08:58:46 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-09-11 08:58:46 +0200 |
commit | bd169f417f471f574784fa3b499f57ad42cf1013 (patch) | |
tree | 5671f7c85a1f69d2dad2eb895878c0981d205ad7 /src/core/hle/service/mii/mii_manager.h | |
parent | service: mii: Fix ver3 inconsistencies (diff) | |
download | yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.tar yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.tar.gz yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.tar.bz2 yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.tar.lz yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.tar.xz yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.tar.zst yuzu-bd169f417f471f574784fa3b499f57ad42cf1013.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/mii/mii_manager.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/core/hle/service/mii/mii_manager.h b/src/core/hle/service/mii/mii_manager.h index 6098474e9..4f8be06c3 100644 --- a/src/core/hle/service/mii/mii_manager.h +++ b/src/core/hle/service/mii/mii_manager.h @@ -19,16 +19,24 @@ class MiiManager { public: MiiManager(); - bool CheckAndResetUpdateCounter(SourceFlag source_flag, u64& current_update_counter); + bool IsUpdated(DatabaseSessionMetadata& metadata, SourceFlag source_flag) const; + bool IsFullDatabase() const; - u32 GetCount(SourceFlag source_flag) const; - Result UpdateLatest(CharInfo* out_info, const CharInfo& info, SourceFlag source_flag); - CharInfo BuildRandom(Age age, Gender gender, Race race); - CharInfo BuildBase(Gender gender); - CharInfo BuildDefault(std::size_t index); - CharInfo ConvertV3ToCharInfo(const Ver3StoreData& mii_v3) const; + u32 GetCount(const DatabaseSessionMetadata& metadata, SourceFlag source_flag) const; + Result UpdateLatest(DatabaseSessionMetadata& metadata, CharInfo& out_char_info, + const CharInfo& char_info, SourceFlag source_flag); + Result Get(const DatabaseSessionMetadata& metadata, std::span<CharInfoElement> out_elements, + u32& out_count, SourceFlag source_flag); + Result Get(const DatabaseSessionMetadata& metadata, std::span<CharInfo> out_char_info, + u32& out_count, SourceFlag source_flag); + void BuildDefault(CharInfo& out_char_info, u32 index) const; + void BuildBase(CharInfo& out_char_info, Gender gender) const; + void BuildRandom(CharInfo& out_char_info, Age age, Gender gender, Race race) const; + void ConvertV3ToCharInfo(CharInfo& out_char_info, const Ver3StoreData& mii_v3) const; std::vector<CharInfoElement> GetDefault(SourceFlag source_flag); - Result GetIndex(const CharInfo& info, u32& index); + Result GetIndex(const DatabaseSessionMetadata& metadata, const CharInfo& char_info, + s32& out_index); + void SetInterfaceVersion(DatabaseSessionMetadata& metadata, u32 version); struct MiiDatabase { u32 magic{}; // 'NFDB' @@ -40,7 +48,10 @@ public: static_assert(sizeof(MiiDatabase) == 0x1A98, "MiiDatabase has incorrect size."); private: - const Common::UUID user_id{}; + Result BuildDefault(std::span<CharInfoElement> out_elements, u32& out_count, + SourceFlag source_flag); + Result BuildDefault(std::span<CharInfo> out_char_info, u32& out_count, SourceFlag source_flag); + u64 update_counter{}; }; |