Libmii: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
Mdbrim (talk | contribs)
Mdbrim (talk | contribs)
No edit summary
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.


* int exists; // 1 for exists, 0 for does not exist.
Below is a list and description of variables available from libmii
* int invalid;
 
* int female; // 1 for female, 0 for male
{| border="1" cellspacing="0"
* int month; // month of birth
|Orange
* int day; // day of birth
|Apple
* int favColor;   // 0 - 11
|-
* int favorite; // 1 for favorite, 0 for not
|Bread
* char name[MII_NAME_LENGTH * 2 + 1]; // mii name
|Pie
* int height;                 // 0 - 127
|-
* int weight;                 // 0 - 127
|Butter
* int miiID1;           // Unique Mii identifier. Seems to increment with time. Doesn't
|Ice cream
* int miiID2;           // seem to do anything else important.
 
* int miiID3;
 
* int miiID4;
|int exists;
* int systemID0;           // Checksum8 of first 3 bytes of mac addr
|1 for exists, 0 for does not exist.
* int systemID1;           // mac addr 3rd-to-last byte
|-
* int systemID2;           // mac addr 2nd-to-last byte
|int invalid;
* int systemID3;           // mac addr last byte
|
* int faceShape;           // 0 - 7
|-
* int skinColor;           // 0 - 5
|int female;
* int facialFeature;       // 0 - 11
|1 for female, 0 for male
* int mingleOff;           // 1 is Don't Mingle, 0 is Mingle
|-
* int downloaded; // 1 means Mii has been downloaded
|int month;
* int hairType;           // 0 - 71 (values are not in same order as mii build screen)
|month of birth
* int hairColor;           // 0 - 7
|-
* int hairPart;           // 1 is reversed part, 0 is normal
|int day;
* int eyebrowType;         // 0 - 23 (values are not in same order as mii build screen)
|day of birth
* int eyebrowRotation;     // 0 - 11 (each eyebrowType may have a dif default rotation angle)
|-
* int eyebrowColor;       // 0 - 7
|int favColor;
* int eyebrowSize;   // 0 - 8 (Default = 4)
|0 - 11
* int eyebrowVertPos;     // 3 - 18 (Default = 10)
|-
* int eyebrowHorizSpacing; // 0 - 12 (Default = 2)
|int favorite;
* int eyeType;             // 0 - 47 (values are not in same order as mii build screen)
|1 for favorite, 0 for not
* int eyeRotation;         // 0 - 7 (each eyeType may have a dif default rotation angle)
|-
* int eyeVertPos;         // 0 - 18 (Default = 12)
|char name[MII_NAME_LENGTH * 2 + 1];
* int eyeColor;           // 0 - 5
|mii name
* int eyeSize;             // 0 - 7 (Default = 4)
|-
* int eyeHorizSpacing;     // 0 - 12 (Default = 2)
|int height;  
* int noseType;           // 0 - 11 (values are not in same order as mii build screen)
|0 - 127
* int noseSize;           // 0 - 8 (Default = 4)
|-
* int noseVertPos;         // 0 - 18 (Default = 9)
|int weight;  
* int lipType;             // 0 - 23 (values are not in same order as mii build screen)
|0 - 127
* int lipColor;           // 0 - 2
|-
* int lipSize;             // 0 - 8 (Default = 4)
|int miiID1;  
* int lipVertPos;         // 0 - 18 (Default = 13)
|Unique Mii identifier. Seems to increment with time. Doesn't
* int glassesType;         // 0 - 8
|-
* int glassesColor;       // 0 - 5
|int miiID2;  
* int glassesSize;         // 0 - 7 (Default = 4)
|seem to do anything else important.
* int glassesVertPos;     // 0 - 20 (Default = 10)
|-
* int mustacheType;       // 0 - 3
|int miiID3;
* int beardType;           // 0 - 3
|
* int facialHairColor;     // 0 - 7
|-
* int mustacheSize;       // 0 - 8 (Default = 4)
|int miiID4;
* int mustacheVertPos;     // 0 - 16 (Default = 10)
|
* int mole;             // 1 is mole on, 0 is mole off
|-
* int moleSize;           // 0 - 8 (Default = 4)
|int systemID0;
* int moleVertPos;         // 0 - 30 (Default = 20)
|Checksum8 of first 3 bytes of mac addr
* int moleHorizPos;       // 0 - 16 (Default = 2)
|-
* char creator[MII_CREATOR_LENGTH * 2 + 1]; // mii creator's name
|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 ==
Everything (I think!)
Everything!


== What doesn't work ==
== What doesn't work ==

Revision as of 21:57, 4 April 2010

Libmii
General
Author(s)mdbrim
TypeLibrary
Version1.0
Links
Download
Website
Source

Libmii is a library for use with Nintendo Wii homebrew. It allows programmers to access the Mii data on the Wii and use it homebrew applications. Libmii retrieves the raw data associated with each mii on your wii. To use this data to draw your miis, please see INSERT NAME HERE (still trying to figure out what to call this page... will be up soon).

Mii structure

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

Orange Apple
Bread Pie
Butter Ice cream


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

Everything!

What doesn't work

Requirements

  • libisfs (a copy is included within the libmii zip file)

Installation

  1. Download the zip file.
  2. Put the libmii.a and libisfs.a files in the libogc/lib/wii folder in devKitPro.
  3. Put the isfs folder and mii.h file in the libogc/include folder in devKitPro.
  4. Be sure to add "#include <mii.h>" in your source
  5. Edit your MakeFile LIBS: line to include "-lmii" and "-lisfs"

Credits

Special thanks to Matthew Bauer for starting this project... without his framework and initial versions of Libmii, this working product would not have been possible.

Example

Coming soon (files being uploaded and wiki is being edited now!)