-
Notifications
You must be signed in to change notification settings - Fork 45
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
d_wood (bushes) matching #682
Conversation
Jasper pointed me to the fact that the complicated inv_sqrt function I wrote was indeed just std::sqrtf(), which unlocked the rest of the match
some general notes about the style:
|
Thanks! Style replies:
|
oh, I thought I removed that after copying it from dtk-template but I must have just disabled it locally, my mistake. I removed it now. |
This was a local system problem which slipped by me in a previous commit
Based on the inline functions from the .map
Switching normAnim to a const* did most of the work
The only error is that g_dTree_shadowTexCoord is still using a 32-bit load instead of 16. the only way I know of to fix that is to define the data in this compilation unit. But that can't be right
- No one line function implementations - Replaced instances of (SomeType*)0x0 (copy/pasted from Ghidra) with NULL - Replaced a few instances of 0.0 with 0.0f - Replaced one instance where a number was used instead of an enum value
- Removed unused variables from functions - Removed unnecessary iVar1 loop variables (leftover Ghidra detritus) - Fixed dtk function comments being wrapped by autoformatter. They now always appear on one line
This moves g_dTree_shadowTexCoord into .sdata which allows d_wood::Packet_c::draw() to load its address with a single instruction. This makes a 100% match for draw()
g_dTree_shadowTexCoord now lives in the d_tree .sdata section, so its instruction can be loaded with a single instruction. This makes a 100% match with draw().
Also renamed mWindDir to mForceDir as it represents both wind and an actor pushing from a vector
The l_matDL display list is dynamically patched to reference the l_Txa_swood_bTEX texture at static initialization time. Is there a better way to represent this?
Last bit that isn't matching is that the .data section is too long due to the vtables from collision system objects. I'm unsure as to why this is. See this post |
Had to move Packet_c destructor to get the functions in the right order. See discussion: https://discord.com/channels/727908905392275526/873250400483024976/1300680009458913280
I think the build is failing because an enum was moved on the main branch - try adding an include for d_cc_d.h and see if it fixes it |
looks like there's a version difference - if you don't have the japanese version to check what it is you can use |
Lago, I've been out of this scene for 5 years, but excited to be back and contributing. Please let me know if you see anything egregious in here, or anything I can do to match your style better.