Cleanup and document math_utils HASM#712
Open
Ryan-Myers wants to merge 36 commits intoDavidSM64:masterfrom
Open
Cleanup and document math_utils HASM#712Ryan-Myers wants to merge 36 commits intoDavidSM64:masterfrom
Ryan-Myers wants to merge 36 commits intoDavidSM64:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So this one is kind of weird, but I never liked how unreadable our math_utils hasm was. I recently went down the rabbit hole of figuring out how to get that code compiling with IDO, and I was able to significantly clean up, and reorder the asm to be in a better order, and use C macros and defines, among some other things.
Then I got the idea to try and document it all in excruciating detail. This is the result of that process.
FULL DISCLOSURE: I started each functions documentation with AI assistance, but I didn't just copy and paste the results and move on. I did significant work per function to maintain accuracy, and clean up what I liked and didn't like with it's results.
This may be overly documented, but it was helpful to me. I think I found a few cases where our C code versions had some differences, but nothing I considered too bad. There may even be some more minor tweaks in the C code versions I missed as well.
Let me know if there's anything you don't like about this approach. I'm always open to suggestions.