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
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Lowercase title}}
 
{{Infobox development tools
 
{{Infobox development tools
| title      = Libmii
+
| title      = libmii
 
| description = Library
 
| description = Library
 
| type        = library
 
| type        = library
Line 6: Line 7:
 
| version    = 1.0
 
| version    = 1.0
 
| download    = http://libmii.googlecode.com/files/libmii.zip
 
| download    = http://libmii.googlecode.com/files/libmii.zip
| source      = http://code.google.com/p/libmii/
+
| source      = http://code.google.com/p/libmii/source/browse/
 
| website    = http://code.google.com/p/libmii/
 
| website    = http://code.google.com/p/libmii/
 
}}
 
}}
'''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).
+
'''libmii''' is a library for use with Nintendo Wii homebrew. It allows programmers to access the Mii data on the Wii and use it in homebrew applications.  Libmii retrieves the raw data associated with each mii on your wii.  To use this data to draw your miis, please see [[libmii/Rendering Miis]].
  
 
== Mii structure ==
 
== Mii structure ==
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.
 
 
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.
 
 
 
== What does work ==
 
Everything!
 
 
 
== What doesn't work ==
 
  
 
== Requirements ==
 
== Requirements ==
 
 
* libisfs (a copy is included within the libmii zip file)
 
* libisfs (a copy is included within the libmii zip file)
  
 
== Installation ==
 
== Installation ==
 
 
# Download the zip file.
 
# Download the zip file.
# Put the libmii.a and libisfs.a files in the libogc/lib/wii folder in devKitPro.
+
# Put the libmii.a and libisfs.a files in the libogc/lib/wii folder in devKitPro. (or applicable library folder)
# Put the isfs folder and mii.h file in the libogc/include folder in devKitPro.
+
# Put the isfs folder and mii.h file in the libogc/include folder in devKitPro. (or applicable include folder)
 
# Be sure to add "#include <mii.h>" in your source
 
# Be sure to add "#include <mii.h>" in your source
 
# Edit your MakeFile LIBS: line to include "-lmii" and "-lisfs"
 
# Edit your MakeFile LIBS: line to include "-lmii" and "-lisfs"
Line 40: Line 32:
  
 
== Example ==
 
== Example ==
Coming soon (files being uploaded and wiki is being edited now!)
+
Just a [http://libmii.googlecode.com/files/libmiiexample.zip small example] of translating the mii data into variables that can be used in homebrew.
 +
 
 +
== See also ==
 +
* [[:Category:Homebrew using libmii]]

Latest revision as of 13:29, 24 August 2011

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 in homebrew applications. Libmii retrieves the raw data associated with each mii on your wii. To use this data to draw your miis, please see libmii/Rendering Miis.

Mii structure

libmii is based on the structure of this page: Mii Data#Mii format with a few additions.

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. (or applicable library folder)
  3. Put the isfs folder and mii.h file in the libogc/include folder in devKitPro. (or applicable include folder)
  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 (or at least have taken me a LOT longer to do!)

Example

Just a small example of translating the mii data into variables that can be used in homebrew.

See also