From 4d138b760b1eb09ee59dca40dba86112e3c8a39d Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Mon, 11 Sep 2023 17:12:51 -0600 Subject: service: mii: Remove most magic values --- src/core/hle/service/mii/types/core_data.h | 91 +++++++++++++++--------------- 1 file changed, 46 insertions(+), 45 deletions(-) (limited to 'src/core/hle/service/mii/types/core_data.h') diff --git a/src/core/hle/service/mii/types/core_data.h b/src/core/hle/service/mii/types/core_data.h index 411c123b3..cebcd2ee4 100644 --- a/src/core/hle/service/mii/types/core_data.h +++ b/src/core/hle/service/mii/types/core_data.h @@ -15,7 +15,7 @@ struct StoreDataBitFields { BitField<8, 7, u32> height; BitField<15, 1, u32> mole_type; BitField<16, 7, u32> build; - BitField<23, 1, HairFlip> hair_flip; + BitField<23, 1, u32> hair_flip; BitField<24, 7, u32> hair_color; BitField<31, 1, u32> type; }; @@ -24,7 +24,7 @@ struct StoreDataBitFields { u32 word_1{}; BitField<0, 7, u32> eye_color; - BitField<7, 1, Gender> gender; + BitField<7, 1, u32> gender; BitField<8, 7, u32> eyebrow_color; BitField<16, 7, u32> mouth_color; BitField<24, 7, u32> beard_color; @@ -37,7 +37,7 @@ struct StoreDataBitFields { BitField<8, 6, u32> eye_type; BitField<14, 2, u32> region_move; BitField<16, 6, u32> mouth_type; - BitField<22, 2, FontRegion> font_region; + BitField<22, 2, u32> font_region; BitField<24, 5, u32> eye_y; BitField<29, 3, u32> glasses_scale; }; @@ -46,9 +46,9 @@ struct StoreDataBitFields { u32 word_3{}; BitField<0, 5, u32> eyebrow_type; - BitField<5, 3, MustacheType> mustache_type; + BitField<5, 3, u32> mustache_type; BitField<8, 5, u32> nose_type; - BitField<13, 3, BeardType> beard_type; + BitField<13, 3, u32> beard_type; BitField<16, 5, u32> nose_y; BitField<21, 3, u32> mouth_aspect; BitField<24, 5, u32> mouth_y; @@ -104,102 +104,102 @@ public: u32 IsValid() const; void SetFontRegion(FontRegion value); - void SetFavoriteColor(u8 value); + void SetFavoriteColor(FavoriteColor value); void SetGender(Gender value); void SetHeight(u8 value); void SetBuild(u8 value); void SetType(u8 value); void SetRegionMove(u8 value); - void SetFacelineType(u8 value); - void SetFacelineColor(u8 value); - void SetFacelineWrinkle(u8 value); - void SetFacelineMake(u8 value); - void SetHairType(u8 value); - void SetHairColor(u8 value); + void SetFacelineType(FacelineType value); + void SetFacelineColor(FacelineColor value); + void SetFacelineWrinkle(FacelineWrinkle value); + void SetFacelineMake(FacelineMake value); + void SetHairType(HairType value); + void SetHairColor(CommonColor value); void SetHairFlip(HairFlip value); - void SetEyeType(u8 value); - void SetEyeColor(u8 value); + void SetEyeType(EyeType value); + void SetEyeColor(CommonColor value); void SetEyeScale(u8 value); void SetEyeAspect(u8 value); void SetEyeRotate(u8 value); void SetEyeX(u8 value); void SetEyeY(u8 value); - void SetEyebrowType(u8 value); - void SetEyebrowColor(u8 value); + void SetEyebrowType(EyebrowType value); + void SetEyebrowColor(CommonColor value); void SetEyebrowScale(u8 value); void SetEyebrowAspect(u8 value); void SetEyebrowRotate(u8 value); void SetEyebrowX(u8 value); void SetEyebrowY(u8 value); - void SetNoseType(u8 value); + void SetNoseType(NoseType value); void SetNoseScale(u8 value); void SetNoseY(u8 value); void SetMouthType(u8 value); - void SetMouthColor(u8 value); + void SetMouthColor(CommonColor value); void SetMouthScale(u8 value); void SetMouthAspect(u8 value); void SetMouthY(u8 value); - void SetBeardColor(u8 value); + void SetBeardColor(CommonColor value); void SetBeardType(BeardType value); void SetMustacheType(MustacheType value); void SetMustacheScale(u8 value); void SetMustacheY(u8 value); - void SetGlassType(u8 value); - void SetGlassColor(u8 value); + void SetGlassType(GlassType value); + void SetGlassColor(CommonColor value); void SetGlassScale(u8 value); void SetGlassY(u8 value); - void SetMoleType(u8 value); + void SetMoleType(MoleType value); void SetMoleScale(u8 value); void SetMoleX(u8 value); void SetMoleY(u8 value); void SetNickname(Nickname nickname); - u8 GetFontRegion() const; - u8 GetFavoriteColor() const; - u8 GetGender() const; + FontRegion GetFontRegion() const; + FavoriteColor GetFavoriteColor() const; + Gender GetGender() const; u8 GetHeight() const; u8 GetBuild() const; u8 GetType() const; u8 GetRegionMove() const; - u8 GetFacelineType() const; - u8 GetFacelineColor() const; - u8 GetFacelineWrinkle() const; - u8 GetFacelineMake() const; - u8 GetHairType() const; - u8 GetHairColor() const; - u8 GetHairFlip() const; - u8 GetEyeType() const; - u8 GetEyeColor() const; + FacelineType GetFacelineType() const; + FacelineColor GetFacelineColor() const; + FacelineWrinkle GetFacelineWrinkle() const; + FacelineMake GetFacelineMake() const; + HairType GetHairType() const; + CommonColor GetHairColor() const; + HairFlip GetHairFlip() const; + EyeType GetEyeType() const; + CommonColor GetEyeColor() const; u8 GetEyeScale() const; u8 GetEyeAspect() const; u8 GetEyeRotate() const; u8 GetEyeX() const; u8 GetEyeY() const; - u8 GetEyebrowType() const; - u8 GetEyebrowColor() const; + EyebrowType GetEyebrowType() const; + CommonColor GetEyebrowColor() const; u8 GetEyebrowScale() const; u8 GetEyebrowAspect() const; u8 GetEyebrowRotate() const; u8 GetEyebrowX() const; u8 GetEyebrowY() const; - u8 GetNoseType() const; + NoseType GetNoseType() const; u8 GetNoseScale() const; u8 GetNoseY() const; - u8 GetMouthType() const; - u8 GetMouthColor() const; + MouthType GetMouthType() const; + CommonColor GetMouthColor() const; u8 GetMouthScale() const; u8 GetMouthAspect() const; u8 GetMouthY() const; - u8 GetBeardColor() const; - u8 GetBeardType() const; - u8 GetMustacheType() const; + CommonColor GetBeardColor() const; + BeardType GetBeardType() const; + MustacheType GetMustacheType() const; u8 GetMustacheScale() const; u8 GetMustacheY() const; - u8 GetGlassType() const; - u8 GetGlassColor() const; + GlassType GetGlassType() const; + CommonColor GetGlassColor() const; u8 GetGlassScale() const; u8 GetGlassY() const; - u8 GetMoleType() const; + MoleType GetMoleType() const; u8 GetMoleScale() const; u8 GetMoleX() const; u8 GetMoleY() const; @@ -207,6 +207,7 @@ public: Nickname GetDefaultNickname() const; Nickname GetInvalidNickname() const; +private: StoreDataBitFields data{}; Nickname name{}; }; -- cgit v1.2.3