-
Notifications
You must be signed in to change notification settings - Fork 46
two more coll funcs #232
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
two more coll funcs #232
Conversation
| DriverQuadblockCollData quadblock; | ||
| } CollInputData; | ||
|
|
||
| typedef struct CollDCache |
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.
does this start at 0x1f800000 or 0x1f800108?
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.
0x1f800000
| SVec3 pos; | ||
| u16 normalDominantAxis; | ||
| Vertex* levVertex; | ||
| const Vertex* levVertex; |
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.
Can const-ifying be done elsewhere too?
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 think we can const-fy most of these scratchpad pointers as they seem to be used for read only purposes. As for data in other headers, they need to be analyzed in a case by case scenario, which means decompiling a ton of functions before making such decisions
| const Matrix m = { | ||
| .m[0][0] = cache->inputNextPos.x, .m[0][1] = cache->inputNextPos.y, .m[0][2] = cache->inputNextPos.z, | ||
| .m[1][0] = cache->collInput.quadblock.driverPos.x, .m[1][1] = cache->collInput.quadblock.driverPos.y, .m[1][2] = cache->collInput.quadblock.driverPos.z, | ||
| }; |
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.
do the rest get zeroed by default? Normally unallocated stack variables contain garbage.
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.
The other variables aren't being used, so it's fine. It's a matrix multiplication to a vector with just row 0 and 1
No description provided.