Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement d_wood (bushes) for Wind Waker (#712)
* Update zww_extractor.ts to create the output directory if it does not already exist Without this change, the script will fail if data/ZeldaWindWaker does not already exist * zww_extractor.ts now copies the res/* into the output directory NoClip expects these files to be present in the output directory. * Add d_wood.o symbols to zww_extractor.ts This should be everything we need to render bushes * Added d_wood.ts. Basic bush rendering. This is the start of one of the remaining missing d_s_play components, Wood (which is the TWW misnomer for bushes). Instead of following the old Grass.ts pattern, this is architected as similar to the d_wood.cpp as possible. This makes it simpler to compare to the decompiled results. A few functions are implemented, and the rendering is based heavily off of d_tree so it may not be completely correct. But basic model rendering and drop shadows are present. * Add cLib_chaseS() function to SComponent This is used by d_wood's animation functions * Add mDoMtx_copy() to m_do_mtx Since the src and dst parameters are switched from usual, I think it's worth adding this so that it's easy to copy paste from decomp * Update d_wood.ts to about 70% Idle animation fully implemented * d_wood alpha improvements * Enable alpha testing on bushes (greatly improves aliasing on leaf edges) * Render to the XLU BG display list. This fixes an ordering issue. We must render after most bg objects because of the alpha testing. * Disable alpha test when fading out after a bush has been cut * Add frustum culling to d_wood * d_wood: const enum fixup * Revert "zww_extractor.ts now copies the res/* into the output directory" This reverts commit a28b3f5. * d_wood: Cleanup sway attribute data and naming Also name the last of the unknown variables * Remove cLib_chaseS implementation, use cLib_chaseF instead The implementation is identical in JS (in C++ it's the short version vs float) * d_wood: Add public/private to all member functions * d_wood: don't cache globals, pass it as a param everywhere it's needed * d_wood: Fix shadow scale. Use math helpers for simpler matrix calculations. * d_wood: Correctly use the g_dTree_shadowTexCoord Removes old hardcoded texcoord hack * d_wood: Remove unnecessary transpose * d_wood: Replace Room_c linked list with a 2D array This differes from the cpp, but suits JS better * d_wood: Remove byte offset comments from classes * d_wood: Remove some unused animations * d_wood: Whoops. Fix some build errors related to extra params
- Loading branch information