rust3ds / ctru-rs

Rust wrapper for libctru
https://rust3ds.github.io/ctru-rs/
Other
117 stars 17 forks source link

Implement Mii Selector applet #78

Closed Techie-Pi closed 1 year ago

Techie-Pi commented 1 year ago

I've implemented the Mii Selector applet, I have yet to add documentation, but I would like to see your opinions on the API. Specially around the creation and usage of the enums MiiConfigIndex and MiiType.

Techie-Pi commented 1 year ago

Also, out of curiosity, why is MiiData an opaque type? Nevermind, just saw the issue, that's actually sad tbh

Techie-Pi commented 1 year ago

I've been researching, and the representation of the MiiData given by the 3DS doesn't change at all and is documented. The purpose of libctru's MiiData is to imitate the representation so that the struct is generated directly from the 3DS' MiiData.

Instead of that, we could parse the raw data to a Rust-compatible struct. I'll do some testing

Techie-Pi commented 1 year ago

Looks like it is possible, and quite simple tbh, maybe I could also add this to the PR. Edit: Done... that was easier than what I had thought... I'll clean-up the code, fix a few things, and I'll incorporate the code into the PR

Techie-Pi commented 1 year ago

(For some reason I can't request multiple reviews at the same time /shrug)

Techie-Pi commented 1 year ago

I've squashed some commits (mostly docs and cargo fmt/clippy)

Techie-Pi commented 1 year ago

After current concerns about this PR are resolved, I plan on adding (at least) some basic documentation (and maybe references to the 3dbrew wiki) before merging, though I think the best thing would be to merge this PR with basic documentation and add more detailed documentation in a follow-up PR (I'm not a native English speaker, so I may need help in the follow-up PR, which may take some time to make because of that :p)

Techie-Pi commented 1 year ago

Is there anything that should be documented in this PR instead of the follow-up? Or is this ready to merge?

Meziu commented 1 year ago

Is there anything that should be documented in this PR instead of the follow-up? Or is this ready to merge?

I believe it’s fine for now. PR anything you want to add.