diff --git a/friends-3ds/types/mii.go b/friends-3ds/types/mii.go index c8b1bc63..7d3d29ec 100644 --- a/friends-3ds/types/mii.go +++ b/friends-3ds/types/mii.go @@ -12,10 +12,10 @@ import ( type Mii struct { types.Structure *types.Data - Name *types.String - Unknown2 *types.PrimitiveBool - Unknown3 *types.PrimitiveU8 - MiiData *types.Buffer + Name *types.String + ProfanityFlag *types.PrimitiveBool + CharacterSet *types.PrimitiveU8 + MiiData *types.Buffer } // WriteTo writes the Mii to the given writable @@ -25,8 +25,8 @@ func (m *Mii) WriteTo(writable types.Writable) { contentWritable := writable.CopyNew() m.Name.WriteTo(contentWritable) - m.Unknown2.WriteTo(contentWritable) - m.Unknown3.WriteTo(contentWritable) + m.ProfanityFlag.WriteTo(contentWritable) + m.CharacterSet.WriteTo(contentWritable) m.MiiData.WriteTo(contentWritable) content := contentWritable.Bytes() @@ -55,14 +55,14 @@ func (m *Mii) ExtractFrom(readable types.Readable) error { return fmt.Errorf("Failed to extract Mii.Name. %s", err.Error()) } - err = m.Unknown2.ExtractFrom(readable) + err = m.ProfanityFlag.ExtractFrom(readable) if err != nil { - return fmt.Errorf("Failed to extract Mii.Unknown2. %s", err.Error()) + return fmt.Errorf("Failed to extract Mii.ProfanityFlag. %s", err.Error()) } - err = m.Unknown3.ExtractFrom(readable) + err = m.CharacterSet.ExtractFrom(readable) if err != nil { - return fmt.Errorf("Failed to extract Mii.Unknown3. %s", err.Error()) + return fmt.Errorf("Failed to extract Mii.CharacterSet. %s", err.Error()) } err = m.MiiData.ExtractFrom(readable) @@ -80,8 +80,8 @@ func (m *Mii) Copy() types.RVType { copied.StructureVersion = m.StructureVersion copied.Data = m.Data.Copy().(*types.Data) copied.Name = m.Name.Copy().(*types.String) - copied.Unknown2 = m.Unknown2.Copy().(*types.PrimitiveBool) - copied.Unknown3 = m.Unknown3.Copy().(*types.PrimitiveU8) + copied.ProfanityFlag = m.ProfanityFlag.Copy().(*types.PrimitiveBool) + copied.CharacterSet = m.CharacterSet.Copy().(*types.PrimitiveU8) copied.MiiData = m.MiiData.Copy().(*types.Buffer) return copied @@ -107,11 +107,11 @@ func (m *Mii) Equals(o types.RVType) bool { return false } - if !m.Unknown2.Equals(other.Unknown2) { + if !m.ProfanityFlag.Equals(other.ProfanityFlag) { return false } - if !m.Unknown3.Equals(other.Unknown3) { + if !m.CharacterSet.Equals(other.CharacterSet) { return false } @@ -133,8 +133,8 @@ func (m *Mii) FormatToString(indentationLevel int) string { b.WriteString("Mii{\n") b.WriteString(fmt.Sprintf("%sData (parent): %s,\n", indentationValues, m.Data.FormatToString(indentationLevel+1))) b.WriteString(fmt.Sprintf("%sName: %s,\n", indentationValues, m.Name)) - b.WriteString(fmt.Sprintf("%sUnknown2: %s,\n", indentationValues, m.Unknown2)) - b.WriteString(fmt.Sprintf("%sUnknown3: %s,\n", indentationValues, m.Unknown3)) + b.WriteString(fmt.Sprintf("%sProfanityFlag: %s,\n", indentationValues, m.ProfanityFlag)) + b.WriteString(fmt.Sprintf("%sCharacterSet: %s,\n", indentationValues, m.CharacterSet)) b.WriteString(fmt.Sprintf("%sMiiData: %s,\n", indentationValues, m.MiiData)) b.WriteString(fmt.Sprintf("%s}", indentationEnd)) @@ -144,11 +144,11 @@ func (m *Mii) FormatToString(indentationLevel int) string { // NewMii returns a new Mii func NewMii() *Mii { m := &Mii{ - Data: types.NewData(), - Name: types.NewString(""), - Unknown2: types.NewPrimitiveBool(false), - Unknown3: types.NewPrimitiveU8(0), - MiiData: types.NewBuffer(nil), + Data: types.NewData(), + Name: types.NewString(""), + ProfanityFlag: types.NewPrimitiveBool(false), + CharacterSet: types.NewPrimitiveU8(0), + MiiData: types.NewBuffer(nil), } return m