From 63b239f5c6610bb1d3a31affce413951dd805e58 Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 10 Sep 2023 21:19:31 -0600 Subject: [PATCH] service: mii: Move all raw data to it's file --- src/core/hle/service/mii/mii_manager.cpp | 179 +++----- src/core/hle/service/mii/mii_util.h | 2 +- src/core/hle/service/mii/raw_data.cpp | 545 ++++++++++++++--------- src/core/hle/service/mii/raw_data.h | 70 ++- src/core/hle/service/mii/types.h | 62 +-- 5 files changed, 478 insertions(+), 380 deletions(-) diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index 392aa78da..de70c3da6 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp @@ -11,6 +11,7 @@ #include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/mii/mii_manager.h" #include "core/hle/service/mii/mii_result.h" +#include "core/hle/service/mii/mii_util.h" #include "core/hle/service/mii/raw_data.h" namespace Service::Mii { @@ -19,19 +20,7 @@ namespace { constexpr std::size_t DefaultMiiCount{RawData::DefaultMii.size()}; -constexpr MiiStoreData::Name DefaultMiiName{u'n', u'o', u' ', u'n', u'a', u'm', u'e'}; -constexpr std::array HairColorLookup{8, 1, 2, 3, 4, 5, 6, 7}; -constexpr std::array EyeColorLookup{8, 9, 10, 11, 12, 13}; -constexpr std::array MouthColorLookup{19, 20, 21, 22, 23}; -constexpr std::array GlassesColorLookup{8, 14, 15, 16, 17, 18, 0}; -constexpr std::array EyeRotateLookup{ - {0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04, - 0x04, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04, - 0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04}}; -constexpr std::array EyebrowRotateLookup{{0x06, 0x06, 0x05, 0x07, 0x06, 0x07, 0x06, 0x07, - 0x04, 0x07, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, - 0x07, 0x07, 0x06, 0x06, 0x05, 0x06, 0x07, 0x05}}; +constexpr Nickname DefaultMiiName{u'n', u'o', u' ', u'n', u'a', u'm', u'e'}; template std::array ResizeArray(const std::array& in) { @@ -100,42 +89,15 @@ CharInfo ConvertStoreDataToInfo(const MiiStoreData& data) { }; } -u16 GenerateCrc16(const void* data, std::size_t size) { - s32 crc{}; - for (std::size_t i = 0; i < size; i++) { - crc ^= static_cast(data)[i] << 8; - for (std::size_t j = 0; j < 8; j++) { - crc <<= 1; - if ((crc & 0x10000) != 0) { - crc = (crc ^ 0x1021) & 0xFFFF; - } - } - } - return Common::swap16(static_cast(crc)); -} - -template -T GetRandomValue(T min, T max) { - std::random_device device; - std::mt19937 gen(device()); - std::uniform_int_distribution distribution(static_cast(min), static_cast(max)); - return static_cast(distribution(gen)); -} - -template -T GetRandomValue(T max) { - return GetRandomValue({}, max); -} - MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Common::UUID& user_id) { MiiStoreBitFields bf{}; if (gender == Gender::All) { - gender = GetRandomValue(Gender::Maximum); + gender = MiiUtil::GetRandomValue(Gender::Maximum); } bf.gender.Assign(gender); - bf.favorite_color.Assign(GetRandomValue(11)); + bf.favorite_color.Assign(MiiUtil::GetRandomValue(11)); bf.region_move.Assign(0); bf.font_region.Assign(FontRegion::Standard); bf.type.Assign(0); @@ -143,7 +105,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo bf.build.Assign(64); if (age == Age::All) { - const auto temp{GetRandomValue(10)}; + const auto temp{MiiUtil::GetRandomValue(10)}; if (temp >= 8) { age = Age::Old; } else if (temp >= 4) { @@ -154,7 +116,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo } if (race == Race::All) { - const auto temp{GetRandomValue(10)}; + const auto temp{MiiUtil::GetRandomValue(10)}; if (temp >= 8) { race = Race::Black; } else if (temp >= 4) { @@ -166,56 +128,57 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo u32 axis_y{}; if (gender == Gender::Female && age == Age::Young) { - axis_y = GetRandomValue(3); + axis_y = MiiUtil::GetRandomValue(3); } const std::size_t index{3 * static_cast(age) + 9 * static_cast(gender) + static_cast(race)}; - const auto faceline_type_info{RawData::RandomMiiFaceline.at(index)}; - const auto faceline_color_info{RawData::RandomMiiFacelineColor.at( + const auto& faceline_type_info{RawData::RandomMiiFaceline.at(index)}; + const auto& faceline_color_info{RawData::RandomMiiFacelineColor.at( 3 * static_cast(gender) + static_cast(race))}; - const auto faceline_wrinkle_info{RawData::RandomMiiFacelineWrinkle.at(index)}; - const auto faceline_makeup_info{RawData::RandomMiiFacelineMakeup.at(index)}; - const auto hair_type_info{RawData::RandomMiiHairType.at(index)}; - const auto hair_color_info{RawData::RandomMiiHairColor.at(3 * static_cast(race) + - static_cast(age))}; - const auto eye_type_info{RawData::RandomMiiEyeType.at(index)}; - const auto eye_color_info{RawData::RandomMiiEyeColor.at(static_cast(race))}; - const auto eyebrow_type_info{RawData::RandomMiiEyebrowType.at(index)}; - const auto nose_type_info{RawData::RandomMiiNoseType.at(index)}; - const auto mouth_type_info{RawData::RandomMiiMouthType.at(index)}; - const auto glasses_type_info{RawData::RandomMiiGlassType.at(static_cast(age))}; + const auto& faceline_wrinkle_info{RawData::RandomMiiFacelineWrinkle.at(index)}; + const auto& faceline_makeup_info{RawData::RandomMiiFacelineMakeup.at(index)}; + const auto& hair_type_info{RawData::RandomMiiHairType.at(index)}; + const auto& hair_color_info{RawData::RandomMiiHairColor.at(3 * static_cast(race) + + static_cast(age))}; + const auto& eye_type_info{RawData::RandomMiiEyeType.at(index)}; + const auto& eye_color_info{RawData::RandomMiiEyeColor.at(static_cast(race))}; + const auto& eyebrow_type_info{RawData::RandomMiiEyebrowType.at(index)}; + const auto& nose_type_info{RawData::RandomMiiNoseType.at(index)}; + const auto& mouth_type_info{RawData::RandomMiiMouthType.at(index)}; + const auto& glasses_type_info{RawData::RandomMiiGlassType.at(static_cast(age))}; bf.faceline_type.Assign( - faceline_type_info.values[GetRandomValue(faceline_type_info.values_count)]); + faceline_type_info + .values[MiiUtil::GetRandomValue(faceline_type_info.values_count)]); bf.faceline_color.Assign( - faceline_color_info.values[GetRandomValue(faceline_color_info.values_count)]); + faceline_color_info + .values[MiiUtil::GetRandomValue(faceline_color_info.values_count)]); bf.faceline_wrinkle.Assign( faceline_wrinkle_info - .values[GetRandomValue(faceline_wrinkle_info.values_count)]); + .values[MiiUtil::GetRandomValue(faceline_wrinkle_info.values_count)]); bf.faceline_makeup.Assign( faceline_makeup_info - .values[GetRandomValue(faceline_makeup_info.values_count)]); + .values[MiiUtil::GetRandomValue(faceline_makeup_info.values_count)]); bf.hair_type.Assign( - hair_type_info.values[GetRandomValue(hair_type_info.values_count)]); - bf.hair_color.Assign( - HairColorLookup[hair_color_info - .values[GetRandomValue(hair_color_info.values_count)]]); - bf.hair_flip.Assign(GetRandomValue(HairFlip::Maximum)); + hair_type_info.values[MiiUtil::GetRandomValue(hair_type_info.values_count)]); + bf.hair_color.Assign(RawData::GetHairColorFromVer3( + hair_color_info + .values[MiiUtil::GetRandomValue(hair_color_info.values_count)])); + bf.hair_flip.Assign(MiiUtil::GetRandomValue(HairFlip::Maximum)); bf.eye_type.Assign( - eye_type_info.values[GetRandomValue(eye_type_info.values_count)]); + eye_type_info.values[MiiUtil::GetRandomValue(eye_type_info.values_count)]); const auto eye_rotate_1{gender != Gender::Male ? 4 : 2}; const auto eye_rotate_2{gender != Gender::Male ? 3 : 4}; - const auto eye_rotate_offset{32 - EyeRotateLookup[eye_rotate_1] + eye_rotate_2}; - const auto eye_rotate{32 - EyeRotateLookup[bf.eye_type]}; + const auto eye_rotate_offset{32 - RawData::EyeRotateLookup[eye_rotate_1] + eye_rotate_2}; + const auto eye_rotate{32 - RawData::EyeRotateLookup[bf.eye_type]}; - bf.eye_color.Assign( - EyeColorLookup[eye_color_info - .values[GetRandomValue(eye_color_info.values_count)]]); + bf.eye_color.Assign(RawData::GetEyeColorFromVer3( + eye_color_info.values[MiiUtil::GetRandomValue(eye_color_info.values_count)])); bf.eye_scale.Assign(4); bf.eye_aspect.Assign(3); bf.eye_rotate.Assign(eye_rotate_offset - eye_rotate); @@ -223,13 +186,14 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo bf.eye_y.Assign(axis_y + 12); bf.eyebrow_type.Assign( - eyebrow_type_info.values[GetRandomValue(eyebrow_type_info.values_count)]); + eyebrow_type_info + .values[MiiUtil::GetRandomValue(eyebrow_type_info.values_count)]); const auto eyebrow_rotate_1{race == Race::Asian ? 6 : 0}; const auto eyebrow_y{race == Race::Asian ? 9 : 10}; - const auto eyebrow_rotate_offset{32 - EyebrowRotateLookup[eyebrow_rotate_1] + 6}; + const auto eyebrow_rotate_offset{32 - RawData::EyebrowRotateLookup[eyebrow_rotate_1] + 6}; const auto eyebrow_rotate{ - 32 - EyebrowRotateLookup[static_cast(bf.eyebrow_type.Value())]}; + 32 - RawData::EyebrowRotateLookup[static_cast(bf.eyebrow_type.Value())]}; bf.eyebrow_color.Assign(bf.hair_color); bf.eyebrow_scale.Assign(4); @@ -241,15 +205,15 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo const auto nose_scale{gender == Gender::Female ? 3 : 4}; bf.nose_type.Assign( - nose_type_info.values[GetRandomValue(nose_type_info.values_count)]); + nose_type_info.values[MiiUtil::GetRandomValue(nose_type_info.values_count)]); bf.nose_scale.Assign(nose_scale); bf.nose_y.Assign(axis_y + 9); - const auto mouth_color{gender == Gender::Female ? GetRandomValue(4) : 0}; + const auto mouth_color{gender == Gender::Female ? MiiUtil::GetRandomValue(4) : 0}; bf.mouth_type.Assign( - mouth_type_info.values[GetRandomValue(mouth_type_info.values_count)]); - bf.mouth_color.Assign(MouthColorLookup[mouth_color]); + mouth_type_info.values[MiiUtil::GetRandomValue(mouth_type_info.values_count)]); + bf.mouth_color.Assign(RawData::GetMouthColorFromVer3(mouth_color)); bf.mouth_scale.Assign(4); bf.mouth_aspect.Assign(3); bf.mouth_y.Assign(axis_y + 13); @@ -257,22 +221,22 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo bf.beard_color.Assign(bf.hair_color); bf.mustache_scale.Assign(4); - if (gender == Gender::Male && age != Age::Young && GetRandomValue(10) < 2) { + if (gender == Gender::Male && age != Age::Young && MiiUtil::GetRandomValue(10) < 2) { const auto mustache_and_beard_flag{ - GetRandomValue(BeardAndMustacheFlag::All)}; + MiiUtil::GetRandomValue(BeardAndMustacheFlag::All)}; auto beard_type{BeardType::None}; auto mustache_type{MustacheType::None}; if ((mustache_and_beard_flag & BeardAndMustacheFlag::Beard) == BeardAndMustacheFlag::Beard) { - beard_type = GetRandomValue(BeardType::Beard1, BeardType::Beard5); + beard_type = MiiUtil::GetRandomValue(BeardType::Beard1, BeardType::Beard5); } if ((mustache_and_beard_flag & BeardAndMustacheFlag::Mustache) == BeardAndMustacheFlag::Mustache) { - mustache_type = - GetRandomValue(MustacheType::Mustache1, MustacheType::Mustache5); + mustache_type = MiiUtil::GetRandomValue(MustacheType::Mustache1, + MustacheType::Mustache5); } bf.mustache_type.Assign(mustache_type); @@ -284,7 +248,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo bf.mustache_y.Assign(axis_y + 10); } - const auto glasses_type_start{GetRandomValue(100)}; + const auto glasses_type_start{MiiUtil::GetRandomValue(100)}; u8 glasses_type{}; while (glasses_type_start < glasses_type_info.values[glasses_type]) { if (++glasses_type >= glasses_type_info.values_count) { @@ -294,7 +258,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo } bf.glasses_type.Assign(glasses_type); - bf.glasses_color.Assign(GlassesColorLookup[0]); + bf.glasses_color.Assign(RawData::GetGlassColorFromVer3(0)); bf.glasses_scale.Assign(4); bf.glasses_y.Assign(axis_y + 10); @@ -315,23 +279,23 @@ MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& u bf.height.Assign(info.height); bf.build.Assign(info.weight); bf.type.Assign(info.type); - bf.region_move.Assign(info.region); + bf.region_move.Assign(info.region_move); bf.faceline_type.Assign(info.face_type); bf.faceline_color.Assign(info.face_color); bf.faceline_wrinkle.Assign(info.face_wrinkle); bf.faceline_makeup.Assign(info.face_makeup); bf.hair_type.Assign(info.hair_type); - bf.hair_color.Assign(HairColorLookup[info.hair_color]); + bf.hair_color.Assign(RawData::GetHairColorFromVer3(info.hair_color)); bf.hair_flip.Assign(static_cast(info.hair_flip)); bf.eye_type.Assign(info.eye_type); - bf.eye_color.Assign(EyeColorLookup[info.eye_color]); + bf.eye_color.Assign(RawData::GetEyeColorFromVer3(info.eye_color)); bf.eye_scale.Assign(info.eye_scale); bf.eye_aspect.Assign(info.eye_aspect); bf.eye_rotate.Assign(info.eye_rotate); bf.eye_x.Assign(info.eye_x); bf.eye_y.Assign(info.eye_y); bf.eyebrow_type.Assign(info.eyebrow_type); - bf.eyebrow_color.Assign(HairColorLookup[info.eyebrow_color]); + bf.eyebrow_color.Assign(RawData::GetHairColorFromVer3(info.eyebrow_color)); bf.eyebrow_scale.Assign(info.eyebrow_scale); bf.eyebrow_aspect.Assign(info.eyebrow_aspect); bf.eyebrow_rotate.Assign(info.eyebrow_rotate); @@ -341,17 +305,17 @@ MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& u bf.nose_scale.Assign(info.nose_scale); bf.nose_y.Assign(info.nose_y); bf.mouth_type.Assign(info.mouth_type); - bf.mouth_color.Assign(MouthColorLookup[info.mouth_color]); + bf.mouth_color.Assign(RawData::GetMouthColorFromVer3(info.mouth_color)); bf.mouth_scale.Assign(info.mouth_scale); bf.mouth_aspect.Assign(info.mouth_aspect); bf.mouth_y.Assign(info.mouth_y); - bf.beard_color.Assign(HairColorLookup[info.beard_color]); + bf.beard_color.Assign(RawData::GetHairColorFromVer3(info.beard_color)); bf.beard_type.Assign(static_cast(info.beard_type)); bf.mustache_type.Assign(static_cast(info.mustache_type)); bf.mustache_scale.Assign(info.mustache_scale); bf.mustache_y.Assign(info.mustache_y); bf.glasses_type.Assign(info.glasses_type); - bf.glasses_color.Assign(GlassesColorLookup[info.glasses_color]); + bf.glasses_color.Assign(RawData::GetGlassColorFromVer3(static_cast(info.glasses_color))); bf.glasses_scale.Assign(info.glasses_scale); bf.glasses_y.Assign(info.glasses_y); bf.mole_type.Assign(info.mole_type); @@ -366,14 +330,14 @@ MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& u MiiStoreData::MiiStoreData() = default; -MiiStoreData::MiiStoreData(const MiiStoreData::Name& name, const MiiStoreBitFields& bit_fields, +MiiStoreData::MiiStoreData(const Nickname& name, const MiiStoreBitFields& bit_fields, const Common::UUID& user_id) { data.name = name; data.uuid = Common::UUID::MakeRandomRFC4122V4(); std::memcpy(data.data.data(), &bit_fields, sizeof(MiiStoreBitFields)); - data_crc = GenerateCrc16(data.data.data(), sizeof(data)); - device_crc = GenerateCrc16(&user_id, sizeof(Common::UUID)); + data_crc = MiiUtil::CalculateCrc16(data.data.data(), sizeof(data)); + device_crc = MiiUtil::CalculateCrc16(&user_id, sizeof(Common::UUID)); } MiiManager::MiiManager() : user_id{Service::Account::ProfileManager().GetLastOpenedUser()} {} @@ -580,16 +544,19 @@ Ver3StoreData MiiManager::BuildFromStoreData(const CharInfo& mii) const { mii_v3.appearance_bits11.mole_y_position.Assign(mii.mole_y); // These types are converted to V3 from a table - mii_v3.appearance_bits1.skin_color.Assign(Ver3FacelineColorTable[mii.faceline_color]); - mii_v3.appearance_bits3.hair_color.Assign(Ver3HairColorTable[mii.hair_color]); - mii_v3.appearance_bits4.eye_color.Assign(Ver3EyeColorTable[mii.eye_color]); - mii_v3.appearance_bits5.eyebrow_color.Assign(Ver3HairColorTable[mii.eyebrow_color]); - mii_v3.appearance_bits7.mouth_color.Assign(Ver3MouthlineColorTable[mii.mouth_color]); - mii_v3.appearance_bits9.facial_hair_color.Assign(Ver3HairColorTable[mii.beard_color]); - mii_v3.appearance_bits10.glasses_color.Assign(Ver3GlassColorTable[mii.glasses_color]); - mii_v3.appearance_bits10.glasses_type.Assign(Ver3GlassTypeTable[mii.glasses_type]); + mii_v3.appearance_bits1.skin_color.Assign( + RawData::FromVer3GetFacelineColor(mii.faceline_color)); + mii_v3.appearance_bits3.hair_color.Assign(RawData::FromVer3GetHairColor(mii.hair_color)); + mii_v3.appearance_bits4.eye_color.Assign(RawData::FromVer3GetEyeColor(mii.eye_color)); + mii_v3.appearance_bits5.eyebrow_color.Assign(RawData::FromVer3GetHairColor(mii.eyebrow_color)); + mii_v3.appearance_bits7.mouth_color.Assign(RawData::FromVer3GetMouthlineColor(mii.mouth_color)); + mii_v3.appearance_bits9.facial_hair_color.Assign( + RawData::FromVer3GetHairColor(mii.beard_color)); + mii_v3.appearance_bits10.glasses_color.Assign( + RawData::FromVer3GetGlassColor(mii.glasses_color)); + mii_v3.appearance_bits10.glasses_type.Assign(RawData::FromVer3GetGlassType(mii.glasses_type)); - mii_v3.crc = GenerateCrc16(&mii_v3, sizeof(Ver3StoreData) - sizeof(u16)); + mii_v3.crc = MiiUtil::CalculateCrc16(&mii_v3, sizeof(Ver3StoreData) - sizeof(u16)); // TODO: Validate mii_v3 data diff --git a/src/core/hle/service/mii/mii_util.h b/src/core/hle/service/mii/mii_util.h index 5eb6df317..d98f83825 100644 --- a/src/core/hle/service/mii/mii_util.h +++ b/src/core/hle/service/mii/mii_util.h @@ -8,7 +8,7 @@ #include "common/common_types.h" #include "common/swap.h" #include "common/uuid.h" -#include "core/hle/service/mii/mii_types.h" +#include "core/hle/service/mii/types.h" namespace Service::Mii { class MiiUtil { diff --git a/src/core/hle/service/mii/raw_data.cpp b/src/core/hle/service/mii/raw_data.cpp index e5245b791..070e2d199 100644 --- a/src/core/hle/service/mii/raw_data.cpp +++ b/src/core/hle/service/mii/raw_data.cpp @@ -5,6 +5,83 @@ namespace Service::Mii::RawData { +constexpr std::array FromVer3FacelineColorTable{ + 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x0, 0x1, 0x5, 0x5, +}; + +constexpr std::array FromVer3HairColorTable{ + 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x0, 0x4, 0x3, 0x5, 0x4, 0x4, 0x6, 0x2, 0x0, + 0x6, 0x4, 0x3, 0x2, 0x2, 0x7, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, + 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x0, 0x4, + 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x5, 0x5, + 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x7, 0x5, 0x7, 0x7, 0x7, 0x7, 0x7, 0x6, 0x7, + 0x7, 0x7, 0x7, 0x7, 0x3, 0x7, 0x7, 0x7, 0x7, 0x7, 0x0, 0x4, 0x4, 0x4, 0x4, +}; + +constexpr std::array FromVer3EyeColorTable{ + 0x0, 0x2, 0x2, 0x2, 0x1, 0x3, 0x2, 0x3, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x2, 0x2, 0x4, + 0x2, 0x1, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, + 0x2, 0x2, 0x2, 0x2, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x1, 0x0, 0x4, 0x4, + 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, + 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x2, 0x2, + 0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, +}; + +constexpr std::array FromVer3MouthlineColorTable{ + 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x3, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x1, 0x4, + 0x4, 0x4, 0x0, 0x1, 0x2, 0x3, 0x4, 0x4, 0x2, 0x3, 0x3, 0x4, 0x4, 0x4, 0x4, 0x1, 0x4, + 0x4, 0x2, 0x3, 0x3, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x3, 0x3, 0x3, 0x4, 0x4, 0x4, + 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x4, 0x4, 0x4, 0x4, 0x3, 0x3, 0x3, 0x3, 0x4, 0x4, 0x4, + 0x4, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x4, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, + 0x3, 0x3, 0x3, 0x3, 0x4, 0x0, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, 0x3, 0x3, +}; + +constexpr std::array FromVer3GlassColorTable{ + 0x0, 0x1, 0x1, 0x1, 0x5, 0x1, 0x1, 0x4, 0x0, 0x5, 0x1, 0x1, 0x3, 0x5, 0x1, 0x2, 0x3, + 0x4, 0x5, 0x4, 0x2, 0x2, 0x4, 0x4, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, + 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, + 0x3, 0x3, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x0, 0x5, 0x5, + 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x1, 0x4, + 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, +}; + +constexpr std::array FromVer3GlassTypeTable{ + 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x1, + 0x2, 0x1, 0x3, 0x7, 0x7, 0x6, 0x7, 0x8, 0x7, 0x7, +}; + +constexpr std::array Ver3FacelineColorTable{ + 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, +}; + +constexpr std::array Ver3HairColorTable{ + 0x8, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, +}; + +constexpr std::array Ver3EyeColorTable{ + 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, +}; + +constexpr std::array Ver3MouthColorTable{ + 0x13, 0x14, 0x15, 0x16, 0x17, +}; + +constexpr std::array Ver3GlassColorTable{ + 0x8, 0xe, 0xf, 0x10, 0x11, 0x12, 0x0, +}; + +const std::array EyeRotateLookup{ + 0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04, + 0x04, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04, + 0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x03, 0x04, 0x04, +}; + +const std::array EyebrowRotateLookup{ + 0x06, 0x06, 0x05, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x06, 0x08, + 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x06, 0x06, 0x05, 0x06, 0x07, 0x05, +}; + const std::array BaseMii{ Service::Mii::DefaultMii{ .face_type = 0, @@ -13,7 +90,7 @@ const std::array BaseMii{ .face_makeup = 0, .hair_type = 33, .hair_color = 1, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 2, .eye_color = 0, .eye_scale = 4, @@ -36,8 +113,8 @@ const std::array BaseMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -53,9 +130,10 @@ const std::array BaseMii{ .weight = 64, .gender = Gender::Male, .favorite_color = 0, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, Service::Mii::DefaultMii{ .face_type = 0, @@ -64,7 +142,7 @@ const std::array BaseMii{ .face_makeup = 0, .hair_type = 12, .hair_color = 1, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 4, .eye_color = 0, .eye_scale = 4, @@ -87,8 +165,8 @@ const std::array BaseMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -104,9 +182,10 @@ const std::array BaseMii{ .weight = 64, .gender = Gender::Female, .favorite_color = 0, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, }; @@ -118,7 +197,7 @@ const std::array DefaultMii{ .face_makeup = 0, .hair_type = 68, .hair_color = 0, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 2, .eye_color = 0, .eye_scale = 4, @@ -141,8 +220,8 @@ const std::array DefaultMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -158,9 +237,10 @@ const std::array DefaultMii{ .weight = 64, .gender = Gender::Male, .favorite_color = 4, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, Service::Mii::DefaultMii{ .face_type = 0, @@ -169,7 +249,7 @@ const std::array DefaultMii{ .face_makeup = 0, .hair_type = 55, .hair_color = 6, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 2, .eye_color = 4, .eye_scale = 4, @@ -192,8 +272,8 @@ const std::array DefaultMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -209,9 +289,10 @@ const std::array DefaultMii{ .weight = 64, .gender = Gender::Male, .favorite_color = 5, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, Service::Mii::DefaultMii{ .face_type = 0, @@ -220,7 +301,7 @@ const std::array DefaultMii{ .face_makeup = 0, .hair_type = 33, .hair_color = 1, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 2, .eye_color = 0, .eye_scale = 4, @@ -243,8 +324,8 @@ const std::array DefaultMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -260,9 +341,10 @@ const std::array DefaultMii{ .weight = 64, .gender = Gender::Male, .favorite_color = 0, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, Service::Mii::DefaultMii{ .face_type = 0, @@ -271,7 +353,7 @@ const std::array DefaultMii{ .face_makeup = 0, .hair_type = 24, .hair_color = 0, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 4, .eye_color = 0, .eye_scale = 4, @@ -294,8 +376,8 @@ const std::array DefaultMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -311,9 +393,10 @@ const std::array DefaultMii{ .weight = 64, .gender = Gender::Female, .favorite_color = 2, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, Service::Mii::DefaultMii{ .face_type = 0, @@ -322,7 +405,7 @@ const std::array DefaultMii{ .face_makeup = 0, .hair_type = 14, .hair_color = 7, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 4, .eye_color = 5, .eye_scale = 4, @@ -345,8 +428,8 @@ const std::array DefaultMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -362,9 +445,10 @@ const std::array DefaultMii{ .weight = 64, .gender = Gender::Female, .favorite_color = 6, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, Service::Mii::DefaultMii{ .face_type = 0, @@ -373,7 +457,7 @@ const std::array DefaultMii{ .face_makeup = 0, .hair_type = 12, .hair_color = 1, - .hair_flip = 0, + .hair_flip = HairFlip::Left, .eye_type = 4, .eye_color = 0, .eye_scale = 4, @@ -396,8 +480,8 @@ const std::array DefaultMii{ .mouth_scale = 4, .mouth_aspect = 3, .mouth_y = 13, - .mustache_type = 0, - .beard_type = 0, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, .beard_color = 0, .mustache_scale = 4, .mustache_y = 10, @@ -413,134 +497,135 @@ const std::array DefaultMii{ .weight = 64, .gender = Gender::Female, .favorite_color = 7, - .region = 0, + .region_move = 0, .font_region = FontRegion::Standard, .type = 0, + .nickname = {u'n', u'o', u' ', u'n', u'a', u'm', u'e'}, }, }; -const std::array RandomMiiFaceline{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiFaceline{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, .values_count = 10, .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, .values_count = 10, .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, .values_count = 10, .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, .values_count = 12, .values = {0, 0, 1, 2, 2, 3, 4, 5, 6, 7, 10, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, .values_count = 13, .values = {0, 1, 2, 2, 3, 4, 5, 6, 6, 7, 7, 10, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, .values_count = 12, .values = {0, 0, 1, 2, 2, 3, 4, 5, 6, 7, 10, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, .values_count = 12, .values = {0, 0, 1, 2, 2, 3, 4, 5, 6, 7, 10, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, .values_count = 13, .values = {0, 1, 2, 2, 3, 4, 5, 6, 6, 7, 7, 10, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, .values_count = 12, .values = {0, 0, 1, 2, 2, 3, 4, 5, 6, 7, 10, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, .values_count = 10, .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, .values_count = 10, .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, .values_count = 10, .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, .values_count = 12, .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, .values_count = 12, .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, .values_count = 12, .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, .values_count = 12, .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, .values_count = 12, .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -549,38 +634,38 @@ const std::array RandomMiiFaceline{ }, }; -const std::array RandomMiiFacelineColor{ - Service::Mii::RandomMiiData3{ +const std::array RandomMiiFacelineColor{ + RandomMiiData3{ .arg_1 = 0, .arg_2 = 0, .values_count = 10, .values = {2, 2, 4, 4, 4, 4, 5, 5, 5, 5}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 0, .arg_2 = 1, .values_count = 10, .values = {0, 0, 0, 0, 1, 1, 2, 3, 3, 3}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 0, .arg_2 = 2, .values_count = 10, .values = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 1, .arg_2 = 0, .values_count = 10, .values = {2, 2, 4, 4, 4, 4, 5, 5, 5, 5}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 1, .arg_2 = 1, .values_count = 10, .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 3}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 1, .arg_2 = 2, .values_count = 10, @@ -588,127 +673,127 @@ const std::array RandomMiiFacelineColor{ }, }; -const std::array RandomMiiFacelineWrinkle{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiFacelineWrinkle{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, .values_count = 20, .values = {9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, .values_count = 20, .values = {9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, .values_count = 20, .values = {9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 4, 4, 8, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 4, 4, 8, 8}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 4, 4}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, .values_count = 20, .values = {9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, .values_count = 20, .values = {9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -717,127 +802,127 @@ const std::array RandomMiiFacelineWrinkle{ }, }; -const std::array RandomMiiFacelineMakeup{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiFacelineMakeup{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, .values_count = 20, .values = {0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -846,8 +931,8 @@ const std::array RandomMiiFacelineMakeup{ }, }; -const std::array RandomMiiHairType{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiHairType{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, @@ -855,7 +940,7 @@ const std::array RandomMiiHairType{ .values = {13, 23, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 56, 57, 64, 66, 75, 76, 86, 89}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, @@ -863,7 +948,7 @@ const std::array RandomMiiHairType{ .values = {13, 23, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 56, 57, 64, 66, 73, 75, 81, 86, 87}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, @@ -871,7 +956,7 @@ const std::array RandomMiiHairType{ .values = {13, 23, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 56, 57, 64, 66, 73, 75, 81, 86, 87}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, @@ -879,7 +964,7 @@ const std::array RandomMiiHairType{ .values = {13, 23, 30, 31, 32, 33, 34, 36, 37, 38, 40, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 64, 65, 66, 67, 68, 70, 75, 76, 86, 89}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, @@ -887,7 +972,7 @@ const std::array RandomMiiHairType{ .values = {13, 23, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 64, 65, 66, 67, 68, 70, 73, 75, 81, 86, 87}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, @@ -895,28 +980,28 @@ const std::array RandomMiiHairType{ .values = {13, 23, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 64, 65, 66, 67, 68, 70, 73, 75, 81, 86, 87}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, .values_count = 18, .values = {13, 23, 30, 36, 37, 41, 45, 47, 51, 53, 54, 55, 58, 59, 65, 67, 86, 88}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, .values_count = 19, .values = {13, 23, 30, 36, 37, 39, 41, 45, 47, 51, 53, 54, 55, 58, 59, 65, 67, 86, 88}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, .values_count = 19, .values = {13, 23, 30, 36, 37, 39, 41, 45, 47, 51, 53, 54, 55, 58, 59, 65, 67, 86, 88}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, @@ -924,7 +1009,7 @@ const std::array RandomMiiHairType{ .values = {0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 46, 50, 61, 62, 63, 64, 69, 76, 77, 79, 80, 83, 85}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, @@ -933,7 +1018,7 @@ const std::array RandomMiiHairType{ 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 46, 50, 61, 62, 63, 64, 69, 72, 74, 77, 78, 82, 83, 84, 85, 87}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, @@ -942,7 +1027,7 @@ const std::array RandomMiiHairType{ 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 46, 50, 61, 62, 63, 64, 69, 72, 74, 77, 78, 82, 83, 84, 85, 87}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, @@ -951,7 +1036,7 @@ const std::array RandomMiiHairType{ 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 29, 42, 50, 58, 60, 62, 63, 64, 69, 71, 76, 79, 80, 81, 82, 83, 86}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, @@ -960,7 +1045,7 @@ const std::array RandomMiiHairType{ 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 29, 50, 58, 60, 62, 63, 64, 69, 71, 72, 74, 79, 81, 82, 83, 84, 85}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, @@ -969,7 +1054,7 @@ const std::array RandomMiiHairType{ 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 29, 50, 58, 60, 62, 63, 64, 69, 71, 72, 74, 79, 81, 82, 83, 84, 85}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, @@ -977,7 +1062,7 @@ const std::array RandomMiiHairType{ .values = {0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 16, 17, 18, 20, 21, 24, 25, 58, 62, 69, 76, 83}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, @@ -985,7 +1070,7 @@ const std::array RandomMiiHairType{ .values = {0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 16, 17, 18, 20, 21, 24, 25, 58, 62, 69, 74, 76, 81, 83, 85}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -996,55 +1081,55 @@ const std::array RandomMiiHairType{ }; const std::array RandomMiiHairColor{ - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 0, .arg_2 = 0, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 0, .arg_2 = 1, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 0, .arg_2 = 2, .values_count = 20, .values = {0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 1, .arg_2 = 0, .values_count = 20, .values = {2, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 1, .arg_2 = 1, .values_count = 20, .values = {2, 3, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 1, .arg_2 = 2, .values_count = 20, .values = {2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 2, .arg_2 = 0, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 2, .arg_2 = 1, .values_count = 20, .values = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3}, }, - Service::Mii::RandomMiiData3{ + RandomMiiData3{ .arg_1 = 2, .arg_2 = 2, .values_count = 20, @@ -1052,8 +1137,8 @@ const std::array RandomMiiHairColor{ }, }; -const std::array RandomMiiEyeType{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiEyeType{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, @@ -1061,7 +1146,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 18, 27, 29, 32, 34, 36, 38, 39, 41, 43, 47, 49, 51, 53, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, @@ -1069,7 +1154,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 18, 27, 29, 32, 34, 36, 38, 39, 41, 43, 47, 49, 51, 53, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, @@ -1077,7 +1162,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 18, 26, 27, 29, 32, 34, 36, 38, 39, 41, 43, 47, 48, 49, 53, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, @@ -1085,7 +1170,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 21, 22, 27, 29, 31, 32, 34, 36, 37, 38, 39, 41, 43, 44, 47, 49, 51, 53, 55, 56, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, @@ -1093,7 +1178,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 21, 22, 27, 29, 31, 32, 34, 36, 37, 38, 39, 41, 43, 44, 47, 49, 51, 53, 55, 56, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, @@ -1101,7 +1186,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 18, 21, 22, 26, 27, 29, 31, 32, 34, 36, 37, 38, 39, 41, 43, 44, 47, 48, 49, 50, 53, 56, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, @@ -1109,7 +1194,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 31, 32, 34, 36, 37, 39, 41, 44, 49, 51, 53, 55, 56, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, @@ -1117,7 +1202,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 31, 32, 34, 36, 37, 39, 41, 44, 49, 51, 53, 55, 56, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, @@ -1125,7 +1210,7 @@ const std::array RandomMiiEyeType{ .values = {2, 3, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 21, 22, 26, 31, 32, 34, 36, 37, 39, 41, 44, 48, 49, 50, 51, 53, 57}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, @@ -1133,7 +1218,7 @@ const std::array RandomMiiEyeType{ .values = {0, 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 23, 24, 25, 27, 28, 29, 32, 33, 34, 35, 38, 39, 40, 41, 42, 45, 46, 47, 48, 53, 54, 57, 59}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, @@ -1141,7 +1226,7 @@ const std::array RandomMiiEyeType{ .values = {0, 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 23, 24, 25, 27, 28, 29, 32, 33, 34, 35, 38, 39, 40, 41, 42, 45, 46, 47, 48, 53, 54, 57, 59}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, @@ -1149,7 +1234,7 @@ const std::array RandomMiiEyeType{ .values = {0, 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 38, 39, 40, 41, 42, 45, 46, 47, 48, 53, 54, 57, 59}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, @@ -1158,7 +1243,7 @@ const std::array RandomMiiEyeType{ 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 53, 54, 57, 58, 59}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, @@ -1167,7 +1252,7 @@ const std::array RandomMiiEyeType{ 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 53, 54, 57, 58, 59}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, @@ -1176,7 +1261,7 @@ const std::array RandomMiiEyeType{ 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 53, 54, 57, 58, 59}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, @@ -1184,7 +1269,7 @@ const std::array RandomMiiEyeType{ .values = {0, 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 23, 24, 25, 27, 28, 29, 32, 33, 34, 35, 38, 39, 40, 41, 42, 45, 46, 47}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, @@ -1192,7 +1277,7 @@ const std::array RandomMiiEyeType{ .values = {0, 1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 23, 24, 25, 27, 28, 29, 32, 33, 34, 35, 38, 39, 40, 41, 42, 45, 46, 47}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -1202,47 +1287,47 @@ const std::array RandomMiiEyeType{ }, }; -const std::array RandomMiiEyeColor{ - Service::Mii::RandomMiiData2{ +const std::array RandomMiiEyeColor{ + RandomMiiData2{ .arg_1 = 0, .values_count = 10, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, }, - Service::Mii::RandomMiiData2{ + RandomMiiData2{ .arg_1 = 1, .values_count = 10, .values = {0, 1, 1, 2, 3, 3, 4, 4, 4, 5}, }, - Service::Mii::RandomMiiData2{ + RandomMiiData2{ .arg_1 = 2, .values_count = 10, .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, }, }; -const std::array RandomMiiEyebrowType{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiEyebrowType{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 20}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 20}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 20}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, @@ -1250,7 +1335,7 @@ const std::array RandomMiiEyebrowType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, @@ -1258,7 +1343,7 @@ const std::array RandomMiiEyebrowType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, @@ -1266,84 +1351,84 @@ const std::array RandomMiiEyebrowType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, .values_count = 21, .values = {0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, .values_count = 21, .values = {0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, .values_count = 21, .values = {0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, .values_count = 9, .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, .values_count = 9, .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, .values_count = 9, .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, .values_count = 11, .values = {0, 1, 3, 7, 8, 9, 10, 11, 13, 15, 19}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, .values_count = 11, .values = {0, 1, 3, 7, 8, 9, 10, 11, 13, 15, 19}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, .values_count = 11, .values = {0, 1, 3, 7, 8, 9, 10, 11, 13, 15, 19}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, .values_count = 9, .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, .values_count = 9, .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -1352,127 +1437,127 @@ const std::array RandomMiiEyebrowType{ }, }; -const std::array RandomMiiNoseType{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiNoseType{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, .values_count = 11, .values = {0, 1, 2, 3, 4, 5, 7, 8, 10, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, .values_count = 11, .values = {0, 1, 2, 3, 4, 5, 7, 8, 10, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, .values_count = 11, .values = {0, 1, 2, 3, 4, 5, 7, 8, 10, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, .values_count = 15, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, .values_count = 18, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, .values_count = 15, .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, .values_count = 8, .values = {0, 1, 3, 4, 8, 10, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, .values_count = 8, .values = {0, 1, 3, 4, 8, 10, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, .values_count = 8, .values = {0, 1, 3, 4, 8, 10, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, .values_count = 12, .values = {0, 1, 3, 4, 6, 8, 9, 10, 11, 13, 14, 15}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, .values_count = 11, .values = {0, 1, 3, 4, 6, 8, 9, 10, 11, 13, 15}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, .values_count = 10, .values = {0, 1, 3, 4, 6, 8, 10, 11, 13, 14}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, .values_count = 12, .values = {0, 1, 3, 4, 6, 8, 9, 10, 11, 13, 14, 15}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, .values_count = 11, .values = {0, 1, 3, 4, 6, 8, 9, 10, 11, 13, 15}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -1481,8 +1566,8 @@ const std::array RandomMiiNoseType{ }, }; -const std::array RandomMiiMouthType{ - Service::Mii::RandomMiiData4{ +const std::array RandomMiiMouthType{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Black, @@ -1490,7 +1575,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 12, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 28, 30, 32, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Black, @@ -1498,7 +1583,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 28, 30, 32, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Black, @@ -1506,7 +1591,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 28, 30, 31, 32, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::White, @@ -1514,7 +1599,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::White, @@ -1522,7 +1607,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::White, @@ -1530,7 +1615,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Young, .race = Race::Asian, @@ -1538,7 +1623,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Normal, .race = Race::Asian, @@ -1546,7 +1631,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Male, .age = Age::Old, .race = Race::Asian, @@ -1554,7 +1639,7 @@ const std::array RandomMiiMouthType{ .values = {0, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 31, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Black, @@ -1562,7 +1647,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 30, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Black, @@ -1570,7 +1655,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 30, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Black, @@ -1578,7 +1663,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 30, 33, 34, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::White, @@ -1586,7 +1671,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 27, 29, 33, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::White, @@ -1594,7 +1679,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 27, 29, 33, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::White, @@ -1602,7 +1687,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 29, 33, 35}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Young, .race = Race::Asian, @@ -1610,7 +1695,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 29, 33}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Normal, .race = Race::Asian, @@ -1618,7 +1703,7 @@ const std::array RandomMiiMouthType{ .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 29, 33}, }, - Service::Mii::RandomMiiData4{ + RandomMiiData4{ .gender = Gender::Female, .age = Age::Old, .race = Race::Asian, @@ -1628,22 +1713,66 @@ const std::array RandomMiiMouthType{ }, }; -const std::array RandomMiiGlassType{ - Service::Mii::RandomMiiData2{ +const std::array RandomMiiGlassType{ + RandomMiiData2{ .arg_1 = 0, .values_count = 9, .values = {90, 94, 96, 100, 0, 0, 0, 0, 0}, }, - Service::Mii::RandomMiiData2{ + RandomMiiData2{ .arg_1 = 1, .values_count = 9, .values = {83, 86, 90, 93, 94, 96, 98, 100, 0}, }, - Service::Mii::RandomMiiData2{ + RandomMiiData2{ .arg_1 = 2, .values_count = 9, .values = {78, 83, 0, 93, 0, 0, 98, 100, 0}, }, }; +u8 FromVer3GetFacelineColor(u8 color) { + return FromVer3FacelineColorTable[color]; +} + +u8 FromVer3GetHairColor(u8 color) { + return FromVer3HairColorTable[color]; +} + +u8 FromVer3GetEyeColor(u8 color) { + return FromVer3EyeColorTable[color]; +} + +u8 FromVer3GetMouthlineColor(u8 color) { + return FromVer3MouthlineColorTable[color]; +} + +u8 FromVer3GetGlassColor(u8 color) { + return FromVer3GlassColorTable[color]; +} + +u8 FromVer3GetGlassType(u8 type) { + return FromVer3GlassTypeTable[type]; +} + +u8 GetFacelineColorFromVer3(u8 color) { + return Ver3FacelineColorTable[color]; +} + +u8 GetHairColorFromVer3(u32 color) { + return Ver3HairColorTable[color]; +} + +u8 GetEyeColorFromVer3(u32 color) { + return Ver3EyeColorTable[color]; +} + +u8 GetMouthColorFromVer3(u32 color) { + return Ver3MouthColorTable[color]; +} + +u8 GetGlassColorFromVer3(u8 color) { + return Ver3GlassColorTable[color]; +} + } // namespace Service::Mii::RawData diff --git a/src/core/hle/service/mii/raw_data.h b/src/core/hle/service/mii/raw_data.h index cdd2337d6..ab84d09a1 100644 --- a/src/core/hle/service/mii/raw_data.h +++ b/src/core/hle/service/mii/raw_data.h @@ -9,19 +9,65 @@ namespace Service::Mii::RawData { +struct RandomMiiValues { + std::array values{}; +}; +static_assert(sizeof(RandomMiiValues) == 0xbc, "RandomMiiValues has incorrect size."); + +struct RandomMiiData4 { + Gender gender{}; + Age age{}; + Race race{}; + u32 values_count{}; + std::array values{}; +}; +static_assert(sizeof(RandomMiiData4) == 0xcc, "RandomMiiData4 has incorrect size."); + +struct RandomMiiData3 { + u32 arg_1; + u32 arg_2; + u32 values_count; + std::array values{}; +}; +static_assert(sizeof(RandomMiiData3) == 0xc8, "RandomMiiData3 has incorrect size."); + +struct RandomMiiData2 { + u32 arg_1; + u32 values_count; + std::array values{}; +}; +static_assert(sizeof(RandomMiiData2) == 0xc4, "RandomMiiData2 has incorrect size."); + extern const std::array BaseMii; extern const std::array DefaultMii; -extern const std::array RandomMiiFaceline; -extern const std::array RandomMiiFacelineColor; -extern const std::array RandomMiiFacelineWrinkle; -extern const std::array RandomMiiFacelineMakeup; -extern const std::array RandomMiiHairType; -extern const std::array RandomMiiHairColor; -extern const std::array RandomMiiEyeType; -extern const std::array RandomMiiEyeColor; -extern const std::array RandomMiiEyebrowType; -extern const std::array RandomMiiNoseType; -extern const std::array RandomMiiMouthType; -extern const std::array RandomMiiGlassType; + +extern const std::array EyeRotateLookup; +extern const std::array EyebrowRotateLookup; + +extern const std::array RandomMiiFaceline; +extern const std::array RandomMiiFacelineColor; +extern const std::array RandomMiiFacelineWrinkle; +extern const std::array RandomMiiFacelineMakeup; +extern const std::array RandomMiiHairType; +extern const std::array RandomMiiHairColor; +extern const std::array RandomMiiEyeType; +extern const std::array RandomMiiEyeColor; +extern const std::array RandomMiiEyebrowType; +extern const std::array RandomMiiNoseType; +extern const std::array RandomMiiMouthType; +extern const std::array RandomMiiGlassType; + +u8 FromVer3GetFacelineColor(u8 color); +u8 FromVer3GetHairColor(u8 color); +u8 FromVer3GetEyeColor(u8 color); +u8 FromVer3GetMouthlineColor(u8 color); +u8 FromVer3GetGlassColor(u8 color); +u8 FromVer3GetGlassType(u8 type); + +u8 GetFacelineColorFromVer3(u8 color); +u8 GetHairColorFromVer3(u32 color); +u8 GetEyeColorFromVer3(u32 color); +u8 GetMouthColorFromVer3(u32 color); +u8 GetGlassColorFromVer3(u8 color); } // namespace Service::Mii::RawData diff --git a/src/core/hle/service/mii/types.h b/src/core/hle/service/mii/types.h index c48d08d79..cc8286189 100644 --- a/src/core/hle/service/mii/types.h +++ b/src/core/hle/service/mii/types.h @@ -86,6 +86,8 @@ enum class SourceFlag : u32 { }; DECLARE_ENUM_FLAG_OPERATORS(SourceFlag); +using Nickname = std::array; + // nn::mii::CharInfo struct CharInfo { Common::UUID uuid; @@ -382,56 +384,10 @@ struct NfpStoreDataExtension { }; static_assert(sizeof(NfpStoreDataExtension) == 0x8, "NfpStoreDataExtension is an invalid size"); -constexpr std::array Ver3FacelineColorTable{ - 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x0, 0x1, 0x5, 0x5, -}; - -constexpr std::array Ver3HairColorTable{ - 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x0, 0x4, 0x3, 0x5, 0x4, 0x4, 0x6, 0x2, 0x0, - 0x6, 0x4, 0x3, 0x2, 0x2, 0x7, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, - 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x0, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x5, 0x5, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x7, 0x5, 0x7, 0x7, 0x7, 0x7, 0x7, 0x6, 0x7, - 0x7, 0x7, 0x7, 0x7, 0x3, 0x7, 0x7, 0x7, 0x7, 0x7, 0x0, 0x4, 0x4, 0x4, 0x4, -}; - -constexpr std::array Ver3EyeColorTable{ - 0x0, 0x2, 0x2, 0x2, 0x1, 0x3, 0x2, 0x3, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x2, 0x2, 0x4, - 0x2, 0x1, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, - 0x2, 0x2, 0x2, 0x2, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x1, 0x0, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, - 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x2, 0x2, - 0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, -}; - -constexpr std::array Ver3MouthlineColorTable{ - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x3, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x1, 0x4, - 0x4, 0x4, 0x0, 0x1, 0x2, 0x3, 0x4, 0x4, 0x2, 0x3, 0x3, 0x4, 0x4, 0x4, 0x4, 0x1, 0x4, - 0x4, 0x2, 0x3, 0x3, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x3, 0x3, 0x3, 0x4, 0x4, 0x4, - 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x4, 0x4, 0x4, 0x4, 0x3, 0x3, 0x3, 0x3, 0x4, 0x4, 0x4, - 0x4, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x4, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, - 0x3, 0x3, 0x3, 0x3, 0x4, 0x0, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, 0x3, 0x3, -}; - -constexpr std::array Ver3GlassColorTable{ - 0x0, 0x1, 0x1, 0x1, 0x5, 0x1, 0x1, 0x4, 0x0, 0x5, 0x1, 0x1, 0x3, 0x5, 0x1, 0x2, 0x3, - 0x4, 0x5, 0x4, 0x2, 0x2, 0x4, 0x4, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, - 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, - 0x3, 0x3, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x0, 0x5, 0x5, - 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x1, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, -}; - -constexpr std::array Ver3GlassTypeTable{ - 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x1, - 0x2, 0x1, 0x3, 0x7, 0x7, 0x6, 0x7, 0x8, 0x7, 0x7, -}; - struct MiiStoreData { - using Name = std::array; MiiStoreData(); - MiiStoreData(const Name& name, const MiiStoreBitFields& bit_fields, + MiiStoreData(const Nickname& name, const MiiStoreBitFields& bit_fields, const Common::UUID& user_id); // This corresponds to the above structure MiiStoreBitFields. I did it like this because the @@ -441,7 +397,7 @@ struct MiiStoreData { std::array data{}; static_assert(sizeof(MiiStoreBitFields) == sizeof(data), "data field has incorrect size."); - Name name{}; + Nickname name{}; Common::UUID uuid{}; } data; @@ -501,7 +457,7 @@ struct DefaultMii { u32 face_makeup{}; u32 hair_type{}; u32 hair_color{}; - u32 hair_flip{}; + HairFlip hair_flip{}; u32 eye_type{}; u32 eye_color{}; u32 eye_scale{}; @@ -524,8 +480,8 @@ struct DefaultMii { u32 mouth_scale{}; u32 mouth_aspect{}; u32 mouth_y{}; - u32 mustache_type{}; - u32 beard_type{}; + MustacheType mustache_type{}; + BeardType beard_type{}; u32 beard_color{}; u32 mustache_scale{}; u32 mustache_y{}; @@ -541,10 +497,10 @@ struct DefaultMii { u32 weight{}; Gender gender{}; u32 favorite_color{}; - u32 region{}; + u32 region_move{}; FontRegion font_region{}; u32 type{}; - INSERT_PADDING_WORDS(5); + Nickname nickname; }; static_assert(sizeof(DefaultMii) == 0xd8, "MiiStoreData has incorrect size.");