-
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
Changes from all commits
e7fad97
c945515
17a473c
1481b7f
02184c3
6439e35
78dc2a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,15 +66,17 @@ void SkeletonPatcher::ClearSkeletons() | |
|
||
void SkeletonPatcher::UpdateSkeletons() { | ||
bool isHD = CVarGetInteger("gAltAssets", 0); | ||
for (auto skel : skeletons) | ||
{ | ||
for (auto skel : skeletons) { | ||
Skeleton* newSkel = | ||
(Skeleton*)LUS::Context::GetInstance()->GetResourceManager() | ||
->LoadResource((isHD ? LUS::IResource::gAltAssetPrefix : "") + skel.vanillaSkeletonPath, true) | ||
.get(); | ||
|
||
if (newSkel != nullptr) | ||
if (newSkel != nullptr) { | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more.
curious as to what that means There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
} | ||
} | ||
} | ||
} // namespace LUS |
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 thatSkelAnime_DrawSkeletonOpa
exists/is being used everywhere? it seems that would mean we shouldn't need to reference those outside ofz_skelanime.c
anymore.