Skip to content
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

Decompile RIC func_8015F680 #838

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Decompile RIC func_8015F680 #838

merged 4 commits into from
Dec 13, 2023

Conversation

bismurphy
Copy link
Collaborator

@bismurphy bismurphy commented Dec 12, 2023

As I've been saying on Discord, this is one of a set of functions that does a bunch of things with colliders.

This required some slight restructuring of existing variables. We can finally confirm that the second array in g_Player is a set of colliders, so that's nice.

src/dra/86ECC.c Outdated
@@ -1411,15 +1411,15 @@ void func_8012D28C(bool exitEarly) {
// Start a routine where we look through this array for a value.
bitNotFound = 0;
for (i = 3; i < 7; i++) {
if ((g_Player.D_80072CF0[i][0] & 2)) {
if ((g_Player.colliders2[i].effects & 2)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EFFECT_UNK_0002?

return;
}
temp_s0 =
g_Player.unk04 & (EFFECT_UNK_8000 | EFFECT_UNK_4000 | EFFECT_UNK_0800 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we know that unk04 is these flags? I only see two places where it is set and there's no obvious connection to collider effects

g_Player.unk04 = 1;

g_Player.unk04 = 1;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any real evidence that it's collider flags, but it seemed like a very similar bitmask to what was being used on the collider (ie, if it was g_Player.unk04 & 0x4021 I wouldn't have made this substitution) so I thought it was close enough to guess for now that it might be collider flags. Can revert to 0xCC03 if preferred.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the context of the function I think it is safe to assume g_Player.unk04 is really related to the collision type mask. I'd vote to keep it as it is.

@Xeeynamo Xeeynamo merged commit 9ff6d42 into Xeeynamo:master Dec 13, 2023
9 checks passed
@bismurphy bismurphy deleted the f680 branch December 13, 2023 13:15
Xeeynamo pushed a commit that referenced this pull request Aug 30, 2024
As I've been saying on Discord, this is one of a set of functions that
does a bunch of things with colliders.

This required some slight restructuring of existing variables. We can
finally confirm that the second array in g_Player is a set of colliders,
so that's nice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants