mii.h
Go to the documentation of this file.
/**
* @file mii.h
* @brief Shared Mii struct.
*
* @see https://www.3dbrew.org/wiki/Mii#Mii_format
*/
#pragma once
#include <3ds/types.h>
/// Shared Mii struct
typedef struct
{
u8 magic; ///< Always 3?
/// Mii options
struct
{
bool allow_copying : 1; ///< True if copying is allowed
bool is_private_name : 1; ///< Private name?
u8 region_lock : 2; ///< Region lock (0=no lock, 1=JPN, 2=USA, 3=EUR)
u8 char_set : 2; ///< Character set (0=JPN+USA+EUR, 1=CHN, 2=KOR, 3=TWN)
} mii_options;
/// Mii position in Mii selector or Mii maker
struct
{
u8 page_index : 4; ///< Page index of Mii
u8 slot_index : 4; ///< Slot offset of Mii on its Page
} mii_pos;
/// Console Identity
struct
{
u8 unknown0 : 4; ///< Mabye padding (always seems to be 0)?
u8 origin_console : 3; ///< Console that the Mii was created on (1=WII, 2=DSI, 3=3DS)
} console_identity;
u64 system_id; ///< Identifies the system that the Mii was created on (Determines pants)
u32 mii_id; ///< ID of Mii
u8 mac[6]; ///< Creator's system's full MAC address
u8 pad[2]; ///< Padding
/// Mii details
struct {
bool sex : 1; ///< Sex of Mii (False=Male, True=Female)
u16 bday_month : 4; ///< Month of Mii's birthday
u16 bday_day : 5; ///< Day of Mii's birthday
u16 shirt_color : 4; ///< Color of Mii's shirt
bool favorite : 1; ///< Whether the Mii is one of your 10 favorite Mii's
} mii_details;
u16 mii_name[10]; ///< Name of Mii (Encoded using UTF16)
u8 height; ///< How tall the Mii is
u8 width; ///< How wide the Mii is
/// Face style
struct
{
bool disable_sharing : 1; ///< Whether or not Sharing of the Mii is allowed
u8 shape : 4; ///< Face shape
u8 skinColor : 3; ///< Color of skin
} face_style;
/// Face details
struct
{
u8 wrinkles : 4;
u8 makeup : 4;
} face_details;
u8 hair_style;
/// Hair details
struct
{
u8 color : 3;
bool flip : 1;
} hair_details;
/// Eye details
struct
{
u32 style : 6;
u32 color : 3;
u32 scale : 4;
u32 yscale : 3;
u32 rotation : 5;
u32 xspacing : 4;
u32 yposition : 5;
} eye_details;
/// Eyebrow details
struct
{
u32 style : 5;
u32 color : 3;
u32 scale : 4;
u32 yscale : 3;
u32 pad : 1;
u32 rotation : 5;
u32 xspacing : 4;
u32 yposition : 5;
} eyebrow_details;
/// Nose details
struct
{
u16 style : 5;
u16 scale : 4;
u16 yposition : 5;
} nose_details;
/// Mouth details
struct
{
u16 style : 6;
u16 color : 3;
u16 scale : 4;
u16 yscale : 3;
} mouth_details;
/// Mustache details
struct
{
u16 mouth_yposition : 5;
u16 mustach_style : 3;
u16 pad : 2;
} mustache_details;
/// Beard details
struct
{
u16 style : 3;
u16 color : 3;
u16 scale : 4;
u16 ypos : 5;
} beard_details;
/// Glasses details
struct
{
u16 style : 4;
u16 color : 3;
u16 scale : 4;
u16 ypos : 5;
} glasses_details;
/// Mole details
struct
{
bool enable : 1;
u16 scale : 5;
u16 xpos : 5;
u16 ypos : 5;
} mole_details;
u16 author_name[10]; ///< Name of Mii's author (Encoded using UTF16)
} CTR_PACKED MiiData;
MiiData
Shared Mii struct.
Definition: mii.h:13
MiiData::favorite
bool favorite
Whether the Mii is one of your 10 favorite Mii's.
Definition: mii.h:50
MiiData::is_private_name
bool is_private_name
Private name?
Definition: mii.h:20
MiiData::skinColor
u8 skinColor
Color of skin.
Definition: mii.h:62
MiiData::slot_index
u8 slot_index
Slot offset of Mii on its Page.
Definition: mii.h:29
MiiData::width
u8 width
How wide the Mii is.
Definition: mii.h:55
MiiData::shape
u8 shape
Face shape.
Definition: mii.h:61
MiiData::magic
u8 magic
Always 3?
Definition: mii.h:14
MiiData::height
u8 height
How tall the Mii is.
Definition: mii.h:54
MiiData::system_id
u64 system_id
Identifies the system that the Mii was created on (Determines pants)
Definition: mii.h:39
MiiData::mii_id
u32 mii_id
ID of Mii.
Definition: mii.h:40
MiiData::page_index
u8 page_index
Page index of Mii.
Definition: mii.h:28
MiiData::shirt_color
u16 shirt_color
Color of Mii's shirt.
Definition: mii.h:49
MiiData::disable_sharing
bool disable_sharing
Whether or not Sharing of the Mii is allowed.
Definition: mii.h:60
MiiData::bday_month
u16 bday_month
Month of Mii's birthday.
Definition: mii.h:47
MiiData::bday_day
u16 bday_day
Day of Mii's birthday.
Definition: mii.h:48
MiiData::origin_console
u8 origin_console
Console that the Mii was created on (1=WII, 2=DSI, 3=3DS)
Definition: mii.h:36
MiiData::char_set
u8 char_set
Character set (0=JPN+USA+EUR, 1=CHN, 2=KOR, 3=TWN)
Definition: mii.h:22
MiiData::allow_copying
bool allow_copying
True if copying is allowed.
Definition: mii.h:19
MiiData::unknown0
u8 unknown0
Mabye padding (always seems to be 0)?
Definition: mii.h:35
MiiData::region_lock
u8 region_lock
Region lock (0=no lock, 1=JPN, 2=USA, 3=EUR)
Definition: mii.h:21
MiiData::sex
bool sex
Sex of Mii (False=Male, True=Female)
Definition: mii.h:46
types.h
Various system types.
u64
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
CTR_PACKED
#define CTR_PACKED
Packs a struct (and other types?) so it won't include padding bytes.
Definition: types.h:52
u8
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
u16
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
u32
uint32_t u32
32-bit unsigned integer
Definition: types.h:23