-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple src/math interface from libultra #62
Comments
Your suggestion for For This is quite a large area and will likely be the most complex to port, so it's better left until we make some progress on the other areas and have some libdragon integration (which will also give a better understanding of the different abstraction approaches and pitfalls). So doing it now feels a bit premature. I appreciate you being proactive here. As for your suggestion on how to split up the functions, we'll likely need to have a mix of common and library-specific functions in the same logical unit at some point - rendering or not. In that case, either splitting it like you're suggesting or having a conditionally-included header with some typedefs would work well, depending on the situation. |
Ok, I'll open a PR for this easy change.
I see your point and I agree. |
You're correct that the transform functions are mostly general purpose. I didn't mean that the module itself is for rendering. Rather, It's possible there will be something similar required for libdragon, but it's fairly low level this early on. Also, glad to hear you mention non-libultra and non-libdragon backends. I had the same thought long-term :) |
Only two header files need refactoring, both of which reference libultra's
Mtx
:matrix.h
:matrixFromBasisL
is only referenced once indebug_render.c
, so for simplicity I would move the function definition there and remove the function declaration frommatrix.h
.transform.h
:transformToMatrixL
is referenced by multiple files, so I thought of moving the library-dependent interface to a new filetransform_libultra.h
.transform.h
transform_libultra.h
transform_libultra.c
e.g. portal_gun.c
The text was updated successfully, but these errors were encountered: