//! This module contains the structs that represent all the data of a Mii.
//! This module contains the structs that represent all the data of a Mii.
//! This data is given by the [``MiiSelector``](crate::applets::mii_selector::MiiSelector)
//!
//! Have a look at the [`MiiSelector`](crate::applets::mii_selector::MiiSelector) applet to learn how to ask the user for a specific Mii.
/// Represents the region lock of the console.
/// Region lock of the Mii.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pubenumRegionLock{
pubenumRegionLock{
/// No region-lock.
/// No region-lock.
@ -16,7 +17,7 @@ pub enum RegionLock {
Europe,
Europe,
}
}
/// Represent the charset of the console.
/// Charset of the Mii.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pubenumCharset{
pubenumCharset{
/// Japan-USA-Europe unified charset.
/// Japan-USA-Europe unified charset.
@ -29,9 +30,9 @@ pub enum Charset {
Taiwan,
Taiwan,
}
}
/// Represents the options of the Mii.
/// Generic options of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructMiiDataOptions{
pubstructOptions{
/// Whether it is allowed to copy the Mii.
/// Whether it is allowed to copy the Mii.
pubis_copying_allowed: bool,
pubis_copying_allowed: bool,
/// Whether the profanity flag is active.
/// Whether the profanity flag is active.
@ -42,7 +43,7 @@ pub struct MiiDataOptions {
pubcharset: Charset,
pubcharset: Charset,
}
}
/// Represents the position that the Mii has on the selector.
/// Positional Index that the Mii has on the [`MiiSelector`](crate::applets::mii_selector::MiiSelector) window.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructSelectorPosition{
pubstructSelectorPosition{
/// Index of the page where the Mii is found.
/// Index of the page where the Mii is found.
@ -51,40 +52,42 @@ pub struct SelectorPosition {
pubslot_index: u8,
pubslot_index: u8,
}
}
/// Represents the console where the Mii originated from.
/// Console model from which the Mii originated.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pubenumOriginConsole{
pubenumOriginConsole{
/// Nintendo Wii.
/// Nintendo Wii.
Wii,
Wii,
/// Nintendo DSi.
/// Nintendo DSi.
DSi,
DSi,
/// Nintendo 3DS (both New 3DS and Old 3DS).
/// Nintendo 3DS.
///
/// This includes all consoles of the 3DS family (3DS, 2DS, and their respective "New" or "XL" variants).
N3DS,
N3DS,
/// Nintendo WiiU/Switch.
/// Nintendo WiiU/Switch.
WiiUSwitch,
WiiUSwitch,
}
}
/// Represents the identity of the origin console.
/// Identity of the origin console.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructConsoleIdentity{
pubstructConsoleIdentity{
/// From which console the Mii originated from.
/// From which console the Mii originated from.
puborigin_console: OriginConsole,
puborigin_console: OriginConsole,
}
}
/// Represents the sex of the Mii.
/// Sex of the Mii.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pubenumMiiSex{
pubenumSex{
/// Male sex.
/// Male sex.
Male,
Male,
/// Female sex.
/// Female sex.
Female,
Female,
}
}
/// Represents the details of the Mii.
/// Generic details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructDetails{
pubstructDetails{
/// Sex of the Mii.
/// Sex of the Mii.
pubsex: MiiSex,
pubsex: Sex,
/// Birthday month.
/// Birthday month.
pubbirthday_month: u8,
pubbirthday_month: u8,
/// Birthday day.
/// Birthday day.
@ -97,7 +100,7 @@ pub struct Details {
pubis_sharing_enabled: bool,
pubis_sharing_enabled: bool,
}
}
/// Represents the face style of the Mii.
/// Face style of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructFaceStyle{
pubstructFaceStyle{
/// Face shape.
/// Face shape.
@ -106,7 +109,7 @@ pub struct FaceStyle {
pubskin_color: u8,
pubskin_color: u8,
}
}
/// Represents the face details of the Mii.
/// Face details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructFaceDetails{
pubstructFaceDetails{
/// Face style.
/// Face style.
@ -117,7 +120,7 @@ pub struct FaceDetails {
pubmakeup: u8,
pubmakeup: u8,
}
}
/// Represents the hair details of the Mii.
/// Hair details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructHairDetails{
pubstructHairDetails{
/// Hair style.
/// Hair style.
@ -128,7 +131,7 @@ pub struct HairDetails {
pubis_flipped: bool,
pubis_flipped: bool,
}
}
/// Represents the eye details of the Mii.
/// Eye details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructEyeDetails{
pubstructEyeDetails{
/// Eye style.
/// Eye style.
@ -147,7 +150,7 @@ pub struct EyeDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents the eyebrow details of the Mii
/// Eyebrow details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructEyebrowDetails{
pubstructEyebrowDetails{
/// Eyebrow style.
/// Eyebrow style.
@ -166,7 +169,7 @@ pub struct EyebrowDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents the details of the nose
/// Nose details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructNoseDetails{
pubstructNoseDetails{
/// Nose style.
/// Nose style.
@ -177,7 +180,7 @@ pub struct NoseDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents the details of the mouth
/// Mouth details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructMouthDetails{
pubstructMouthDetails{
/// Mouth style.
/// Mouth style.
@ -192,14 +195,14 @@ pub struct MouthDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents the details of the mustache
/// Mustache details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructMustacheDetails{
pubstructMustacheDetails{
/// Mustache style.
/// Mustache style.
pubmustache_style: u8,
pubmustache_style: u8,
}
}
/// Represents the details of the beard
/// Beard details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructBeardDetails{
pubstructBeardDetails{
/// Beard style
/// Beard style
@ -212,7 +215,7 @@ pub struct BeardDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents the details of the glasses
/// Glasses details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructGlassesDetails{
pubstructGlassesDetails{
/// Glasses style.
/// Glasses style.
@ -225,7 +228,7 @@ pub struct GlassesDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents the details of the mole.
/// Mole details of the Mii.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pubstructMoleDetails{
pubstructMoleDetails{
/// Whether the Mii has a mole.
/// Whether the Mii has a mole.
@ -238,16 +241,15 @@ pub struct MoleDetails {
puby_position: u8,
puby_position: u8,
}
}
/// Represents all the data of a Mii
/// Full Mii data representation.
///
///
/// Some values are not ordered _like_ the Mii Editor UI. The mapped values can be seen here:
/// Some values are not ordered *like* the Mii Editor UI. The mapped values can be seen [here](https://www.3dbrew.org/wiki/Mii#Mapped_Editor_.3C-.3E_Hex_values).
/// Set the trimming bounds relatively to the center of the image.
/// Set the trimming bounds relatively to the center of the image.
///
///
/// # Notes
/// # Notes
///
///
/// The new width will be `trim_width / 2` to the left and right of the center.
/// The new width will be `trim_width / 2` to the left and right of the center.
/// The new height will be `trim_height / 2` above and below the center.
/// The new height will be `trim_height / 2` above and below the center.
// TODO: This function doesn't use `TrimmingParams`. It'd be better to merge it with `set_trimming_params()` and change the `TrimmingParams` representation.
// TODO: This function doesn't use `TrimmingParams`. It'd be better to merge it with `set_trimming_params()` and change the `TrimmingParams` representation.
@ -606,7 +606,7 @@ pub trait Camera {
/// coordinates of the second crop point.
/// coordinates of the second crop point.
///
///
/// # Arguments
/// # Arguments
///
///
/// * `width` - Width of the image
/// * `width` - Width of the image
/// * `height` - height of the image
/// * `height` - height of the image
/// * `crop_0` - The first crop point in which the image will be trimmed
/// * `crop_0` - The first crop point in which the image will be trimmed
@ -672,9 +672,9 @@ pub trait Camera {
}
}
/// Sets the effect of the camera.
/// Sets the effect of the camera.
///
///
/// # Notes
/// # Notes
///
///
/// This operation will override any previously set [`Effect`]s.
/// This operation will override any previously set [`Effect`]s.
/// Multiple effects can be set at once by combining the bitflags of [`Effect`].
/// Multiple effects can be set at once by combining the bitflags of [`Effect`].
#[doc(alias = "CAMU_SetEffect")]
#[doc(alias = "CAMU_SetEffect")]
@ -762,9 +762,9 @@ pub trait Camera {
/// * `y` - Starting y coordinate of the window
/// * `y` - Starting y coordinate of the window
/// * `width` - Width of the window
/// * `width` - Width of the window
/// * `height` - Height of the window
/// * `height` - Height of the window
///
///
/// # Notes
/// # Notes
///
///
/// To activate automatic white balance, you must pass [`WhiteBalance::Auto`] into [`Camera::set_white_balance()`].
/// To activate automatic white balance, you must pass [`WhiteBalance::Auto`] into [`Camera::set_white_balance()`].
#[doc(alias = "CAMU_SetAutoWhiteBalanceWindow")]
#[doc(alias = "CAMU_SetAutoWhiteBalanceWindow")]
fnset_auto_white_balance_window(
fnset_auto_white_balance_window(
@ -838,9 +838,9 @@ pub trait Camera {
/// * `width` - Width of the desired image
/// * `width` - Width of the desired image
/// * `height` - Height of the desired image
/// * `height` - Height of the desired image
/// * `timeout` - Duration to wait for the image
/// * `timeout` - Duration to wait for the image
///
///
/// # Example
/// # Example
///
///
/// ```no_run
/// ```no_run
/// # use std::error::Error;
/// # use std::error::Error;
/// # use std::time::Duration;
/// # use std::time::Duration;
@ -848,19 +848,19 @@ pub trait Camera {
/// #
/// #
/// use ctru::services::cam::{Cam, Camera, ViewSize, OutputFormat};
/// use ctru::services::cam::{Cam, Camera, ViewSize, OutputFormat};