libmii
March 21, 2009 05:47AM
Also see FaceLib on Wiibrew

I am a little new to C programming and I am trying to create a library to load miis from homebrew.

The majority of stuff goes on in the function called loadMiis:
void loadMiis(Mii miis[], char * data){
	if (data[0] == 'R' && data[1] == 'N' && data[2] == 'O' && data[3] == 'D'){
		int start;
		n = 0;
		for (n=0;n * MII_SIZE + 4 <= sizeof(data)/sizeof(char);n++){
			start = n * MII_SIZE + 4;
                        // And now here how do I figure out if data[start] is in binary so
                        // I'll know if this mii is a girl or not (see isGirl on Wiibrew)
		}
	} else {
		printf("Your mii format version %c%c%c%c is not compatable with LibMii\n", data[0], data[1], data[2], data[3]);
		miis = NULL;
		return;
	}
}

Can anyone who knows c (or c++) tell me if there is something apparently wrong with this, like maybe I can't store hex values in char, because it doesn't seem to be working well.



Edited 3 time(s). Last edit at 03/21/2009 05:57AM by matthewbauer.
Re: libmii
March 21, 2009 09:42AM
it is a bitfield. And you can actually just use the existing struct from the wiki.
Sorry, only registered users may post in this forum.

Click here to login