Line 14:
Line 14:
Libmii is based on the structure of this page: [[Mii Data#Mii format]] with a few additions.
Libmii is based on the structure of this page: [[Mii Data#Mii format]] with a few additions.
−
Below is a list and description of variables available from libmii
+
Mii data is stored in a "block of data" big enough to hold 100 miis. If you have 100 miis, all blocks will be full of valid data. Miis are stored in the order in which they were created. If you have less than 100 miis, then you will have x blocks of valid data, followed by 100-x blocks of 0s. Because of this, the mii buffer is always the same size, it just may have 0 value miis at the end. Likewise, if you had 100 miis and then erased the 54th mii you made... there would be a "hole" in the data at the 54th slot full of 0s. Because of this, the mii buffer is always saying 100miis, but there could be slots that have 0s indicating that no mii exists there. The below code checks each block, and only grabs the non zero blocks, sends them up to the loadMii function above for processing, and stores the result in the array "miis". Therefore the array miis will only have valid mii data in it and will contain the actuall number of miis on the wii enabling us to use this in our program to manipulate the valid miis.
−
−
{| border="1" cellspacing="0"
−
!Variable
−
!Description
−
|-
−
|int exists;
−
|1 for exists, 0 for does not exist.
−
|-
−
|int invalid;
−
|
−
|-
−
|int female;
−
|1 for female, 0 for male
−
|-
−
|int month;
−
|month of birth
−
|-
−
|int day;
−
|day of birth
−
|-
−
|int favColor;
−
|0 - 11
−
|-
−
|int favorite;
−
|1 for favorite, 0 for not
−
|-
−
|char name[MII_NAME_LENGTH * 2 + 1];
−
|mii name
−
|-
−
|int height;
−
|0 - 127
−
|-
−
|int weight;
−
|0 - 127
−
|-
−
|int miiID1;
−
|Unique Mii identifier. Seems to increment with time. Doesn't
−
|-
−
|int miiID2;
−
|seem to do anything else important.
−
|-
−
|int miiID3;
−
|
−
|-
−
|int miiID4;
−
|
−
|-
−
|int systemID0;
−
|Checksum8 of first 3 bytes of mac addr
−
|-
−
|int systemID1;
−
|mac addr 3rd-to-last byte
−
|-
−
|int systemID2;
−
|mac addr 2nd-to-last byte
−
|-
−
|int systemID3;
−
|mac addr last byte
−
|-
−
|int faceShape;
−
|0 - 7
−
|-
−
|int skinColor;
−
|0 - 5
−
|-
−
|int facialFeature;
−
|0 - 11
−
|-
−
|int mingleOff;
−
|1 is Don't Mingle, 0 is Mingle
−
|-
−
|int downloaded;
−
|1 means Mii has been downloaded
−
|-
−
|int hairType;
−
|0 - 71 (values are not in same order as mii build screen)
−
|-
−
|int hairColor;
−
|0 - 7
−
|-
−
|int hairPart;
−
|1 is reversed part, 0 is normal
−
|-
−
|int eyebrowType;
−
|0 - 23 (values are not in same order as mii build screen)
−
|-
−
|int eyebrowRotation;
−
|0 - 11 (each eyebrowType may have a dif default rotation angle)
−
|-
−
|int eyebrowColor;
−
|0 - 7
−
|-
−
|int eyebrowSize;
−
|0 - 8 (Default = 4)
−
|-
−
|int eyebrowVertPos;
−
|3 - 18 (Default = 10)
−
|-
−
|int eyebrowHorizSpacing;
−
|0 - 12 (Default = 2)
−
|-
−
|int eyeType;
−
|0 - 47 (values are not in same order as mii build screen)
−
|-
−
|int eyeRotation;
−
|0 - 7 (each eyeType may have a dif default rotation angle)
−
|-
−
|int eyeVertPos;
−
|0 - 18 (Default = 12)
−
|-
−
|int eyeColor;
−
|0 - 5
−
|-
−
|int eyeSize;
−
|0 - 7 (Default = 4)
−
|-
−
|int eyeHorizSpacing;
−
|0 - 12 (Default = 2)
−
|-
−
|int noseType;
−
|0 - 11 (values are not in same order as mii build screen)
−
|-
−
|int noseSize;
−
|0 - 8 (Default = 4)
−
|-
−
|int noseVertPos;
−
|0 - 18 (Default = 9)
−
|-
−
|int lipType;
−
|0 - 23 (values are not in same order as mii build screen)
−
|-
−
|int lipColor;
−
|0 - 2
−
|-
−
|int lipSize;
−
|0 - 8 (Default = 4)
−
|-
−
|int lipVertPos;
−
|0 - 18 (Default = 13)
−
|-
−
|int glassesType;
−
|0 - 8
−
|-
−
|int glassesColor;
−
|0 - 5
−
|-
−
|int glassesSize;
−
|0 - 7 (Default = 4)
−
|-
−
|int glassesVertPos;
−
|0 - 20 (Default = 10)
−
|-
−
|int mustacheType;
−
|0 - 3
−
|-
−
|int beardType;
−
|0 - 3
−
|-
−
|int facialHairColor;
−
|0 - 7
−
|-
−
|int mustacheSize;
−
|0 - 8 (Default = 4)
−
|-
−
|int mustacheVertPos;
−
|0 - 16 (Default = 10)
−
|-
−
|int mole;
−
|1 is mole on, 0 is mole off
−
|-
−
|int moleSize;
−
|0 - 8 (Default = 4)
−
|-
−
|int moleVertPos;
−
|0 - 30 (Default = 20)
−
|-
−
|int moleHorizPos;
−
|0 - 16 (Default = 2)
−
|-
−
|char creator[MII_CREATOR_LENGTH * 2 + 1];
−
|mii creator's name
−
|}
== What does work ==
== What does work ==