-
Notifications
You must be signed in to change notification settings - Fork 32
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
Player: Implement PlayerActionSlopeSlideControl
#335
base: master
Are you sure you want to change the base?
Conversation
451dd9d
to
f0df0a7
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.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @MonsterDruide1)
a discussion (no related file):
This PR is now ready to review. It definitely has to be rebased before merging, but that will be done after an initial review by someone.
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MonsterDruide1)
src/Player/PlayerActionSlopeSlideControl.cpp
line 127 at r1 (raw file):
prevGroundNormal, mGroundNormal); sead::Vector3f* velPtr = al::getVelocityPtr(mPlayer); velPtr->x = (prevUpVel * mGroundNormal.x) + velPtr->x;
This pattern is also found in BazierCurve
and a similar pattern of vecA->x = (vecB.x * mul) + vecC.x
(repeat for all axis') is found in both BazierCurve
and LinearCurve
. So I think you should add a function to the sead vector stuff that takes the vector to multiply, the float to multiply by and the vector to add and then also another function that passes in the vector to add as the target vector
f0df0a7
to
d70f6c9
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @LynxDev2)
a discussion (no related file):
Previously, MonsterDruide1 wrote…
This PR is now ready to review. It definitely has to be rebased before merging, but that will be done after an initial review by someone.
rebased.
src/Player/PlayerActionSlopeSlideControl.cpp
line 127 at r1 (raw file):
Previously, LynxDev2 wrote…
This pattern is also found in
BazierCurve
and a similar pattern ofvecA->x = (vecB.x * mul) + vecC.x
(repeat for all axis') is found in bothBazierCurve
andLinearCurve
. So I think you should add an implementation to the sead vector stuff that takes the vector to multiply, the float to multiply by and the vector to add and then also another function that passes in the vector to add as the target vector
There are way more occurences of this pattern than just the ones you just pointed out - and even more similar ones that might well be a sead
function. We should look into these in the future, yes, but not necessarily before this PR, or would you see this as a hard blocker?
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.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @MonsterDruide1)
src/Player/PlayerActionSlopeSlideControl.cpp
line 127 at r1 (raw file):
Previously, MonsterDruide1 wrote…
There are way more occurences of this pattern than just the ones you just pointed out - and even more similar ones that might well be a
sead
function. We should look into these in the future, yes, but not necessarily before this PR, or would you see this as a hard blocker?
If you think you'll remember to look into this at some point, then ig not
This class is used to control all or part of Mario's movement during sliding (mostly) uncontrollably, and while rolling. Working with floating-point calculation functions of this size is ... quite painful, but all functions have been matched here. Some things (especially within
update
) look quite ugly, so I'm happy to take suggestions on how to simplify code further or improve other stuff - feel free to try by yourself first to verify which changes are possible and which destroy a match: https://decomp.me/scratch/ZqxG4This PR is currently marked as draft because it should wait for #330 to be merged first, which changes around some stuff within the header of this class, so this will cause merge conflicts if not cleaned up before.
This change is