From 27929d7ca2b5fffc8866941d08cda921d586c45d Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 10 Sep 2023 21:58:18 -0600 Subject: service: mii: separate mii types into their own file --- src/core/CMakeLists.txt | 14 +- .../hle/service/am/applets/applet_mii_edit_types.h | 3 +- src/core/hle/service/mii/mii.cpp | 2 +- src/core/hle/service/mii/mii_manager.cpp | 38 +- src/core/hle/service/mii/mii_manager.h | 16 +- src/core/hle/service/mii/mii_types.h | 157 ++ src/core/hle/service/mii/mii_util.h | 4 +- src/core/hle/service/mii/raw_data.cpp | 1778 -------------------- src/core/hle/service/mii/raw_data.h | 73 - src/core/hle/service/mii/types.h | 509 ------ src/core/hle/service/mii/types/char_info.cpp | 6 + src/core/hle/service/mii/types/char_info.h | 76 + src/core/hle/service/mii/types/core_data.cpp | 6 + src/core/hle/service/mii/types/core_data.h | 105 ++ src/core/hle/service/mii/types/raw_data.cpp | 1778 ++++++++++++++++++++ src/core/hle/service/mii/types/raw_data.h | 73 + src/core/hle/service/mii/types/store_data.cpp | 6 + src/core/hle/service/mii/types/store_data.h | 29 + src/core/hle/service/mii/types/ver3_store_data.cpp | 6 + src/core/hle/service/mii/types/ver3_store_data.h | 141 ++ src/core/hle/service/nfc/common/device.cpp | 1 - src/core/hle/service/nfp/nfp_types.h | 5 +- 22 files changed, 2435 insertions(+), 2391 deletions(-) create mode 100644 src/core/hle/service/mii/mii_types.h delete mode 100644 src/core/hle/service/mii/raw_data.cpp delete mode 100644 src/core/hle/service/mii/raw_data.h delete mode 100644 src/core/hle/service/mii/types.h create mode 100644 src/core/hle/service/mii/types/char_info.cpp create mode 100644 src/core/hle/service/mii/types/char_info.h create mode 100644 src/core/hle/service/mii/types/core_data.cpp create mode 100644 src/core/hle/service/mii/types/core_data.h create mode 100644 src/core/hle/service/mii/types/raw_data.cpp create mode 100644 src/core/hle/service/mii/types/raw_data.h create mode 100644 src/core/hle/service/mii/types/store_data.cpp create mode 100644 src/core/hle/service/mii/types/store_data.h create mode 100644 src/core/hle/service/mii/types/ver3_store_data.cpp create mode 100644 src/core/hle/service/mii/types/ver3_store_data.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e9095ac52..c33910ade 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -584,15 +584,23 @@ add_library(core STATIC hle/service/lm/lm.h hle/service/mig/mig.cpp hle/service/mig/mig.h + hle/service/mii/types/char_info.cpp + hle/service/mii/types/char_info.h + hle/service/mii/types/core_data.cpp + hle/service/mii/types/core_data.h + hle/service/mii/types/raw_data.cpp + hle/service/mii/types/raw_data.h + hle/service/mii/types/store_data.cpp + hle/service/mii/types/store_data.h + hle/service/mii/types/ver3_store_data.cpp + hle/service/mii/types/ver3_store_data.h hle/service/mii/mii.cpp hle/service/mii/mii.h hle/service/mii/mii_manager.cpp hle/service/mii/mii_manager.h hle/service/mii/mii_result.h + hle/service/mii/mii_types.h hle/service/mii/mii_util.h - hle/service/mii/raw_data.cpp - hle/service/mii/raw_data.h - hle/service/mii/types.h hle/service/mm/mm_u.cpp hle/service/mm/mm_u.h hle/service/mnpp/mnpp_app.cpp diff --git a/src/core/hle/service/am/applets/applet_mii_edit_types.h b/src/core/hle/service/am/applets/applet_mii_edit_types.h index 4705d019f..f3d764073 100644 --- a/src/core/hle/service/am/applets/applet_mii_edit_types.h +++ b/src/core/hle/service/am/applets/applet_mii_edit_types.h @@ -7,7 +7,8 @@ #include "common/common_funcs.h" #include "common/common_types.h" -#include "core/hle/service/mii/types.h" +#include "common/uuid.h" +#include "core/hle/service/mii/types/char_info.h" namespace Service::AM::Applets { diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index bf3ee5907..680f06beb 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp @@ -120,7 +120,7 @@ private: std::vector values; for (const auto& element : default_miis) { - values.emplace_back(element.info); + values.emplace_back(element.char_info); } ctx.WriteBuffer(SerializeArray(values)); diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index de70c3da6..035eed505 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp @@ -12,7 +12,8 @@ #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" +#include "core/hle/service/mii/types/core_data.h" +#include "core/hle/service/mii/types/raw_data.h" namespace Service::Mii { @@ -29,13 +30,12 @@ std::array ResizeArray(const std::array& i return out; } -CharInfo ConvertStoreDataToInfo(const MiiStoreData& data) { - MiiStoreBitFields bf; - std::memcpy(&bf, data.data.data.data(), sizeof(MiiStoreBitFields)); +CharInfo ConvertStoreDataToInfo(const StoreData& data) { + const StoreDataBitFields& bf = data.core_data.data; return { - .uuid = data.data.uuid, - .name = ResizeArray(data.data.name), + .create_id = data.create_id, + .name = data.core_data.name, .font_region = static_cast(bf.font_region.Value()), .favorite_color = static_cast(bf.favorite_color.Value()), .gender = static_cast(bf.gender.Value()), @@ -89,8 +89,8 @@ CharInfo ConvertStoreDataToInfo(const MiiStoreData& data) { }; } -MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Common::UUID& user_id) { - MiiStoreBitFields bf{}; +StoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Common::UUID& user_id) { + StoreDataBitFields bf{}; if (gender == Gender::All) { gender = MiiUtil::GetRandomValue(Gender::Maximum); @@ -270,8 +270,8 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo return {DefaultMiiName, bf, user_id}; } -MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& user_id) { - MiiStoreBitFields bf{}; +StoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& user_id) { + StoreDataBitFields bf{}; bf.font_region.Assign(info.font_region); bf.favorite_color.Assign(info.favorite_color); @@ -328,15 +328,15 @@ MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& u } // namespace -MiiStoreData::MiiStoreData() = default; +StoreData::StoreData() = default; -MiiStoreData::MiiStoreData(const Nickname& name, const MiiStoreBitFields& bit_fields, - const Common::UUID& user_id) { - data.name = name; - data.uuid = Common::UUID::MakeRandomRFC4122V4(); +StoreData::StoreData(const Nickname& name, const StoreDataBitFields& bit_fields, + const Common::UUID& user_id) { + core_data.name = name; + create_id = Common::UUID::MakeRandomRFC4122V4(); - std::memcpy(data.data.data(), &bit_fields, sizeof(MiiStoreBitFields)); - data_crc = MiiUtil::CalculateCrc16(data.data.data(), sizeof(data)); + core_data.data = bit_fields; + data_crc = MiiUtil::CalculateCrc16(&core_data.data, sizeof(core_data.data)); device_crc = MiiUtil::CalculateCrc16(&user_id, sizeof(Common::UUID)); } @@ -641,8 +641,8 @@ bool MiiManager::ValidateV3Info(const Ver3StoreData& mii_v3) const { return is_valid; } -std::vector MiiManager::GetDefault(SourceFlag source_flag) { - std::vector result; +std::vector MiiManager::GetDefault(SourceFlag source_flag) { + std::vector result; if ((source_flag & SourceFlag::Default) == SourceFlag::None) { return result; diff --git a/src/core/hle/service/mii/mii_manager.h b/src/core/hle/service/mii/mii_manager.h index 0c8295ebe..1f5c9e16f 100644 --- a/src/core/hle/service/mii/mii_manager.h +++ b/src/core/hle/service/mii/mii_manager.h @@ -6,7 +6,10 @@ #include #include "core/hle/result.h" -#include "core/hle/service/mii/types.h" +#include "core/hle/service/mii/mii_types.h" +#include "core/hle/service/mii/types/char_info.h" +#include "core/hle/service/mii/types/store_data.h" +#include "core/hle/service/mii/types/ver3_store_data.h" namespace Service::Mii { @@ -25,7 +28,7 @@ public: CharInfo BuildDefault(std::size_t index); CharInfo ConvertV3ToCharInfo(const Ver3StoreData& mii_v3) const; bool ValidateV3Info(const Ver3StoreData& mii_v3) const; - std::vector GetDefault(SourceFlag source_flag); + std::vector GetDefault(SourceFlag source_flag); Result GetIndex(const CharInfo& info, u32& index); // This is nn::mii::detail::Ver::StoreDataRaw::BuildFromStoreData @@ -34,6 +37,15 @@ public: // This is nn::mii::detail::NfpStoreDataExtentionRaw::SetFromStoreData NfpStoreDataExtension SetFromStoreData(const CharInfo& mii) const; + struct MiiDatabase { + u32 magic{}; // 'NFDB' + std::array miis{}; + INSERT_PADDING_BYTES(1); + u8 count{}; + u16 crc{}; + }; + static_assert(sizeof(MiiDatabase) == 0x1A98, "MiiDatabase has incorrect size."); + private: const Common::UUID user_id{}; u64 update_counter{}; diff --git a/src/core/hle/service/mii/mii_types.h b/src/core/hle/service/mii/mii_types.h new file mode 100644 index 000000000..ff836dcf2 --- /dev/null +++ b/src/core/hle/service/mii/mii_types.h @@ -0,0 +1,157 @@ +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include + +#include "common/bit_field.h" +#include "common/common_funcs.h" +#include "common/common_types.h" +#include "common/uuid.h" + +namespace Service::Mii { + +enum class Age : u32 { + Young, + Normal, + Old, + All, +}; + +enum class BeardType : u32 { + None, + Beard1, + Beard2, + Beard3, + Beard4, + Beard5, +}; + +enum class BeardAndMustacheFlag : u32 { + Beard = 1, + Mustache, + All = Beard | Mustache, +}; +DECLARE_ENUM_FLAG_OPERATORS(BeardAndMustacheFlag); + +enum class FontRegion : u32 { + Standard, + China, + Korea, + Taiwan, +}; + +enum class Gender : u32 { + Male, + Female, + All, + Maximum = Female, +}; + +enum class HairFlip : u32 { + Left, + Right, + Maximum = Right, +}; + +enum class MustacheType : u32 { + None, + Mustache1, + Mustache2, + Mustache3, + Mustache4, + Mustache5, +}; + +enum class Race : u32 { + Black, + White, + Asian, + All, +}; + +enum class Source : u32 { + Database = 0, + Default = 1, + Account = 2, + Friend = 3, +}; + +enum class SourceFlag : u32 { + None = 0, + Database = 1 << 0, + Default = 1 << 1, +}; +DECLARE_ENUM_FLAG_OPERATORS(SourceFlag); + +using Nickname = std::array; + +struct NfpStoreDataExtension { + 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"); + +struct DefaultMii { + u32 face_type{}; + u32 face_color{}; + u32 face_wrinkle{}; + u32 face_makeup{}; + u32 hair_type{}; + u32 hair_color{}; + HairFlip hair_flip{}; + u32 eye_type{}; + u32 eye_color{}; + u32 eye_scale{}; + u32 eye_aspect{}; + u32 eye_rotate{}; + u32 eye_x{}; + u32 eye_y{}; + u32 eyebrow_type{}; + u32 eyebrow_color{}; + u32 eyebrow_scale{}; + u32 eyebrow_aspect{}; + u32 eyebrow_rotate{}; + u32 eyebrow_x{}; + u32 eyebrow_y{}; + u32 nose_type{}; + u32 nose_scale{}; + u32 nose_y{}; + u32 mouth_type{}; + u32 mouth_color{}; + u32 mouth_scale{}; + u32 mouth_aspect{}; + u32 mouth_y{}; + MustacheType mustache_type{}; + BeardType beard_type{}; + u32 beard_color{}; + u32 mustache_scale{}; + u32 mustache_y{}; + u32 glasses_type{}; + u32 glasses_color{}; + u32 glasses_scale{}; + u32 glasses_y{}; + u32 mole_type{}; + u32 mole_scale{}; + u32 mole_x{}; + u32 mole_y{}; + u32 height{}; + u32 weight{}; + Gender gender{}; + u32 favorite_color{}; + u32 region_move{}; + FontRegion font_region{}; + u32 type{}; + Nickname nickname; +}; +static_assert(sizeof(DefaultMii) == 0xd8, "MiiStoreData has incorrect size."); + +} // namespace Service::Mii diff --git a/src/core/hle/service/mii/mii_util.h b/src/core/hle/service/mii/mii_util.h index d98f83825..782ffe22f 100644 --- a/src/core/hle/service/mii/mii_util.h +++ b/src/core/hle/service/mii/mii_util.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -8,7 +8,7 @@ #include "common/common_types.h" #include "common/swap.h" #include "common/uuid.h" -#include "core/hle/service/mii/types.h" +#include "core/hle/service/mii/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 deleted file mode 100644 index 070e2d199..000000000 --- a/src/core/hle/service/mii/raw_data.cpp +++ /dev/null @@ -1,1778 +0,0 @@ -// SPDX-FileCopyrightText: Ryujinx Team and Contributors -// SPDX-License-Identifier: MIT - -#include "core/hle/service/mii/raw_data.h" - -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, - .face_color = 0, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 33, - .hair_color = 1, - .hair_flip = HairFlip::Left, - .eye_type = 2, - .eye_color = 0, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 4, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 6, - .eyebrow_color = 1, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Male, - .favorite_color = 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, - .face_color = 0, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 12, - .hair_color = 1, - .hair_flip = HairFlip::Left, - .eye_type = 4, - .eye_color = 0, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 3, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 0, - .eyebrow_color = 1, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Female, - .favorite_color = 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 DefaultMii{ - Service::Mii::DefaultMii{ - .face_type = 0, - .face_color = 4, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 68, - .hair_color = 0, - .hair_flip = HairFlip::Left, - .eye_type = 2, - .eye_color = 0, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 4, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 6, - .eyebrow_color = 0, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Male, - .favorite_color = 4, - .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, - .face_color = 0, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 55, - .hair_color = 6, - .hair_flip = HairFlip::Left, - .eye_type = 2, - .eye_color = 4, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 4, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 6, - .eyebrow_color = 6, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Male, - .favorite_color = 5, - .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, - .face_color = 1, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 33, - .hair_color = 1, - .hair_flip = HairFlip::Left, - .eye_type = 2, - .eye_color = 0, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 4, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 6, - .eyebrow_color = 1, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Male, - .favorite_color = 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, - .face_color = 2, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 24, - .hair_color = 0, - .hair_flip = HairFlip::Left, - .eye_type = 4, - .eye_color = 0, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 3, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 0, - .eyebrow_color = 0, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Female, - .favorite_color = 2, - .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, - .face_color = 0, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 14, - .hair_color = 7, - .hair_flip = HairFlip::Left, - .eye_type = 4, - .eye_color = 5, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 3, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 0, - .eyebrow_color = 7, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Female, - .favorite_color = 6, - .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, - .face_color = 0, - .face_wrinkle = 0, - .face_makeup = 0, - .hair_type = 12, - .hair_color = 1, - .hair_flip = HairFlip::Left, - .eye_type = 4, - .eye_color = 0, - .eye_scale = 4, - .eye_aspect = 3, - .eye_rotate = 3, - .eye_x = 2, - .eye_y = 12, - .eyebrow_type = 0, - .eyebrow_color = 1, - .eyebrow_scale = 4, - .eyebrow_aspect = 3, - .eyebrow_rotate = 6, - .eyebrow_x = 2, - .eyebrow_y = 10, - .nose_type = 1, - .nose_scale = 4, - .nose_y = 9, - .mouth_type = 23, - .mouth_color = 0, - .mouth_scale = 4, - .mouth_aspect = 3, - .mouth_y = 13, - .mustache_type = MustacheType::None, - .beard_type = BeardType::None, - .beard_color = 0, - .mustache_scale = 4, - .mustache_y = 10, - .glasses_type = 0, - .glasses_color = 0, - .glasses_scale = 4, - .glasses_y = 10, - .mole_type = 0, - .mole_scale = 4, - .mole_x = 2, - .mole_y = 20, - .height = 64, - .weight = 64, - .gender = Gender::Female, - .favorite_color = 7, - .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{ - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::Black, - .values_count = 10, - .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::Black, - .values_count = 10, - .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::Black, - .values_count = 10, - .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Black, - .values_count = 10, - .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Black, - .values_count = 10, - .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Black, - .values_count = 10, - .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Asian, - .values_count = 12, - .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, - }, -}; - -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}, - }, - RandomMiiData3{ - .arg_1 = 0, - .arg_2 = 1, - .values_count = 10, - .values = {0, 0, 0, 0, 1, 1, 2, 3, 3, 3}, - }, - RandomMiiData3{ - .arg_1 = 0, - .arg_2 = 2, - .values_count = 10, - .values = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2}, - }, - RandomMiiData3{ - .arg_1 = 1, - .arg_2 = 0, - .values_count = 10, - .values = {2, 2, 4, 4, 4, 4, 5, 5, 5, 5}, - }, - RandomMiiData3{ - .arg_1 = 1, - .arg_2 = 1, - .values_count = 10, - .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 3}, - }, - RandomMiiData3{ - .arg_1 = 1, - .arg_2 = 2, - .values_count = 10, - .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, - }, -}; - -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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .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}, - }, -}; - -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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .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}, - }, -}; - -const std::array RandomMiiHairType{ - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::Black, - .values_count = 30, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::Black, - .values_count = 31, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::Black, - .values_count = 31, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::White, - .values_count = 38, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::White, - .values_count = 39, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::White, - .values_count = 39, - .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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Black, - .values_count = 39, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Black, - .values_count = 42, - .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, 72, 74, 77, 78, 82, 83, 84, 85, 87}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Black, - .values_count = 42, - .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, 72, 74, 77, 78, 82, 83, 84, 85, 87}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::White, - .values_count = 44, - .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::White, - .values_count = 44, - .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::White, - .values_count = 44, - .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Asian, - .values_count = 24, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Asian, - .values_count = 27, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Asian, - .values_count = 27, - .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}, - }, -}; - -const std::array RandomMiiHairColor{ - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData3{ - .arg_1 = 2, - .arg_2 = 2, - .values_count = 20, - .values = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, - }, -}; - -const std::array RandomMiiEyeType{ - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::Black, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::Black, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::Black, - .values_count = 27, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::White, - .values_count = 35, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::White, - .values_count = 35, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::White, - .values_count = 35, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::Asian, - .values_count = 30, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::Asian, - .values_count = 30, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::Asian, - .values_count = 30, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Black, - .values_count = 39, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Black, - .values_count = 39, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Black, - .values_count = 40, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::White, - .values_count = 46, - .values = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::White, - .values_count = 46, - .values = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::White, - .values_count = 46, - .values = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Asian, - .values_count = 34, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Asian, - .values_count = 34, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Asian, - .values_count = 35, - .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}, - }, -}; - -const std::array RandomMiiEyeColor{ - RandomMiiData2{ - .arg_1 = 0, - .values_count = 10, - .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, - }, - RandomMiiData2{ - .arg_1 = 1, - .values_count = 10, - .values = {0, 1, 1, 2, 3, 3, 4, 4, 4, 5}, - }, - RandomMiiData2{ - .arg_1 = 2, - .values_count = 10, - .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, - }, -}; - -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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::White, - .values_count = 23, - .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::White, - .values_count = 23, - .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::White, - .values_count = 23, - .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Black, - .values_count = 9, - .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Black, - .values_count = 9, - .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Black, - .values_count = 9, - .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Asian, - .values_count = 9, - .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Asian, - .values_count = 9, - .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Asian, - .values_count = 9, - .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, - }, -}; - -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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Black, - .values_count = 8, - .values = {0, 1, 3, 4, 8, 10, 13, 14}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Black, - .values_count = 8, - .values = {0, 1, 3, 4, 8, 10, 13, 14}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Black, - .values_count = 8, - .values = {0, 1, 3, 4, 8, 10, 13, 14}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::White, - .values_count = 10, - .values = {0, 1, 3, 4, 6, 8, 10, 11, 13, 14}, - }, - 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}, - }, - 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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Asian, - .values_count = 10, - .values = {0, 1, 3, 4, 6, 8, 10, 11, 13, 14}, - }, -}; - -const std::array RandomMiiMouthType{ - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::Black, - .values_count = 25, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::Black, - .values_count = 27, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::Black, - .values_count = 28, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::White, - .values_count = 24, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::White, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::White, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Young, - .race = Race::Asian, - .values_count = 24, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Normal, - .race = Race::Asian, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Male, - .age = Age::Old, - .race = Race::Asian, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Black, - .values_count = 25, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Black, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Black, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::White, - .values_count = 25, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::White, - .values_count = 26, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::White, - .values_count = 25, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Young, - .race = Race::Asian, - .values_count = 24, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Normal, - .race = Race::Asian, - .values_count = 25, - .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}, - }, - RandomMiiData4{ - .gender = Gender::Female, - .age = Age::Old, - .race = Race::Asian, - .values_count = 25, - .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}, - }, -}; - -const std::array RandomMiiGlassType{ - RandomMiiData2{ - .arg_1 = 0, - .values_count = 9, - .values = {90, 94, 96, 100, 0, 0, 0, 0, 0}, - }, - RandomMiiData2{ - .arg_1 = 1, - .values_count = 9, - .values = {83, 86, 90, 93, 94, 96, 98, 100, 0}, - }, - 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 deleted file mode 100644 index ab84d09a1..000000000 --- a/src/core/hle/service/mii/raw_data.h +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include - -#include "core/hle/service/mii/types.h" - -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 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 deleted file mode 100644 index cc8286189..000000000 --- a/src/core/hle/service/mii/types.h +++ /dev/null @@ -1,509 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include - -#include "common/bit_field.h" -#include "common/common_funcs.h" -#include "common/common_types.h" -#include "common/uuid.h" - -namespace Service::Mii { - -enum class Age : u32 { - Young, - Normal, - Old, - All, -}; - -enum class BeardType : u32 { - None, - Beard1, - Beard2, - Beard3, - Beard4, - Beard5, -}; - -enum class BeardAndMustacheFlag : u32 { - Beard = 1, - Mustache, - All = Beard | Mustache, -}; -DECLARE_ENUM_FLAG_OPERATORS(BeardAndMustacheFlag); - -enum class FontRegion : u32 { - Standard, - China, - Korea, - Taiwan, -}; - -enum class Gender : u32 { - Male, - Female, - All, - Maximum = Female, -}; - -enum class HairFlip : u32 { - Left, - Right, - Maximum = Right, -}; - -enum class MustacheType : u32 { - None, - Mustache1, - Mustache2, - Mustache3, - Mustache4, - Mustache5, -}; - -enum class Race : u32 { - Black, - White, - Asian, - All, -}; - -enum class Source : u32 { - Database = 0, - Default = 1, - Account = 2, - Friend = 3, -}; - -enum class SourceFlag : u32 { - None = 0, - Database = 1 << 0, - Default = 1 << 1, -}; -DECLARE_ENUM_FLAG_OPERATORS(SourceFlag); - -using Nickname = std::array; - -// nn::mii::CharInfo -struct CharInfo { - Common::UUID uuid; - std::array name; - u8 font_region; - u8 favorite_color; - u8 gender; - u8 height; - u8 build; - u8 type; - u8 region_move; - u8 faceline_type; - u8 faceline_color; - u8 faceline_wrinkle; - u8 faceline_make; - u8 hair_type; - u8 hair_color; - u8 hair_flip; - u8 eye_type; - u8 eye_color; - u8 eye_scale; - u8 eye_aspect; - u8 eye_rotate; - u8 eye_x; - u8 eye_y; - u8 eyebrow_type; - u8 eyebrow_color; - u8 eyebrow_scale; - u8 eyebrow_aspect; - u8 eyebrow_rotate; - u8 eyebrow_x; - u8 eyebrow_y; - u8 nose_type; - u8 nose_scale; - u8 nose_y; - u8 mouth_type; - u8 mouth_color; - u8 mouth_scale; - u8 mouth_aspect; - u8 mouth_y; - u8 beard_color; - u8 beard_type; - u8 mustache_type; - u8 mustache_scale; - u8 mustache_y; - u8 glasses_type; - u8 glasses_color; - u8 glasses_scale; - u8 glasses_y; - u8 mole_type; - u8 mole_scale; - u8 mole_x; - u8 mole_y; - u8 padding; -}; -static_assert(sizeof(CharInfo) == 0x58, "CharInfo has incorrect size."); -static_assert(std::has_unique_object_representations_v, - "All bits of CharInfo must contribute to its value."); - -#pragma pack(push, 4) - -struct MiiInfoElement { - MiiInfoElement(const CharInfo& info_, Source source_) : info{info_}, source{source_} {} - - CharInfo info{}; - Source source{}; -}; -static_assert(sizeof(MiiInfoElement) == 0x5c, "MiiInfoElement has incorrect size."); - -struct MiiStoreBitFields { - union { - u32 word_0{}; - - BitField<0, 8, u32> hair_type; - BitField<8, 7, u32> height; - BitField<15, 1, u32> mole_type; - BitField<16, 7, u32> build; - BitField<23, 1, HairFlip> hair_flip; - BitField<24, 7, u32> hair_color; - BitField<31, 1, u32> type; - }; - - union { - u32 word_1{}; - - BitField<0, 7, u32> eye_color; - BitField<7, 1, Gender> gender; - BitField<8, 7, u32> eyebrow_color; - BitField<16, 7, u32> mouth_color; - BitField<24, 7, u32> beard_color; - }; - - union { - u32 word_2{}; - - BitField<0, 7, u32> glasses_color; - BitField<8, 6, u32> eye_type; - BitField<14, 2, u32> region_move; - BitField<16, 6, u32> mouth_type; - BitField<22, 2, FontRegion> font_region; - BitField<24, 5, u32> eye_y; - BitField<29, 3, u32> glasses_scale; - }; - - union { - u32 word_3{}; - - BitField<0, 5, u32> eyebrow_type; - BitField<5, 3, MustacheType> mustache_type; - BitField<8, 5, u32> nose_type; - BitField<13, 3, BeardType> beard_type; - BitField<16, 5, u32> nose_y; - BitField<21, 3, u32> mouth_aspect; - BitField<24, 5, u32> mouth_y; - BitField<29, 3, u32> eyebrow_aspect; - }; - - union { - u32 word_4{}; - - BitField<0, 5, u32> mustache_y; - BitField<5, 3, u32> eye_rotate; - BitField<8, 5, u32> glasses_y; - BitField<13, 3, u32> eye_aspect; - BitField<16, 5, u32> mole_x; - BitField<21, 3, u32> eye_scale; - BitField<24, 5, u32> mole_y; - }; - - union { - u32 word_5{}; - - BitField<0, 5, u32> glasses_type; - BitField<8, 4, u32> favorite_color; - BitField<12, 4, u32> faceline_type; - BitField<16, 4, u32> faceline_color; - BitField<20, 4, u32> faceline_wrinkle; - BitField<24, 4, u32> faceline_makeup; - BitField<28, 4, u32> eye_x; - }; - - union { - u32 word_6{}; - - BitField<0, 4, u32> eyebrow_scale; - BitField<4, 4, u32> eyebrow_rotate; - BitField<8, 4, u32> eyebrow_x; - BitField<12, 4, u32> eyebrow_y; - BitField<16, 4, u32> nose_scale; - BitField<20, 4, u32> mouth_scale; - BitField<24, 4, u32> mustache_scale; - BitField<28, 4, u32> mole_scale; - }; -}; -static_assert(sizeof(MiiStoreBitFields) == 0x1c, "MiiStoreBitFields has incorrect size."); -static_assert(std::is_trivially_copyable_v, - "MiiStoreBitFields is not trivially copyable."); - -// 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 Ver3StoreData { - u8 version; - union { - u8 raw; - - BitField<0, 1, u8> allow_copying; - BitField<1, 1, u8> profanity_flag; - BitField<2, 2, u8> region_lock; - BitField<4, 2, u8> character_set; - } region_information; - u16_be mii_id; - u64_be system_id; - u32_be specialness_and_creation_date; - std::array creator_mac; - u16_be padding; - union { - u16 raw; - - BitField<0, 1, u16> gender; - BitField<1, 4, u16> birth_month; - BitField<5, 5, u16> birth_day; - BitField<10, 4, u16> favorite_color; - BitField<14, 1, u16> favorite; - } mii_information; - std::array mii_name; - u8 height; - u8 build; - union { - u8 raw; - - BitField<0, 1, u8> disable_sharing; - BitField<1, 4, u8> face_shape; - BitField<5, 3, u8> skin_color; - } appearance_bits1; - union { - u8 raw; - - BitField<0, 4, u8> wrinkles; - BitField<4, 4, u8> makeup; - } appearance_bits2; - u8 hair_style; - union { - u8 raw; - - BitField<0, 3, u8> hair_color; - BitField<3, 1, u8> flip_hair; - } appearance_bits3; - union { - u32 raw; - - 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; - } appearance_bits4; - union { - u32 raw; - - BitField<0, 5, u32> eyebrow_style; - 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; - } appearance_bits5; - union { - u16 raw; - - BitField<0, 5, u16> nose_type; - BitField<5, 4, u16> nose_scale; - BitField<9, 5, u16> nose_y_position; - } appearance_bits6; - union { - u16 raw; - - 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; - } appearance_bits7; - union { - u8 raw; - - BitField<0, 5, u8> mouth_y_position; - 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<6, 4, u16> mustache_scale; - BitField<10, 5, u16> mustache_y_position; - } 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; - } appearance_bits10; - union { - u16 raw; - - BitField<0, 1, u16> mole_enabled; - BitField<1, 4, u16> mole_scale; - BitField<5, 5, u16> mole_x_position; - BitField<10, 5, u16> mole_y_position; - } appearance_bits11; - - std::array author_name; - INSERT_PADDING_BYTES(0x2); - u16_be crc; -}; -static_assert(sizeof(Ver3StoreData) == 0x60, "Ver3StoreData is an invalid size"); - -struct NfpStoreDataExtension { - 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"); - -struct MiiStoreData { - - MiiStoreData(); - 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 - // BitField<> type makes this (and any thing that contains it) not trivially copyable, which is - // not suitable for our uses. - struct { - std::array data{}; - static_assert(sizeof(MiiStoreBitFields) == sizeof(data), "data field has incorrect size."); - - Nickname name{}; - Common::UUID uuid{}; - } data; - - u16 data_crc{}; - u16 device_crc{}; -}; -static_assert(sizeof(MiiStoreData) == 0x44, "MiiStoreData has incorrect size."); - -struct MiiStoreDataElement { - MiiStoreData data{}; - Source source{}; -}; -static_assert(sizeof(MiiStoreDataElement) == 0x48, "MiiStoreDataElement has incorrect size."); - -struct MiiDatabase { - u32 magic{}; // 'NFDB' - std::array miis{}; - INSERT_PADDING_BYTES(1); - u8 count{}; - u16 crc{}; -}; -static_assert(sizeof(MiiDatabase) == 0x1A98, "MiiDatabase has incorrect size."); - -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."); - -struct DefaultMii { - u32 face_type{}; - u32 face_color{}; - u32 face_wrinkle{}; - u32 face_makeup{}; - u32 hair_type{}; - u32 hair_color{}; - HairFlip hair_flip{}; - u32 eye_type{}; - u32 eye_color{}; - u32 eye_scale{}; - u32 eye_aspect{}; - u32 eye_rotate{}; - u32 eye_x{}; - u32 eye_y{}; - u32 eyebrow_type{}; - u32 eyebrow_color{}; - u32 eyebrow_scale{}; - u32 eyebrow_aspect{}; - u32 eyebrow_rotate{}; - u32 eyebrow_x{}; - u32 eyebrow_y{}; - u32 nose_type{}; - u32 nose_scale{}; - u32 nose_y{}; - u32 mouth_type{}; - u32 mouth_color{}; - u32 mouth_scale{}; - u32 mouth_aspect{}; - u32 mouth_y{}; - MustacheType mustache_type{}; - BeardType beard_type{}; - u32 beard_color{}; - u32 mustache_scale{}; - u32 mustache_y{}; - u32 glasses_type{}; - u32 glasses_color{}; - u32 glasses_scale{}; - u32 glasses_y{}; - u32 mole_type{}; - u32 mole_scale{}; - u32 mole_x{}; - u32 mole_y{}; - u32 height{}; - u32 weight{}; - Gender gender{}; - u32 favorite_color{}; - u32 region_move{}; - FontRegion font_region{}; - u32 type{}; - Nickname nickname; -}; -static_assert(sizeof(DefaultMii) == 0xd8, "MiiStoreData has incorrect size."); - -#pragma pack(pop) - -} // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/char_info.cpp b/src/core/hle/service/mii/types/char_info.cpp new file mode 100644 index 000000000..250fad44b --- /dev/null +++ b/src/core/hle/service/mii/types/char_info.cpp @@ -0,0 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/mii/types/char_info.h" + +namespace Service::Mii {} // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/char_info.h b/src/core/hle/service/mii/types/char_info.h new file mode 100644 index 000000000..5741b5089 --- /dev/null +++ b/src/core/hle/service/mii/types/char_info.h @@ -0,0 +1,76 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/mii/mii_types.h" + +namespace Service::Mii { + +// This is nn::mii::detail::CharInfoRaw +struct CharInfo { + Common::UUID create_id; + Nickname name; + u16 null_terminator; + u8 font_region; + u8 favorite_color; + u8 gender; + u8 height; + u8 build; + u8 type; + u8 region_move; + u8 faceline_type; + u8 faceline_color; + u8 faceline_wrinkle; + u8 faceline_make; + u8 hair_type; + u8 hair_color; + u8 hair_flip; + u8 eye_type; + u8 eye_color; + u8 eye_scale; + u8 eye_aspect; + u8 eye_rotate; + u8 eye_x; + u8 eye_y; + u8 eyebrow_type; + u8 eyebrow_color; + u8 eyebrow_scale; + u8 eyebrow_aspect; + u8 eyebrow_rotate; + u8 eyebrow_x; + u8 eyebrow_y; + u8 nose_type; + u8 nose_scale; + u8 nose_y; + u8 mouth_type; + u8 mouth_color; + u8 mouth_scale; + u8 mouth_aspect; + u8 mouth_y; + u8 beard_color; + u8 beard_type; + u8 mustache_type; + u8 mustache_scale; + u8 mustache_y; + u8 glasses_type; + u8 glasses_color; + u8 glasses_scale; + u8 glasses_y; + u8 mole_type; + u8 mole_scale; + u8 mole_x; + u8 mole_y; + u8 padding; +}; +static_assert(sizeof(CharInfo) == 0x58, "CharInfo has incorrect size."); +static_assert(std::has_unique_object_representations_v, + "All bits of CharInfo must contribute to its value."); + +struct CharInfoElement { + CharInfo char_info{}; + Source source{}; +}; +static_assert(sizeof(CharInfoElement) == 0x5c, "CharInfoElement has incorrect size."); + +}; // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/core_data.cpp b/src/core/hle/service/mii/types/core_data.cpp new file mode 100644 index 000000000..a7b12ad8d --- /dev/null +++ b/src/core/hle/service/mii/types/core_data.cpp @@ -0,0 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/mii/types/core_data.h" + +namespace Service::Mii {} // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/core_data.h b/src/core/hle/service/mii/types/core_data.h new file mode 100644 index 000000000..9dd7a5380 --- /dev/null +++ b/src/core/hle/service/mii/types/core_data.h @@ -0,0 +1,105 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/mii/mii_types.h" + +namespace Service::Mii { + +struct StoreDataBitFields { + union { + u32 word_0{}; + + BitField<0, 8, u32> hair_type; + BitField<8, 7, u32> height; + BitField<15, 1, u32> mole_type; + BitField<16, 7, u32> build; + BitField<23, 1, HairFlip> hair_flip; + BitField<24, 7, u32> hair_color; + BitField<31, 1, u32> type; + }; + + union { + u32 word_1{}; + + BitField<0, 7, u32> eye_color; + BitField<7, 1, Gender> gender; + BitField<8, 7, u32> eyebrow_color; + BitField<16, 7, u32> mouth_color; + BitField<24, 7, u32> beard_color; + }; + + union { + u32 word_2{}; + + BitField<0, 7, u32> glasses_color; + BitField<8, 6, u32> eye_type; + BitField<14, 2, u32> region_move; + BitField<16, 6, u32> mouth_type; + BitField<22, 2, FontRegion> font_region; + BitField<24, 5, u32> eye_y; + BitField<29, 3, u32> glasses_scale; + }; + + union { + u32 word_3{}; + + BitField<0, 5, u32> eyebrow_type; + BitField<5, 3, MustacheType> mustache_type; + BitField<8, 5, u32> nose_type; + BitField<13, 3, BeardType> beard_type; + BitField<16, 5, u32> nose_y; + BitField<21, 3, u32> mouth_aspect; + BitField<24, 5, u32> mouth_y; + BitField<29, 3, u32> eyebrow_aspect; + }; + + union { + u32 word_4{}; + + BitField<0, 5, u32> mustache_y; + BitField<5, 3, u32> eye_rotate; + BitField<8, 5, u32> glasses_y; + BitField<13, 3, u32> eye_aspect; + BitField<16, 5, u32> mole_x; + BitField<21, 3, u32> eye_scale; + BitField<24, 5, u32> mole_y; + }; + + union { + u32 word_5{}; + + BitField<0, 5, u32> glasses_type; + BitField<8, 4, u32> favorite_color; + BitField<12, 4, u32> faceline_type; + BitField<16, 4, u32> faceline_color; + BitField<20, 4, u32> faceline_wrinkle; + BitField<24, 4, u32> faceline_makeup; + BitField<28, 4, u32> eye_x; + }; + + union { + u32 word_6{}; + + BitField<0, 4, u32> eyebrow_scale; + BitField<4, 4, u32> eyebrow_rotate; + BitField<8, 4, u32> eyebrow_x; + BitField<12, 4, u32> eyebrow_y; + BitField<16, 4, u32> nose_scale; + BitField<20, 4, u32> mouth_scale; + BitField<24, 4, u32> mustache_scale; + BitField<28, 4, u32> mole_scale; + }; +}; +static_assert(sizeof(StoreDataBitFields) == 0x1c, "StoreDataBitFields has incorrect size."); +static_assert(std::is_trivially_copyable_v, + "StoreDataBitFields is not trivially copyable."); + +struct CoreData { + StoreDataBitFields data{}; + Nickname name{}; +}; +static_assert(sizeof(CoreData) == 0x30, "CoreData has incorrect size."); + +}; // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/raw_data.cpp b/src/core/hle/service/mii/types/raw_data.cpp new file mode 100644 index 000000000..ef678c527 --- /dev/null +++ b/src/core/hle/service/mii/types/raw_data.cpp @@ -0,0 +1,1778 @@ +// SPDX-FileCopyrightText: Ryujinx Team and Contributors +// SPDX-License-Identifier: MIT + +#include "core/hle/service/mii/types/raw_data.h" + +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, + .face_color = 0, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 33, + .hair_color = 1, + .hair_flip = HairFlip::Left, + .eye_type = 2, + .eye_color = 0, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 4, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 6, + .eyebrow_color = 1, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Male, + .favorite_color = 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, + .face_color = 0, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 12, + .hair_color = 1, + .hair_flip = HairFlip::Left, + .eye_type = 4, + .eye_color = 0, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 3, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 0, + .eyebrow_color = 1, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Female, + .favorite_color = 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 DefaultMii{ + Service::Mii::DefaultMii{ + .face_type = 0, + .face_color = 4, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 68, + .hair_color = 0, + .hair_flip = HairFlip::Left, + .eye_type = 2, + .eye_color = 0, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 4, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 6, + .eyebrow_color = 0, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Male, + .favorite_color = 4, + .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, + .face_color = 0, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 55, + .hair_color = 6, + .hair_flip = HairFlip::Left, + .eye_type = 2, + .eye_color = 4, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 4, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 6, + .eyebrow_color = 6, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Male, + .favorite_color = 5, + .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, + .face_color = 1, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 33, + .hair_color = 1, + .hair_flip = HairFlip::Left, + .eye_type = 2, + .eye_color = 0, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 4, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 6, + .eyebrow_color = 1, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Male, + .favorite_color = 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, + .face_color = 2, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 24, + .hair_color = 0, + .hair_flip = HairFlip::Left, + .eye_type = 4, + .eye_color = 0, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 3, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 0, + .eyebrow_color = 0, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Female, + .favorite_color = 2, + .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, + .face_color = 0, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 14, + .hair_color = 7, + .hair_flip = HairFlip::Left, + .eye_type = 4, + .eye_color = 5, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 3, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 0, + .eyebrow_color = 7, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Female, + .favorite_color = 6, + .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, + .face_color = 0, + .face_wrinkle = 0, + .face_makeup = 0, + .hair_type = 12, + .hair_color = 1, + .hair_flip = HairFlip::Left, + .eye_type = 4, + .eye_color = 0, + .eye_scale = 4, + .eye_aspect = 3, + .eye_rotate = 3, + .eye_x = 2, + .eye_y = 12, + .eyebrow_type = 0, + .eyebrow_color = 1, + .eyebrow_scale = 4, + .eyebrow_aspect = 3, + .eyebrow_rotate = 6, + .eyebrow_x = 2, + .eyebrow_y = 10, + .nose_type = 1, + .nose_scale = 4, + .nose_y = 9, + .mouth_type = 23, + .mouth_color = 0, + .mouth_scale = 4, + .mouth_aspect = 3, + .mouth_y = 13, + .mustache_type = MustacheType::None, + .beard_type = BeardType::None, + .beard_color = 0, + .mustache_scale = 4, + .mustache_y = 10, + .glasses_type = 0, + .glasses_color = 0, + .glasses_scale = 4, + .glasses_y = 10, + .mole_type = 0, + .mole_scale = 4, + .mole_x = 2, + .mole_y = 20, + .height = 64, + .weight = 64, + .gender = Gender::Female, + .favorite_color = 7, + .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{ + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::Black, + .values_count = 10, + .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::Black, + .values_count = 10, + .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::Black, + .values_count = 10, + .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Black, + .values_count = 10, + .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Black, + .values_count = 10, + .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Black, + .values_count = 10, + .values = {0, 0, 1, 1, 2, 3, 4, 5, 9, 9}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Asian, + .values_count = 12, + .values = {0, 0, 0, 1, 1, 1, 2, 3, 4, 5, 8, 10}, + }, +}; + +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}, + }, + RandomMiiData3{ + .arg_1 = 0, + .arg_2 = 1, + .values_count = 10, + .values = {0, 0, 0, 0, 1, 1, 2, 3, 3, 3}, + }, + RandomMiiData3{ + .arg_1 = 0, + .arg_2 = 2, + .values_count = 10, + .values = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2}, + }, + RandomMiiData3{ + .arg_1 = 1, + .arg_2 = 0, + .values_count = 10, + .values = {2, 2, 4, 4, 4, 4, 5, 5, 5, 5}, + }, + RandomMiiData3{ + .arg_1 = 1, + .arg_2 = 1, + .values_count = 10, + .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 3}, + }, + RandomMiiData3{ + .arg_1 = 1, + .arg_2 = 2, + .values_count = 10, + .values = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + }, +}; + +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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .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}, + }, +}; + +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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .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}, + }, +}; + +const std::array RandomMiiHairType{ + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::Black, + .values_count = 30, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::Black, + .values_count = 31, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::Black, + .values_count = 31, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::White, + .values_count = 38, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::White, + .values_count = 39, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::White, + .values_count = 39, + .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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Black, + .values_count = 39, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Black, + .values_count = 42, + .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, 72, 74, 77, 78, 82, 83, 84, 85, 87}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Black, + .values_count = 42, + .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, 72, 74, 77, 78, 82, 83, 84, 85, 87}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::White, + .values_count = 44, + .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::White, + .values_count = 44, + .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::White, + .values_count = 44, + .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Asian, + .values_count = 24, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Asian, + .values_count = 27, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Asian, + .values_count = 27, + .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}, + }, +}; + +const std::array RandomMiiHairColor{ + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData3{ + .arg_1 = 2, + .arg_2 = 2, + .values_count = 20, + .values = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + }, +}; + +const std::array RandomMiiEyeType{ + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::Black, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::Black, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::Black, + .values_count = 27, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::White, + .values_count = 35, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::White, + .values_count = 35, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::White, + .values_count = 35, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::Asian, + .values_count = 30, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::Asian, + .values_count = 30, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::Asian, + .values_count = 30, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Black, + .values_count = 39, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Black, + .values_count = 39, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Black, + .values_count = 40, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::White, + .values_count = 46, + .values = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::White, + .values_count = 46, + .values = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::White, + .values_count = 46, + .values = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Asian, + .values_count = 34, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Asian, + .values_count = 34, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Asian, + .values_count = 35, + .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}, + }, +}; + +const std::array RandomMiiEyeColor{ + RandomMiiData2{ + .arg_1 = 0, + .values_count = 10, + .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + }, + RandomMiiData2{ + .arg_1 = 1, + .values_count = 10, + .values = {0, 1, 1, 2, 3, 3, 4, 4, 4, 5}, + }, + RandomMiiData2{ + .arg_1 = 2, + .values_count = 10, + .values = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + }, +}; + +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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::White, + .values_count = 23, + .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::White, + .values_count = 23, + .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::White, + .values_count = 23, + .values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Black, + .values_count = 9, + .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Black, + .values_count = 9, + .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Black, + .values_count = 9, + .values = {0, 1, 3, 7, 8, 9, 10, 11, 13}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Asian, + .values_count = 9, + .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Asian, + .values_count = 9, + .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Asian, + .values_count = 9, + .values = {0, 3, 7, 8, 9, 10, 11, 13, 15}, + }, +}; + +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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Black, + .values_count = 8, + .values = {0, 1, 3, 4, 8, 10, 13, 14}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Black, + .values_count = 8, + .values = {0, 1, 3, 4, 8, 10, 13, 14}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Black, + .values_count = 8, + .values = {0, 1, 3, 4, 8, 10, 13, 14}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::White, + .values_count = 10, + .values = {0, 1, 3, 4, 6, 8, 10, 11, 13, 14}, + }, + 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}, + }, + 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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Asian, + .values_count = 10, + .values = {0, 1, 3, 4, 6, 8, 10, 11, 13, 14}, + }, +}; + +const std::array RandomMiiMouthType{ + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::Black, + .values_count = 25, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::Black, + .values_count = 27, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::Black, + .values_count = 28, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::White, + .values_count = 24, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::White, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::White, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Young, + .race = Race::Asian, + .values_count = 24, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Normal, + .race = Race::Asian, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Male, + .age = Age::Old, + .race = Race::Asian, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Black, + .values_count = 25, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Black, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Black, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::White, + .values_count = 25, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::White, + .values_count = 26, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::White, + .values_count = 25, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Young, + .race = Race::Asian, + .values_count = 24, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Normal, + .race = Race::Asian, + .values_count = 25, + .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}, + }, + RandomMiiData4{ + .gender = Gender::Female, + .age = Age::Old, + .race = Race::Asian, + .values_count = 25, + .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}, + }, +}; + +const std::array RandomMiiGlassType{ + RandomMiiData2{ + .arg_1 = 0, + .values_count = 9, + .values = {90, 94, 96, 100, 0, 0, 0, 0, 0}, + }, + RandomMiiData2{ + .arg_1 = 1, + .values_count = 9, + .values = {83, 86, 90, 93, 94, 96, 98, 100, 0}, + }, + 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/types/raw_data.h b/src/core/hle/service/mii/types/raw_data.h new file mode 100644 index 000000000..180f49fd0 --- /dev/null +++ b/src/core/hle/service/mii/types/raw_data.h @@ -0,0 +1,73 @@ +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +#include "core/hle/service/mii/mii_types.h" + +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 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/store_data.cpp b/src/core/hle/service/mii/types/store_data.cpp new file mode 100644 index 000000000..aadc0e1af --- /dev/null +++ b/src/core/hle/service/mii/types/store_data.cpp @@ -0,0 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/mii/types/store_data.h" + +namespace Service::Mii {} // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/store_data.h b/src/core/hle/service/mii/types/store_data.h new file mode 100644 index 000000000..54a263b05 --- /dev/null +++ b/src/core/hle/service/mii/types/store_data.h @@ -0,0 +1,29 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/mii/mii_types.h" +#include "core/hle/service/mii/types/core_data.h" + +namespace Service::Mii { + +struct StoreData { + StoreData(); + StoreData(const Nickname& name, const StoreDataBitFields& bit_fields, + const Common::UUID& user_id); + + CoreData core_data{}; + Common::UUID create_id{}; + u16 data_crc{}; + u16 device_crc{}; +}; +static_assert(sizeof(StoreData) == 0x44, "StoreData has incorrect size."); + +struct StoreDataElement { + StoreData store_data{}; + Source source{}; +}; +static_assert(sizeof(StoreDataElement) == 0x48, "StoreDataElement has incorrect size."); + +}; // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/ver3_store_data.cpp b/src/core/hle/service/mii/types/ver3_store_data.cpp new file mode 100644 index 000000000..4c8904c12 --- /dev/null +++ b/src/core/hle/service/mii/types/ver3_store_data.cpp @@ -0,0 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/mii/types/ver3_store_data.h" + +namespace Service::Mii {} // namespace Service::Mii diff --git a/src/core/hle/service/mii/types/ver3_store_data.h b/src/core/hle/service/mii/types/ver3_store_data.h new file mode 100644 index 000000000..c3963548c --- /dev/null +++ b/src/core/hle/service/mii/types/ver3_store_data.h @@ -0,0 +1,141 @@ +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/mii/mii_types.h" +#include "core/hle/service/mii/types/core_data.h" +#include "core/hle/service/mii/types/store_data.h" + +namespace Service::Mii { + +// 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 + +#pragma pack(push, 4) +struct Ver3StoreData { + u8 version; + union { + u8 raw; + + BitField<0, 1, u8> allow_copying; + BitField<1, 1, u8> profanity_flag; + BitField<2, 2, u8> region_lock; + BitField<4, 2, u8> character_set; + } region_information; + u16_be mii_id; + u64_be system_id; + u32_be specialness_and_creation_date; + std::array creator_mac; + u16_be padding; + union { + u16 raw; + + BitField<0, 1, u16> gender; + BitField<1, 4, u16> birth_month; + BitField<5, 5, u16> birth_day; + BitField<10, 4, u16> favorite_color; + BitField<14, 1, u16> favorite; + } mii_information; + std::array mii_name; + u8 height; + u8 build; + union { + u8 raw; + + BitField<0, 1, u8> disable_sharing; + BitField<1, 4, u8> face_shape; + BitField<5, 3, u8> skin_color; + } appearance_bits1; + union { + u8 raw; + + BitField<0, 4, u8> wrinkles; + BitField<4, 4, u8> makeup; + } appearance_bits2; + u8 hair_style; + union { + u8 raw; + + BitField<0, 3, u8> hair_color; + BitField<3, 1, u8> flip_hair; + } appearance_bits3; + union { + u32 raw; + + 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; + } appearance_bits4; + union { + u32 raw; + + BitField<0, 5, u32> eyebrow_style; + 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; + } appearance_bits5; + union { + u16 raw; + + BitField<0, 5, u16> nose_type; + BitField<5, 4, u16> nose_scale; + BitField<9, 5, u16> nose_y_position; + } appearance_bits6; + union { + u16 raw; + + 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; + } appearance_bits7; + union { + u8 raw; + + BitField<0, 5, u8> mouth_y_position; + 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<6, 4, u16> mustache_scale; + BitField<10, 5, u16> mustache_y_position; + } 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; + } appearance_bits10; + union { + u16 raw; + + BitField<0, 1, u16> mole_enabled; + BitField<1, 4, u16> mole_scale; + BitField<5, 5, u16> mole_x_position; + BitField<10, 5, u16> mole_y_position; + } appearance_bits11; + + std::array author_name; + INSERT_PADDING_BYTES(0x2); + u16_be crc; +}; +static_assert(sizeof(Ver3StoreData) == 0x60, "Ver3StoreData is an invalid size"); +#pragma pack(pop) + +}; // namespace Service::Mii diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 5df40f9a0..44ac8cc71 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -28,7 +28,6 @@ #include "core/hle/kernel/k_event.h" #include "core/hle/service/ipc_helpers.h" #include "core/hle/service/mii/mii_manager.h" -#include "core/hle/service/mii/types.h" #include "core/hle/service/nfc/common/amiibo_crypto.h" #include "core/hle/service/nfc/common/device.h" #include "core/hle/service/nfc/mifare_result.h" diff --git a/src/core/hle/service/nfp/nfp_types.h b/src/core/hle/service/nfp/nfp_types.h index aed12a7f8..adcaa8e84 100644 --- a/src/core/hle/service/nfp/nfp_types.h +++ b/src/core/hle/service/nfp/nfp_types.h @@ -6,7 +6,8 @@ #include #include "common/swap.h" -#include "core/hle/service/mii/types.h" +#include "core/hle/service/mii/types/char_info.h" +#include "core/hle/service/mii/types/ver3_store_data.h" #include "core/hle/service/nfc/nfc_types.h" namespace Service::NFP { @@ -322,7 +323,7 @@ static_assert(sizeof(RegisterInfo) == 0x100, "RegisterInfo is an invalid size"); // This is nn::nfp::RegisterInfoPrivate struct RegisterInfoPrivate { - Service::Mii::MiiStoreData mii_store_data; + Service::Mii::StoreData mii_store_data; WriteDate creation_date; AmiiboName amiibo_name; u8 font_region; -- cgit v1.2.3