public MiiCharacter(SuperMiiData data) { this.data = data; }
public MiiDataWii(MiiCharacter mii) { #region Unknown Data this.unknown_1 = 0; this.unknown_2 = false; this.unknown_3 = 0; this.unknown_4 = 0; this.unknown_5 = 0; this.unknown_6 = 0; this.unknown_7 = 0; this.unknown_8 = 0; this.unknown_9 = 0; this.unknown_10 = 0; this.unknown_11 = false; #endregion SuperMii.SuperMiiData data = mii.data; #region Basics SuperMii.Basics basics = data.basics; this.invalid = false; this.mii_name = basics.nickname; this.female = basics.is_female; this.birth_month = basics.birth_month; this.birth_day = basics.birth_day; this.favorite_color = (FavoriteColor)SuperMiiData.ApproximateColor(Favorite.colors, basics.favorite_color); this.favorite = basics.favorite; this.creator_name = basics.creator_name; #endregion #region Body SuperMii.Body body = data.body; this.body_height = (sbyte)SuperMiiData.Denormalize(body.height, 127); this.body_weight = (sbyte)SuperMiiData.Denormalize(body.weight, 127); #endregion #region Identifiers // FIXME: This will cause issues on real hardware! this.mii_id = 0; this.client_id = 0; #endregion #region Metadata this.dontMingle = true; this.downloaded = true; #endregion #region Face SuperMii.Face face = data.face; this.face_shape = face.type; this.skin_color = face.type; // Facial feature if (face.wrinkles == 0) { this.facial_feature = (byte)face.makeup; } else if (face.makeup == 0) { this.facial_feature = (byte)(face.wrinkles + 4); } else { // TODO add a way for the user to select either wrinkles or makeup this.facial_feature = 0; } #endregion #region Hair SuperMii.Hairstyle hair = data.hair; this.hair_type = (sbyte)hair.type; this.hair_color = (sbyte)SuperMiiData.ApproximateColor(Hairstyle.colors, hair.color); this.hair_flip = hair.flipped; #endregion #region Eyebrows SuperMii.Eyebrows eyebrows = data.eyebrows; this.eyebrow_type = (uint)eyebrows.type; this.eyebrow_rotation = SuperMiiData.Denormalize(eyebrows.rotation, 11); this.eyebrow_color = SuperMiiData.ApproximateColor(Eyebrows.colors, eyebrows.color); this.eyebrow_size = SuperMiiData.Denormalize(eyebrows.size, 8); this.eyebrow_vertical = SuperMiiData.Denormalize(eyebrows.verticalPosition, 3, 18); this.eyebrow_horizontal = SuperMiiData.Denormalize(eyebrows.horizontalSpread, 0, 12); #endregion #region Eyes SuperMii.Eyes eyes = data.eyes; this.eye_type = (byte)eyes.type; this.eye_rotation = SuperMiiData.Denormalize(eyes.rotation, 7); this.eye_vertical = SuperMiiData.Denormalize(eyes.verticalPosition, 18); this.eye_color = SuperMiiData.ApproximateColor(Eyes.colors, eyes.color); this.eye_size = SuperMiiData.Denormalize(eyes.size, 7); this.eye_horizontal = SuperMiiData.Denormalize(eyes.spread, 12); #endregion #region Nose SuperMii.Nose nose = data.nose; this.nose_type = (byte)nose.type; this.nose_size = (byte)SuperMiiData.Denormalize(nose.size, 8); this.nose_vertical = (byte)SuperMiiData.Denormalize(nose.verticalPosition, 18); #endregion #region Mouth SuperMii.Mouth mouth = data.mouth; this.mouth_type = (byte)mouth.type; this.mouth_color = (byte)SuperMiiData.ApproximateColor(Mouth.colors, mouth.color); this.mouth_size = (byte)SuperMiiData.Denormalize(mouth.size, 8); this.mouth_vertical = (byte)SuperMiiData.Denormalize(mouth.verticalPosition, 18); #endregion #region Glasses SuperMii.Glasses glasses = data.glasses; this.glasses_type = (byte)glasses.type; this.glasses_color = (byte)SuperMiiData.ApproximateColor(Glasses.colors, glasses.color); this.glasses_size = (byte)SuperMiiData.Denormalize(glasses.size, 7); this.glasses_vertical = (byte)SuperMiiData.Denormalize(glasses.verticalPosition, 20); #endregion #region Facial hair SuperMii.FacialHair facial_hair = data.facial_hair; this.facial_hair_mustache = (byte)facial_hair.moustache; this.facial_hair_beard = (byte)facial_hair.beard; this.facial_hair_color = (byte)SuperMiiData.ApproximateColor(FacialHair.colors, facial_hair.color); this.facial_hair_size = (byte)SuperMiiData.Denormalize(facial_hair.size, 8); this.facial_hair_vertical = (byte)SuperMiiData.Denormalize(facial_hair.verticalPosition, 16); #endregion #region Mole SuperMii.Mole mole = data.mole; this.mole_enable = mole.enabled; this.mole_size = (byte)SuperMiiData.Denormalize(mole.size, 8); this.mole_vertical = (byte)SuperMiiData.Denormalize(mole.verticalPosition, 30); this.mole_horizontal = (byte)SuperMiiData.Denormalize(mole.horizontalPosition, 16); #endregion }
public MiiCharacter() { this.data = new SuperMiiData(); }