Libmii
This is an old revision of this page, as edited by Mdbrim (talk | contribs) at 23:23, 4 April 2010. It may differ significantly from the current revision. |
Libmii | |
General | |
---|---|
Author(s) | mdbrim |
Type | Library |
Version | 1.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.
Some notes:
- 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 code checks each block, and only grabs the non zero blocks, sends them up to the loadMii function 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 actual number of miis on the wii enabling us to use this in our program to manipulate the valid miis easily
What does work
Everything!
What doesn't work
Requirements
- libisfs (a copy is included within the libmii zip file)
Installation
- Download the zip file.
- Put the libmii.a and libisfs.a files in the libogc/lib/wii folder in devKitPro.
- Put the isfs folder and mii.h file in the libogc/include folder in devKitPro.
- Be sure to add "#include <mii.h>" in your source
- 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 (or at least have taken me a LOT longer to do!)
Example
Coming soon (files being uploaded and wiki is being edited now!)