-
Notifications
You must be signed in to change notification settings - Fork 533
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
Removed hardcoded skeleton types in actor draw code. #2979
Removed hardcoded skeleton types in actor draw code. #2979
Conversation
a0fd424
to
6439e35
Compare
Considering the scope of the changes in this PR, do we need to organize a testing effort for this? I assume it's good to test this without replaced models as well considering it touches a lot of the vanilla skeleton code as well? Seems like it's also out of date currently though, so it'll need to be updated to latest develop before any testing can be done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. left one comment and one question, but nothing that should stop merging.
void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, | ||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg); | ||
void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could these be moved out of functions.h
now that SkelAnime_DrawSkeletonOpa
exists/is being used everywhere? it seems that would mean we shouldn't need to reference those outside of z_skelanime.c
anymore.
skel.skelAnime->skeleton = newSkel->skeletonData.skeletonHeader.segment; | ||
uintptr_t skelPtr = (uintptr_t)newSkel->GetPointer(); | ||
memcpy(&skel.skelAnime->skeletonHeader, &skelPtr, sizeof(uintptr_t)); // Dumb thing that needs to be done because cast is not cooperating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cast is not cooperating
curious as to what that means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a good while so I don't remember the specifics, but I believe trying to write that value like normal resulted in some compile-time error.
This allows custom models to use whatever skeleton type they wish regardless of what the original actor used.
Build Artifacts