diff options
author | german77 <juangerman-13@hotmail.com> | 2023-09-11 08:23:46 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-09-11 08:23:46 +0200 |
commit | 571399930cc3578acff064a7087fe85e7b2dd9b7 (patch) | |
tree | aa02d3b9932d758d1febb3e7bbd6cf50a9ee6f31 /src/core/hle/service/mii/types/ver3_store_data.h | |
parent | service: mii: move char info operations (diff) | |
download | yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.gz yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.bz2 yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.lz yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.xz yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.zst yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/mii/types/ver3_store_data.h | 80 |
1 files changed, 46 insertions, 34 deletions
diff --git a/src/core/hle/service/mii/types/ver3_store_data.h b/src/core/hle/service/mii/types/ver3_store_data.h index 6b4e1eb9c..11caeb5c3 100644 --- a/src/core/hle/service/mii/types/ver3_store_data.h +++ b/src/core/hle/service/mii/types/ver3_store_data.h @@ -6,20 +6,32 @@ #include "core/hle/service/mii/mii_types.h" namespace Service::Mii { -class CharInfo; +class StoreData; // This is nn::mii::Ver3StoreData // Based on citra HLE::Applets::MiiData and PretendoNetwork. // https://github.com/citra-emu/citra/blob/master/src/core/hle/applets/mii_selector.h#L48 // https://github.com/PretendoNetwork/mii-js/blob/master/mii.js#L299 +struct NfpStoreDataExtension { + void SetFromStoreData(const StoreData& store_data); + + u8 faceline_color; + u8 hair_color; + u8 eye_color; + u8 eyebrow_color; + u8 mouth_color; + u8 beard_color; + u8 glass_color; + u8 glass_type; +}; +static_assert(sizeof(NfpStoreDataExtension) == 0x8, "NfpStoreDataExtension is an invalid size"); + #pragma pack(push, 4) class Ver3StoreData { public: - // TODO: This function is wrong. It should use StoreData. - void BuildToStoreData(CharInfo& out_char_info) const; - // TODO: This function is wrong. It should use StoreData. - void BuildFromStoreData(const CharInfo& char_info); + void BuildToStoreData(StoreData& out_store_data) const; + void BuildFromStoreData(const StoreData& store_data); u32 IsValid() const; @@ -30,7 +42,7 @@ public: BitField<0, 1, u8> allow_copying; BitField<1, 1, u8> profanity_flag; BitField<2, 2, u8> region_lock; - BitField<4, 2, u8> character_set; + BitField<4, 2, u8> font_region; } region_information; u16_be mii_id; u64_be system_id; @@ -53,21 +65,21 @@ public: u8 raw; BitField<0, 1, u8> disable_sharing; - BitField<1, 4, u8> face_shape; - BitField<5, 3, u8> skin_color; + BitField<1, 4, u8> faceline_type; + BitField<5, 3, u8> faceline_color; } appearance_bits1; union { u8 raw; - BitField<0, 4, u8> wrinkles; - BitField<4, 4, u8> makeup; + BitField<0, 4, u8> faceline_wrinkle; + BitField<4, 4, u8> faceline_make; } appearance_bits2; - u8 hair_style; + u8 hair_type; union { u8 raw; BitField<0, 3, u8> hair_color; - BitField<3, 1, u8> flip_hair; + BitField<3, 1, u8> hair_flip; } appearance_bits3; union { u32 raw; @@ -75,28 +87,28 @@ public: BitField<0, 6, u32> eye_type; BitField<6, 3, u32> eye_color; BitField<9, 4, u32> eye_scale; - BitField<13, 3, u32> eye_vertical_stretch; - BitField<16, 5, u32> eye_rotation; - BitField<21, 4, u32> eye_spacing; - BitField<25, 5, u32> eye_y_position; + BitField<13, 3, u32> eye_aspect; + BitField<16, 5, u32> eye_rotate; + BitField<21, 4, u32> eye_x; + BitField<25, 5, u32> eye_y; } appearance_bits4; union { u32 raw; - BitField<0, 5, u32> eyebrow_style; + BitField<0, 5, u32> eyebrow_type; BitField<5, 3, u32> eyebrow_color; BitField<8, 4, u32> eyebrow_scale; - BitField<12, 3, u32> eyebrow_yscale; - BitField<16, 4, u32> eyebrow_rotation; - BitField<21, 4, u32> eyebrow_spacing; - BitField<25, 5, u32> eyebrow_y_position; + BitField<12, 3, u32> eyebrow_aspect; + BitField<16, 4, u32> eyebrow_rotate; + BitField<21, 4, u32> eyebrow_x; + BitField<25, 5, u32> eyebrow_y; } appearance_bits5; union { u16 raw; BitField<0, 5, u16> nose_type; BitField<5, 4, u16> nose_scale; - BitField<9, 5, u16> nose_y_position; + BitField<9, 5, u16> nose_y; } appearance_bits6; union { u16 raw; @@ -104,38 +116,38 @@ public: BitField<0, 6, u16> mouth_type; BitField<6, 3, u16> mouth_color; BitField<9, 4, u16> mouth_scale; - BitField<13, 3, u16> mouth_horizontal_stretch; + BitField<13, 3, u16> mouth_aspect; } appearance_bits7; union { u8 raw; - BitField<0, 5, u8> mouth_y_position; + BitField<0, 5, u8> mouth_y; BitField<5, 3, u8> mustache_type; } appearance_bits8; u8 allow_copying; union { u16 raw; - BitField<0, 3, u16> bear_type; - BitField<3, 3, u16> facial_hair_color; + BitField<0, 3, u16> beard_type; + BitField<3, 3, u16> beard_color; BitField<6, 4, u16> mustache_scale; - BitField<10, 5, u16> mustache_y_position; + BitField<10, 5, u16> mustache_y; } appearance_bits9; union { u16 raw; - BitField<0, 4, u16> glasses_type; - BitField<4, 3, u16> glasses_color; - BitField<7, 4, u16> glasses_scale; - BitField<11, 5, u16> glasses_y_position; + BitField<0, 4, u16> glass_type; + BitField<4, 3, u16> glass_color; + BitField<7, 4, u16> glass_scale; + BitField<11, 5, u16> glass_y; } appearance_bits10; union { u16 raw; - BitField<0, 1, u16> mole_enabled; + BitField<0, 1, u16> mole_type; BitField<1, 4, u16> mole_scale; - BitField<5, 5, u16> mole_x_position; - BitField<10, 5, u16> mole_y_position; + BitField<5, 5, u16> mole_x; + BitField<10, 5, u16> mole_y; } appearance_bits11; std::array<u16_le, 0xA> author_name; |