summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-03-17 10:15:48 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2022-03-22 04:57:31 +0100
commit1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6 (patch)
treeaa38e1ec1a427a866a11d9d75f42a8929ed49fdf /src/core/hle/service/am
parentapplets/mii: Move MiiEdit applet types into its own file (diff)
downloadyuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.tar
yuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.tar.gz
yuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.tar.bz2
yuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.tar.lz
yuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.tar.xz
yuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.tar.zst
yuzu-1d5f6b173d7a48cd6fb1b8d637b587e586e6acb6.zip
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit_types.h67
1 files changed, 44 insertions, 23 deletions
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 7b8b35254..70dea0007 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
@@ -12,8 +12,13 @@
namespace Service::AM::Applets {
+enum class MiiEditAppletVersion : s32 {
+ Version3 = 0x3, // 1.0.0 - 10.1.1
+ Version4 = 0x4, // 10.2.0+
+};
+
// This is nn::mii::AppletMode
-enum class MiiAppletMode : u32 {
+enum class MiiEditAppletMode : u32 {
ShowMiiEdit = 0,
AppendMii = 1,
AppendMiiImage = 2,
@@ -22,41 +27,57 @@ enum class MiiAppletMode : u32 {
EditMii = 5,
};
-struct MiiCharInfo {
- Service::Mii::MiiInfo mii_data{};
- INSERT_PADDING_BYTES(0x28);
+enum class MiiEditResult : u32 {
+ Success,
+ Cancel,
+};
+
+struct MiiEditCharInfo {
+ Service::Mii::MiiInfo mii_info{};
+};
+static_assert(sizeof(MiiEditCharInfo) == 0x58, "MiiEditCharInfo has incorrect size.");
+
+struct MiiEditAppletInputCommon {
+ MiiEditAppletVersion version{};
+ MiiEditAppletMode applet_mode{};
+};
+static_assert(sizeof(MiiEditAppletInputCommon) == 0x8,
+ "MiiEditAppletInputCommon has incorrect size.");
+
+struct MiiEditAppletInputV3 {
+ u32 special_mii_key_code{};
+ std::array<Common::UUID, 8> valid_uuids{};
+ Common::UUID used_uuid{};
+ INSERT_PADDING_BYTES(0x64);
};
-static_assert(sizeof(MiiCharInfo) == 0x80, "MiiCharInfo has incorrect size.");
+static_assert(sizeof(MiiEditAppletInputV3) == 0x100 - sizeof(MiiEditAppletInputCommon),
+ "MiiEditAppletInputV3 has incorrect size.");
-// This is nn::mii::AppletInput
-struct MiiAppletInput {
- s32 version{};
- MiiAppletMode applet_mode{};
+struct MiiEditAppletInputV4 {
u32 special_mii_key_code{};
- union {
- std::array<Common::UUID, 8> valid_uuid;
- MiiCharInfo mii_char_info;
- };
- Common::UUID used_uuid;
+ MiiEditCharInfo char_info{};
+ INSERT_PADDING_BYTES(0x28);
+ Common::UUID used_uuid{};
INSERT_PADDING_BYTES(0x64);
};
-static_assert(sizeof(MiiAppletInput) == 0x100, "MiiAppletInput has incorrect size.");
+static_assert(sizeof(MiiEditAppletInputV4) == 0x100 - sizeof(MiiEditAppletInputCommon),
+ "MiiEditAppletInputV4 has incorrect size.");
// This is nn::mii::AppletOutput
-struct MiiAppletOutput {
- u32 result{};
+struct MiiEditAppletOutput {
+ MiiEditResult result{};
s32 index{};
INSERT_PADDING_BYTES(0x18);
};
-static_assert(sizeof(MiiAppletOutput) == 0x20, "MiiAppletOutput has incorrect size.");
+static_assert(sizeof(MiiEditAppletOutput) == 0x20, "MiiEditAppletOutput has incorrect size.");
// This is nn::mii::AppletOutputForCharInfoEditing
-struct AppletOutputForCharInfoEditing {
- u32 result{};
- Service::Mii::MiiInfo mii_data{};
+struct MiiEditAppletOutputForCharInfoEditing {
+ MiiEditResult result{};
+ MiiEditCharInfo char_info{};
INSERT_PADDING_BYTES(0x24);
};
-static_assert(sizeof(AppletOutputForCharInfoEditing) == 0x80,
- "AppletOutputForCharInfoEditing has incorrect size.");
+static_assert(sizeof(MiiEditAppletOutputForCharInfoEditing) == 0x80,
+ "MiiEditAppletOutputForCharInfoEditing has incorrect size.");
} // namespace Service::AM::Applets