wut  v1.7.0
Wii U Toolchain
miidata.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 // https://github.com/decaf-emu/decaf-emu/blob/master/src/libdecaf/src/nn/ffl/nn_ffl_miidata.h
16 
17 typedef enum FFLCreateIDFlags {
22 
23 typedef struct WUT_PACKED FFLCreateID {
25 
26  uint32_t timestamp : 28;
27 
28  uint8_t deviceHash[6];
30 WUT_CHECK_OFFSET(FFLCreateID, 4, deviceHash);
31 WUT_CHECK_SIZE(FFLCreateID, 10);
32 
33 //Note: the endian may be wrong here
34 typedef struct WUT_PACKED FFLiMiiDataCore {
35  // 0x00
36  uint8_t birth_platform : 4;
37  uint8_t unk_0x00_b4 : 4;
38 
39  // 0x01
40  uint8_t unk_0x01_b0 : 4;
41  uint8_t unk_0x01_b4 : 4;
42 
43  // 0x02
44  uint8_t font_region : 4;
45  uint8_t region_move : 2;
46  uint8_t unk_0x02_b6 : 1;
47  uint8_t copyable : 1;
48 
49  // 0x03
50  uint8_t mii_version;
51 
52  // 0x4
53  uint64_t author_id;
54 
55  // 0xC
57 
58  // 0x16
59  uint16_t unk_0x16;
60 
61  // 0x18
62  uint16_t unk_0x18_b0 : 1;
63  uint16_t unk_0x18_b1 : 1;
64  uint16_t color : 4;
65  uint16_t birth_day : 5;
66  uint16_t birth_month : 4;
67  uint16_t gender : 1;
68 
69  // 0x1A
70  uint16_t mii_name[10];
71 
72  // 0x2E
73  uint8_t size;
74 
75  // 0x2F
76  uint8_t fatness;
77 
78  // 0x30
79  uint8_t blush_type : 4;
80  uint8_t face_style : 4;
81 
82  // 0x31
83  uint8_t face_color : 3;
84  uint8_t face_type : 4;
85  uint8_t local_only : 1;
86 
87  // 0x32
88  uint8_t hair_mirrored : 5;
89  uint8_t hair_color : 3;
90 
91  // 0x33
92  uint8_t hair_type;
93 
94  // 0x34
95  uint32_t eye_thickness : 3;
96  uint32_t eye_scale : 4;
97  uint32_t eye_color : 3;
98  uint32_t eye_type : 6;
99  uint32_t eye_height : 7;
100  uint32_t eye_distance : 4;
101  uint32_t eye_rotation : 5;
102 
103  // 0x38
104  uint32_t eyebrow_thickness : 4;
105  uint32_t eyebrow_scale : 4;
106  uint32_t eyebrow_color : 3;
107  uint32_t eyebrow_type : 5;
108  uint32_t eyebrow_height : 7;
109  uint32_t eyebrow_distance : 4;
110  uint32_t eyebrow_rotation : 5;
111 
112  // 0x3c
113  uint32_t nose_height : 7;
114  uint32_t nose_scale : 4;
115  uint32_t nose_type : 5;
116  uint32_t mouth_thickness : 3;
117  uint32_t mouth_scale : 4;
118  uint32_t mouth_color : 3;
119  uint32_t mouth_type : 6;
120 
121  // 0x40
122  uint32_t unk_0x40 : 8;
123  uint32_t mustache_type : 3;
124  uint32_t mouth_height : 5;
125  uint32_t mustache_height : 6;
126  uint32_t mustache_scale : 4;
127  uint32_t beard_color : 3;
128  uint32_t beard_type : 3;
129 
130  // 0x44
131  uint16_t glass_height : 5;
132  uint16_t glass_scale : 4;
133  uint16_t glass_color : 3;
134  uint16_t glass_type : 4;
135 
136  // 0x46
137  uint16_t unk_0x46_b0 : 1;
138  uint16_t mole_ypos : 5;
139  uint16_t mole_xpos : 5;
140  uint16_t mole_scale : 4;
141  uint16_t mole_enabled : 1;
143 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x03, mii_version);
144 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x04, author_id);
145 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x0C, mii_id);
146 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x16, unk_0x16);
147 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x1A, mii_name);
148 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x2E, size);
149 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x2F, fatness);
150 WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x33, hair_type);
151 WUT_CHECK_SIZE(FFLiMiiDataCore, 0x48);
152 
153 typedef struct WUT_PACKED FFLiMiiDataOfficial {
155  uint16_t creator_name[10];
157 WUT_CHECK_OFFSET(FFLiMiiDataOfficial, 0x48, creator_name);
158 WUT_CHECK_SIZE(FFLiMiiDataOfficial, 0x5C);
159 
160 typedef struct WUT_PACKED FFLStoreData {
162  uint16_t unk_0x5C;
163  uint16_t checksum;
165 WUT_CHECK_OFFSET(FFLStoreData, 0x5C, unk_0x5C);
166 WUT_CHECK_OFFSET(FFLStoreData, 0x5E, checksum);
167 WUT_CHECK_SIZE(FFLStoreData, 0x60);
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
uint16_t mole_xpos
Definition: miidata.h:139
uint16_t glass_scale
Definition: miidata.h:132
uint16_t color
Definition: miidata.h:64
uint8_t fatness
Definition: miidata.h:76
uint32_t mouth_height
Definition: miidata.h:124
uint8_t unk_0x01_b4
Definition: miidata.h:41
uint32_t eyebrow_height
Definition: miidata.h:108
uint32_t nose_type
Definition: miidata.h:115
uint16_t unk_0x18_b0
Definition: miidata.h:62
uint32_t eye_distance
Definition: miidata.h:100
uint8_t unk_0x02_b6
Definition: miidata.h:46
uint32_t eye_color
Definition: miidata.h:97
uint8_t hair_mirrored
Definition: miidata.h:88
uint32_t eye_scale
Definition: miidata.h:96
uint8_t birth_platform
Definition: miidata.h:36
uint16_t unk_0x18_b1
Definition: miidata.h:63
FFLCreateIDFlags flags
Definition: miidata.h:24
uint32_t eyebrow_color
Definition: miidata.h:106
uint32_t eyebrow_scale
Definition: miidata.h:105
uint16_t unk_0x5C
Definition: miidata.h:162
uint32_t eye_height
Definition: miidata.h:99
uint8_t hair_color
Definition: miidata.h:89
FFLCreateID mii_id
Definition: miidata.h:56
uint8_t unk_0x00_b4
Definition: miidata.h:37
uint32_t eye_rotation
Definition: miidata.h:101
uint32_t mouth_type
Definition: miidata.h:119
uint32_t mouth_scale
Definition: miidata.h:117
uint16_t checksum
Definition: miidata.h:163
uint8_t hair_type
Definition: miidata.h:92
uint16_t birth_day
Definition: miidata.h:65
uint32_t nose_scale
Definition: miidata.h:114
uint16_t glass_type
Definition: miidata.h:134
uint16_t mole_ypos
Definition: miidata.h:138
uint8_t face_color
Definition: miidata.h:83
uint32_t eyebrow_thickness
Definition: miidata.h:104
uint32_t eyebrow_type
Definition: miidata.h:107
uint32_t unk_0x40
Definition: miidata.h:122
uint32_t eyebrow_distance
Definition: miidata.h:109
uint8_t font_region
Definition: miidata.h:44
uint16_t glass_height
Definition: miidata.h:131
uint32_t mouth_color
Definition: miidata.h:118
uint8_t local_only
Definition: miidata.h:85
uint16_t mole_scale
Definition: miidata.h:140
uint32_t mustache_height
Definition: miidata.h:125
uint32_t eyebrow_rotation
Definition: miidata.h:110
uint16_t birth_month
Definition: miidata.h:66
uint8_t copyable
Definition: miidata.h:47
uint8_t mii_version
Definition: miidata.h:50
FFLiMiiDataCore core
Definition: miidata.h:154
uint32_t nose_height
Definition: miidata.h:113
uint64_t author_id
Definition: miidata.h:53
uint8_t blush_type
Definition: miidata.h:79
uint32_t timestamp
Definition: miidata.h:26
uint16_t mole_enabled
Definition: miidata.h:141
uint8_t unk_0x01_b0
Definition: miidata.h:40
uint32_t eye_type
Definition: miidata.h:98
uint8_t face_type
Definition: miidata.h:84
uint8_t face_style
Definition: miidata.h:80
uint8_t region_move
Definition: miidata.h:45
uint32_t eye_thickness
Definition: miidata.h:95
uint16_t unk_0x16
Definition: miidata.h:59
uint32_t mustache_scale
Definition: miidata.h:126
uint32_t beard_color
Definition: miidata.h:127
uint32_t beard_type
Definition: miidata.h:128
uint16_t unk_0x46_b0
Definition: miidata.h:137
uint8_t size
Definition: miidata.h:73
uint16_t glass_color
Definition: miidata.h:133
uint16_t gender
Definition: miidata.h:67
uint32_t mouth_thickness
Definition: miidata.h:116
FFLiMiiDataOfficial data
Definition: miidata.h:161
uint32_t mustache_type
Definition: miidata.h:123
FFLCreateIDFlags
Definition: miidata.h:17
struct FFLCreateID FFLCreateID
struct FFLStoreData FFLStoreData
struct FFLiMiiDataCore FFLiMiiDataCore
struct FFLiMiiDataOfficial FFLiMiiDataOfficial
@ FFL_CREATE_ID_FLAG_NORMAL
Definition: miidata.h:20
@ FFL_CREATE_ID_FLAG_WII_U
Definition: miidata.h:18
@ FFL_CREATE_ID_FLAG_TEMPORARY
Definition: miidata.h:19