In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "Libmii"

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

Revision as of 22:41, 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.

  • 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 (I think!)

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!)