Begin documentation of mii.h

This commit is contained in:
Oreo639 2019-04-27 19:28:23 -07:00
parent 16e5db5748
commit 30f2879a13
2 changed files with 50 additions and 28 deletions

View File

@ -1983,7 +1983,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
@ -1991,7 +1991,7 @@ MACRO_EXPANSION = NO
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = NO
EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
@ -2023,7 +2023,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
PREDEFINED = PACKED
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The

View File

@ -1,55 +1,68 @@
/**
* @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;
u8 magic; ///< Always 3?
/// Mii options
struct
{
bool allow_copying : 1;
bool is_private_name : 1;
u8 region_lock : 2;
u8 char_set : 2;
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;
u8 slot_index : 4;
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;
u8 origin_console : 3;
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;
u32 mii_id;
u8 mac[6];
u8 pad[2];
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;
u16 month : 4;
u16 day : 5;
u16 color : 4;
bool favorite : 1;
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; ///< Wether the Mii is one of your 10 favorite Mii's
} mii_details;
u16 mii_name[10];
u8 height;
u8 width;
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;
u8 shape : 4;
u8 skinColor : 3;
bool disable_sharing : 1; ///< Wether 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;
@ -58,12 +71,14 @@ typedef struct
u8 hair_style;
/// Hair details
struct
{
u8 color : 3;
bool flip : 1;
} hair_details;
/// Eye details
struct
{
u32 style : 6;
@ -75,6 +90,7 @@ typedef struct
u32 yposition : 5;
} eye_details;
/// Eyebrow details
struct
{
u32 style : 5;
@ -87,6 +103,7 @@ typedef struct
u32 yposition : 5;
} eyebrow_details;
/// Nose details
struct
{
u16 style : 5;
@ -94,6 +111,7 @@ typedef struct
u16 yposition : 5;
} nose_details;
/// Mouse details
struct
{
u16 style : 6;
@ -102,6 +120,7 @@ typedef struct
u16 yscale : 3;
} mouse_details;
/// Mustache details
struct
{
u16 mouse_yposition : 5;
@ -109,6 +128,7 @@ typedef struct
u16 pad : 2;
} mustache_details;
/// Beard details
struct
{
u16 style : 3;
@ -117,6 +137,7 @@ typedef struct
u16 ypos : 5;
} beard_details;
/// Glasses details
struct
{
u16 style : 4;
@ -125,6 +146,7 @@ typedef struct
u16 ypos : 5;
} glasses_details;
/// Mole details
struct
{
bool enable : 1;
@ -133,5 +155,5 @@ typedef struct
u16 ypos : 5;
} mole_details;
u16 author_name[10];
u16 author_name[10]; ///< Name of Mii's author (Encoded using UTF16)
} PACKED MiiData;