-
Notifications
You must be signed in to change notification settings - Fork 596
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
Decompiles z_bg_spot01_objects2.c #357
Conversation
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
061214b
to
7d4c096
Compare
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.
This was already mentioned in discord but to keep track of things in github I'll note here that this includes some incorrect changes to Path
stuff.
And I'll probably wait for that to get reverted before doing a full review.
4c21676
to
4d33fc1
Compare
@Roman971 dropped the commit with the refactor to the Path stuff, if the Path refactor is required let's do it in a separate branch then |
4d33fc1
to
d282cc0
Compare
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
Outdated
Show resolved
Hide resolved
src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h
Outdated
Show resolved
Hide resolved
} | ||
|
||
s32 func_808AC22C(Path* pathList, Vec3f* pos, s32 path, s32 waypoint) { | ||
Vec3s* pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(((Path*)pathList + path)->points))[waypoint]; |
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.
Vec3s* pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(((Path*)pathList + path)->points))[waypoint]; | |
Vec3s* pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(pathList[path].points))[waypoint]; |
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.
Unfortunately doing it like this causes regalloc issues and a non matching function
I've changed to:
Vec3s* pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL((pathList + path)->points))[waypoint];
I've removed the cast to Path * and this matches, but accessing the path with [] breaks the function... pretty weird....
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.
Hmm, not very surprising but it's odd. We can go with it for now but it will probably be improved somehow later.
d282cc0
to
feee5cd
Compare
* Starts z_bg_spot01_objects2 * z_bg_spot01_objects2.c almost finished * Finishes z_bg_spot01_objects2.c * Removes unused asm * PR comments and rebased to master * Addresses PR comments #2 Co-authored-by: i82orbom <i82orbom i82orbom@github> Co-authored-by: i82orbom <i82orbom@github.com>
Path* path -> Path* pathList refactored as discussed in Discord in the last commit
Thanks to @ethteck for checking the jump tables at the end... actually to everyone that helps in the channel πββοΈ