-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add linter for g_Player.pl_vram_flag
#1851
base: master
Are you sure you want to change the base?
Add linter for g_Player.pl_vram_flag
#1851
Conversation
g_Player.pl_vram_flag
PLAYER.velocityY = -(abs(PLAYER.velocityX) + FIX(3.5)); | ||
} | ||
if ((g_Player.pl_vram_flag & 0xF000) == 0x8000) { |
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.
There's a bunch more of these so I'll stop pointing out every single one but it would make sense to document the compare values everywhere
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.
Yep, looks like the current linter will only handle one of masking or equality and not both. I've fixed these cases up manually
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.
I am reading func_8010C36C
and I can observe most of these fields are duplicates of the various EFFECT_UNK_
(see *vram_ptr |= g_Player.colliders[i].effects &
). Richter follows the same logic (see func_8015EE28
). The function func_80109A44
dictates the horizontal speed based on the slope type.
I think we need to gather more information before merging this change. I believe we're very close as some existing info are matching with what you've found. But I do not want to risk to get this merged in, having the massive changes from linter to then discover we could've done this work differently.
Noticed this in the header in a comment - decided to write a linter and make this an enum. I think it nicely self-documents a bunch of existing code