Merged
Conversation
| DriverQuadblockCollData quadblock; | ||
| } CollInputData; | ||
|
|
||
| typedef struct CollDCache |
Contributor
There was a problem hiding this comment.
does this start at 0x1f800000 or 0x1f800108?
| SVec3 pos; | ||
| u16 normalDominantAxis; | ||
| Vertex* levVertex; | ||
| const Vertex* levVertex; |
Contributor
There was a problem hiding this comment.
Can const-ifying be done elsewhere too?
Collaborator
Author
There was a problem hiding this comment.
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, | ||
| }; |
Contributor
There was a problem hiding this comment.
do the rest get zeroed by default? Normally unallocated stack variables contain garbage.
Collaborator
Author
There was a problem hiding this comment.
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
TheUbMunster
approved these changes
Sep 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.